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

/**
 * 司机
 */
@Entity('t_basicdata_driver')
export class BasicdataDriverEntity extends BaseEntity {
  @Index({ unique: true })
  @Column({ comment: '身份证号', length: 64 })
  businessId: string;

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

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

  @Column({ comment: '驾驶证号', length: 64, nullable: true })
  licenseNo: string;

  @Column({ comment: '驾驶证有效期开始', nullable: true })
  licenseStartDate: Date;

  @Column({ comment: '驾驶证有效期结束', nullable: true })
  licenseEndDate: Date;

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

  // 部门名称
  departmentName: string;

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

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