import { EntityModel } from '@midwayjs/orm';
import { Column, PrimaryColumn, Index } from 'typeorm';

/**
 * 任务表
 */
@EntityModel('shuyou_game_task')
export class ShuyouGameTaskEntity {
  // @Index()
  // @PrimaryColumn({ comment: '自增id' })
  // id: number;

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

  @Index()
  @Column({ comment: '任务名', length: 100 })
  task_name: string;

  @Index()
  @Column({ type: 'date', comment: '目标日期,任务可能不是当天跑' })
  new_date: Date;

  @Column({ comment: '创建时间' })
  createTime: Date;

  @Column({ comment: '更新时间' })
  updateTime: Date;

  @Column({ comment: '新增下限' })
  target_new_low: number;

  @Column({ comment: '新增上限' })
  target_new_high: number;

  @Column({ comment: '付费下限' })
  target_pay_low: number;

  @Column({ comment: '付费上限' })
  target_pay_high: number;

  @Column({ comment: '活跃下限，有新增目标的游戏可不填' })
  target_active_low: number;

  @Column({ comment: '活跃上限，有新增目标的游戏可不填' })
  target_active_high: number;

  @Column({ comment: '付费单价下限', type: 'decimal', default: 6.00, scale: 2 })
  unit_price_low: number;

  @Column({ comment: '付费单价上限', type: 'decimal', default: 6.00, scale: 2 })
  unit_price_high: number;

  @Column({ type: "double", comment: '次留比例', default: 0.5, scale: 2 })
  lc_two_ratio: number;

  @Column({ type: "double", comment: '3留比例', default: 0.45, scale: 2 })
  lc_three_ratio: number;

  @Column({ type: "double", comment: '4留比例', default: 0.4, scale: 2 })
  lc_four_ratio: number;

  @Column({ type: "double", comment: '5留比例', default: 0.35, scale: 2 })
  lc_five_ratio: number;

  @Column({ type: "double", comment: '6留比例', default: 0.3, scale: 2 })
  lc_six_ratio: number;

  @Column({ type: "double", comment: '7留比例', default: 0.25, scale: 2 })
  lc_seven_ratio: number;

  @Column({ type: "double", comment: '8留比例', default: 0.2, scale: 2 })
  lc_eight_ratio: number;

  @Column({ type: "double", comment: '15留比例', default: 0.1, scale: 2 })
  lc_fifteen_ratio: number;

  @Column({ type: "double", comment: '30留比例', default: 0.01, scale: 2 })
  lc_thirty_ratio: number;

  @Column({ comment: '终止任务时间', default: '2099-01-01 00:00:00' })
  stopTime: Date;

  @Column({ comment: '终止任务原因', nullable: true })
  stopRemark: string;

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

  @Column({ comment: '是否在执行数优 0:否 1:是', default: 1, type: 'tinyint' })
  is_run: number;

  @Column({ comment: '是否重复游戏 0:否 1:是', default: 0, type: 'tinyint' })
  is_repeat: number;

  // @Column({ comment: '游戏id，可多个，用英文逗号分割', default: 0 })
  // game_id: string;

  // 角色ID列表
  gameIdList: number[];

  fileList: number[];

  @Column({ comment: '游戏端口id' })
  game_agentId: number;

  @Column({ comment: '登录方式id' })
  login_modeId: number;

  @Column({ comment: '账号类型id' })
  account_typeId: number;

  @Column({ comment: '负责人id' })
  directorId: number;

  @Column({ comment: '小绵羊后台游戏id(如果是小绵羊游戏则填写)', length: 50, nullable: true })
  xmy_id: string;

  @Column({ comment: '腾讯游戏渠道id(如果是腾讯游戏则填写)', length: 50, nullable: true })
  qq_channel: string;

  @Column({ comment: '腾讯后台游戏id(如果是腾讯游戏则填写)', length: 50, nullable: true })
  qq_id: string;

  @Column({ comment: '魅族游戏渠道id(如果是魅族游戏则填写)', length: 50, default: null })
  mz_channel: string;

  @Column({ comment: '魅族后台游戏id(如果是魅族游戏则填写)', length: 50, default: null })
  mz_id: string;

  @Column({ comment: '下载链接', nullable: true })
  download: string;

  @Column({ comment: '新增付费or留存付费 1:重做新增付费 2:重做留存付费', default: 2, type: 'tinyint' })
  new_retained: number;

  @Column({ comment: '机房后台game_id', default: 0 })
  xjf_id: number;

}
