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

@Entity('franchise_audit_logs')
export class FranchiseAuditLogs {
  @PrimaryGeneratedColumn({ type: 'int', name: 'id' })
  id: number;

  @Column('int', { name: 'franchise_id', nullable: false })
  franchiseId: number;

  @Column('varchar', { length: 255, nullable: false })
  action: string;

  @Column('longtext', { nullable: true })
  details: string | null;

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