/*
 * @Author: YKH
 * @Date: 2022-09-01 20:41:58
 * @LastEditTime: 2022-09-27 16:44:39
 * @Description: file content
 * @FilePath: \cool-admin\cool-admin-midway-master\src\app\modules\shuyou\entity\rent_ledger_computer.ts
 */
import { EntityModel } from '@midwayjs/orm';
import { Column, Index } from 'typeorm';
import { BaseEntity } from 'midwayjs-cool-core';

/**
 * 租机每日台账表
 */
@EntityModel('shuyou_rent_ledger_computer')
export class ShuyouRentLedgerComputerEntity extends BaseEntity {
  @Index()
  @Column({ type: 'date', comment: '台账日期' })
  new_date: Date;

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

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

  @Column({ comment: '租机店铺ID' })
  shop_id: number;

  @Index()
  @Column({ comment: '套餐', length: 100, nullable: true })
  set_meal: string;

  @Column({ type: 'datetime', comment: '当时的起租时间', nullable: true })
  rent_start_then: Date;

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

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

  @Column({
    comment: '价格套餐 0:天卡 1:周卡 2:月卡',
    default: 0,
    type: 'tinyint',
  })
  price_type: number;

  @Column({
    type: 'decimal',
    comment: '当时的租机价格标准',
    precision: 10,
    scale: 2,
    default: 0,
  })
  rent_price_then: number;

  @Column({
    type: 'decimal',
    comment: '当天租金',
    precision: 10,
    scale: 5,
    default: 0,
  })
  rent_price_day: number;

  @Column({
    comment: '结算方式 0:先付后用 1:先用后付 2:其他方式',
    default: 0,
    type: 'tinyint',
  })
  pay_method: number;

  @Column({
    comment: '是否到期 0:否 1:是 2:明日到期',
    default: 0,
    type: 'tinyint',
  })
  is_expire: number;

  @Column({
    type: 'decimal',
    comment: '当前租赁期内已产生多少租金',
    precision: 10,
    scale: 5,
    default: 0,
  })
  rent_price_used_then: number;

  // @Column({ comment: '游戏任务,多个游戏以英文逗号隔开', nullable: true })
  // taskNameList_then: string;

  // @Column({ comment: '负责人,多个负责人以英文逗号隔开', nullable: true })
  // directorNameList_then: string;

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