import { EntityModel } from '@midwayjs/orm';
import { Column,Index } from 'typeorm';
import { BaseEntity } from 'midwayjs-cool-core';

/**
 * 任务表
 */
@EntityModel('shuyou_game_computer')
export class ShuyouGameComputerEntity extends BaseEntity {


  @Index()
  @Column({ comment: '电脑编号', length: 100 })
  pc_num: string;

  @Index()
  @Column({ comment: '电脑名称', length: 100 })
  pc_name: string;

  @Column({ comment: '是否租机 0:否 1:是', default: 0, type: 'tinyint' })
  is_rent: number;

  @Column({ comment: '租机店铺名', nullable: true })
  shop_name: string;

  @Column({ type:'datetime', comment: '租机日期' , nullable: true})
  rent_start: Date;

  @Column({ comment: '租机时常（天）', nullable: true })
  rent_duration: number;

  @Column({  type:'datetime', comment: '到期时间', nullable: true })
  rent_end: Date;

  @Column({ type: "double",comment: '租机价格', default: 0.00, scale: 2})
  rent_price: number;

  @Column({ comment: '电脑位置（租机不填）', nullable: true })
  pc_position: string;

  @Column({ comment: '使用人id' })
  directorId: number;

  @Column({ comment: 'MAC地址', nullable: true })
  pc_mac: string;

  @Column({ comment: 'cpu数' })
  pc_cpu: string;

  @Column({ comment: 'cpu名称', nullable: true })
  pc_cpuName: string;

  @Column({ comment: '内存大小' })
  pc_memory: string;

  @Column({ comment: '显卡名称', nullable: true })
  pc_gpu: string;

  @Column({ comment: '是否异常 0:否 1:是（电脑硬件损坏或系统问题等）', default: 0, type: 'tinyint' })
  is_abnormal: number;

  @Column({ comment: '异常说明', nullable: true })
  exception_remark: string;

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

}
