/*
 * @Author: YKH
 * @Date: 2021-12-21 18:23:13
 * @LastEditTime: 2021-12-30 10:10:52
 * @Description: 
 * @FilePath: \cool-admin\cool-admin-midway-master\src\app\modules\shuyou\entity\task_account_record.ts
 */
import { EntityModel } from '@midwayjs/orm';
import { BaseEntity } from 'midwayjs-cool-core';
import { Column, Index } from 'typeorm';

/**
 * 任务账号记录表
 */
@EntityModel('task_account_record')
@Index(["task_id", "account_id"], { unique: true }) // 联合索引
export class ShuyouTaskAccountRecordEntity extends BaseEntity {

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

  @Index()
  @Column({ comment: '账号id' })
  account_id: string;

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

  @Column({ comment: '取号时间(新增)', nullable: true })
  getTimeNew: Date;

  @Column({ comment: '取号时间(留存)', nullable: true })
  getTimeRetained: Date;

  @Column({ comment: '成功时间(新增)', nullable: true })
  successTimeNew: Date;

  @Column({ comment: '成功时间(留存)', nullable: true })
  successTimeRetained: Date;

  @Column({ comment: '账号所处状态 0.正常 1.冻结 2.密错 3.禁用 5.人脸验证', default: 0, type: 'tinyint' })
  statusNew: number;

  @Column({ comment: '账号所处状态 0.正常 1.冻结 2.密错 3.禁用 -1.账号被取 5.人脸验证', default: 0, type: 'tinyint' })
  statusRetained: number;

  @Column({ comment: '新增成功标识 0.未成功 1.成功 2.新增出现留存', default: 0, type: 'tinyint' })
  ok_new: number;

  // 2留账号取走未还状态：-2; 3留账号取走未还状态：-3
  @Column({ comment: '留存成功标识 0.未成功 2.2留成功，3.3留成功 4.4留成功...', default: 0, type: 'tinyint' })
  ok_retained: number;


}
