import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 分拣人员信息
 */
@Entity('t_basicdata_sorter')
export class BasicdataSorterEntity extends BaseEntity {
  @Index({ unique: true })
  @Column({ comment: '身份证号', length: 32, nullable: true })
  businessId: string;

  @Column({ comment: '姓名', length: 64 })
  businessName: string;

  @Column({ comment: '手机号', length: 32, nullable: true })
  phone: string;

  @Column({ comment: '入职日期', type: 'date', nullable: true })
  hireDate: Date;

  @Column({ comment: '状态', dict: ['在职', '离职', '禁用'], default: 0 })
  status: number;

  @Index()
  @Column({ comment: '所属单位', type: 'bigint', nullable: true })
  departmentId: number;

  // 部门名称
  departmentName: string;

  @Column({ comment: '工作站点编码', nullable: true })
  workSiteId: string;

  workSiteName: string;

  @Column({ comment: '身份证正面照', nullable: true })
  idCardFront: string;

  @Column({ comment: '身份证反面照', nullable: true })
  idCardBack: string;

  @Column({ comment: '备注', nullable: true })
  remark: string;
}
