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

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

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

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

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

  @Column('tinyint', { 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;
}
