import {
  Entity,
  PrimaryGeneratedColumn,
  Column,
  CreateDateColumn,
  UpdateDateColumn,
} from 'typeorm';

/**
 * Internal audit-trail remarks attached to an NC.
 * Used to log follow-up actions (e.g., "Sent mail after call", "NCRs Closed").
 */
@Entity({ name: 'nc_remarks' })
export class PreviousNcRemarkEntity {
  @PrimaryGeneratedColumn({ type: 'bigint', unsigned: true })
  id: number;

  @Column({ type: 'bigint', unsigned: true })
  nc_id: number;

  @Column({ type: 'int', unsigned: true })
  user_id: number;

  @Column({ type: 'text' })
  remark: string;

  @CreateDateColumn({ type: 'timestamp' })
  created_at: Date;

  @UpdateDateColumn({ type: 'timestamp' })
  updated_at: Date;
}
