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

@Index('active', ['active'], {})
@Index('domestic', ['domestic'], {})
@Entity('study_level_master', { schema: DB_SCHEMA })
export class StudyLevelMasterEntity {
  @PrimaryGeneratedColumn({ type: 'smallint', name: 'id' })
  id: number;

  @Column('varchar', { name: 'study_level', length: 150 })
  study_level: string;

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

  @Column('tinyint', { name: 'active', nullable: true, default: () => "'1'" })
  active: number | null;

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

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

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