/*
 * @Author: YKH
 * @Date: 2021-12-08 10:26:27
 * @LastEditTime: 2022-03-21 15:50:59
 * @Description: 
 * @FilePath: \cool-admin\cool-admin-midway-master\src\app\modules\shuyou\entity\reason_incomplete.ts
 */
import { EntityModel } from '@midwayjs/orm';
import { BaseEntity } from 'midwayjs-cool-core';
import { Column, Index } from 'typeorm';

/**
 * 未完成原因记录表
 */
@EntityModel('shuyou_reason_incomplete')
@Index(["task_id", "new_date"], { unique: true }) // 联合索引
export class ShuyouReasonIncompleteEntity extends BaseEntity {

  @Index()
  @Column({ comment: '任务id' })
  task_id: string;

  @Index()
  @Column({ comment: '任务名', length: 100 })
  task_name: string;

  @Column({ comment: '负责人' })
  directorName: string;

  @Index()
  @Column({ type: 'date', comment: '任务日期' })
  new_date: Date;

  @Column({ comment: '未完成新增', default: 0 })
  incomplete_new: number;

  @Column({ comment: '未完成付费', default: 0 })
  incomplete_pay: number;

  @Column({ comment: '未完成活跃', default: 0 })
  incomplete_active: number;

  @Column({ comment: '未完类型' })
  type_id: number;

  @Column({ comment: '未完原因', length: 300 })
  reason: string;

  @Column({ comment: '解决方案', length: 300, nullable: true })
  solution: string;

  @Column({ comment: '是否填写', default: 1 })
  is_write: number;

}
