/*
 * @Author: YKH
 * @Date: 2022-02-16 15:02:32
 * @LastEditTime: 2022-02-18 15:30:41
 * @Description: 
 * @FilePath: \cool-admin\cool-admin-midway-master\src\app\modules\shuyou\entity\special_account_consume.ts
 */
import { EntityModel } from '@midwayjs/orm';
import { BaseEntity } from 'midwayjs-cool-core';
import { Column, Index } from 'typeorm';

/**
 * 特殊卡消耗明细表（qq卡..）
 */
@EntityModel('special_account_consume')
export class ShuyouSpecialAccountConsumeEntity extends BaseEntity {

  @Index()
  @Column({ comment: '卡号' })
  card_id: number;

  @Column({ comment: '消耗金额', type: 'decimal', scale: 2 })
  consume: number;

  @Column({ comment: '取走时间', nullable: true })
  occupyTime: Date;

  @Index()
  @Column({ comment: '被哪个任务取走', nullable: true })
  occupy_task: number;

  @Index()
  @Column({ comment: '被哪个账号取走', nullable: true })
  occupy_acc: string;

  @Column({ comment: '卡号所处状态: 2.已取出 3.已使用 4.失效 5.余额不足 6.无法使用 7.已被删除', default: 0, type: 'tinyint' })
  status: number;

  @Column({ comment: '消耗时间', nullable: true })
  consumeTime: Date;

}
