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

@Index('active', ['active'], {})
@Entity('quote_master', { schema: DB_SCHEMA })
export class QuoteMasterEntity {
  @PrimaryGeneratedColumn({ type: 'smallint', name: 'quote_master_id' })
  quote_master_id: number;

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

  @Column('tinyint', { name: 'active', nullable: true, width: 1 })
  active: boolean | null;

  @Column('tinyint', { name: 'isHome', default: () => "'0'" })
  isHome: number;

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