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

@Entity('usp_text_description', { schema: DB_SCHEMA })
export class UspTextDescriptionEntity {
  @PrimaryGeneratedColumn({ type: 'smallint', name: 'utd_id' })
  utd_id: number;

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

  @Column('varchar', { name: 'sub_title', length: 50 })
  sub_title: string;

  @Column('text', { name: 'description' })
  description: string;

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

  @Column('varchar', { name: 'image', length: 100 })
  image: string;

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