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

/**
 * 游戏账号表
 */
@EntityModel('shuyou_game_account')
@Index(["account_text", "type_id"], { unique: true }) // 联合索引
export class ShuyouGameAccountEntity extends BaseEntity {

  @Column({ comment: '账号', length: 50 })
  account_text: string;

  @Column({ comment: '密码', length: 50 })
  password_text: string;

  @Column({ comment: 'vpn域', nullable: true, length: 50 })
  vpn_text: string;

  @Column({ comment: '厂商', nullable: true, length: 50 })
  manufacturer: string;

  @Column({ comment: '型号', nullable: true, length: 50 })
  model: string;

  @Column({ comment: '手机号码', nullable: true, length: 50 })
  pnumber: string;

  @Column({ comment: 'imei', nullable: true, length: 50 })
  imei: string;

  @Column({ comment: 'imsi', nullable: true, length: 50 })
  imsi: string;

  @Column({ comment: '序列号', nullable: true, length: 50 })
  simserial: string;

  @Column({ comment: '安卓id', nullable: true, length: 50 })
  androidid: string;

  @Column({ comment: 'mac地址', nullable: true, length: 50 })
  mac: string;

  @Index()
  @Column({ comment: '账号类型id' })
  type_id: string;

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

  @Column({ comment: '冻结密错日期', nullable: true })
  frozenTime: Date;

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

  @Index()
  @Column({ comment: '当前占用任务ID', default: 0 })
  occupy_taskId: string;

  @Column({ comment: '释放时间', nullable: true })
  releaseTime: Date;

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

}
