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

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

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

  @Column('char', { name: 'count', nullable: true, length: 6 })
  count: string | 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', nullable: true, width: 1 })
  active: boolean | null;

  @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;

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