import { DB_SCHEMA } from 'src/utils';
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('usp_text', { schema: DB_SCHEMA })
export class UspTextEntity {
  @PrimaryGeneratedColumn({ type: 'tinyint', name: 'id' })
  id: number;

  @Column('varchar', { name: 'heading', nullable: true, length: 100 })
  heading: string | null;

  @Column('text', { name: 'description', nullable: true })
  description: string | null;

  @Column('tinyint', { name: 'sequence', nullable: true })
  sequence: number | null;

  @Column('varchar', { name: 'pagetype', length: 25 })
  pagetype: string;

  @Column('smallint', { name: 'visa_product_country_id', nullable: true })
  visa_product_country_id: number | null;

  @Column('tinyint', { name: 'active', width: 1, default: () => "'1'" })
  active: boolean;

  @Column('smallint', { name: 'by_user', nullable: true })
  by_user: number | null;

  @Column('timestamp', { name: 'created', default: () => 'CURRENT_TIMESTAMP' })
  created: Date;

  @Column('timestamp', { name: 'modified', default: () => 'CURRENT_TIMESTAMP' })
  modified: Date;
}
