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

@Entity('web_media_category', { schema: DB_SCHEMA })
export class WebMediaCategoryEntity {
  @PrimaryGeneratedColumn({ type: 'int', name: 'id' })
  id: number;

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

  @Column('tinyint', { name: 'status' })
  status: number;

  @Column('int', { name: 'by_user' })
  by_user: number;

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

  @Column('timestamp', {
    name: 'modified',
    default: () => "'0000-00-00 00:00:00'",
  })
  modified: Date;
}
