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

/**
 * 每日游戏完成表
 */
@EntityModel('shuyou_game_complete')
@Index(["task_id", "new_date"], { unique: true }) // 联合索引
export class ShuyouGameCompleteEntity extends BaseEntity {

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

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

  @Index()
  @Column({ type: 'date', comment: '完成日期' })
  new_date: Date;

  @Column({ comment: '完成新增', default: 0 })
  complete_new: number;

  @Column({ comment: '完成付费', default: 0 })
  complete_pay: number;

  @Column({ comment: '完成活跃（所有留存完成的和+新增完成）', default: 0 })
  complete_active: number;

  @Column({ comment: '付费流水', type: 'decimal', default: 0.00, scale: 2 })
  amount: number;

  @Column({ comment: '是否完成目标 0:否 1:是', default: 0, type: 'tinyint' })
  is_complete: number;

  @Column({ comment: '群控效率（新增/留存/付费）', default: '0/0/0' })
  game_rate: string;

  @Column({ comment: '小绵羊效率（新增/留存/付费）', default: '0/0/0' })
  game_rate_xmy: string;

  @Column({ comment: '完成次留', default: 0 })
  complete_two: number;

  @Column({ comment: '完成3留', default: 0 })
  complete_three: number;

  @Column({ comment: '完成4留', default: 0 })
  complete_four: number;

  @Column({ comment: '完成5留', default: 0 })
  complete_five: number;

  @Column({ comment: '完成6留', default: 0 })
  complete_six: number;

  @Column({ comment: '完成7留', default: 0 })
  complete_seven: number;

  @Column({ comment: '完成8留', default: 0 })
  complete_eight: number;

  @Column({ comment: '完成9留', default: 0 })
  complete_nine: number;

  @Column({ comment: '完成10留', default: 0 })
  complete_ten: number;

  @Column({ comment: '完成11留', default: 0 })
  complete_eleven: number;

  @Column({ comment: '完成12留', default: 0 })
  complete_twelve: number;

  @Column({ comment: '完成13留', default: 0 })
  complete_thirteen: number;

  @Column({ comment: '完成14留', default: 0 })
  complete_fourteen: number;

  @Column({ comment: '完成15留', default: 0 })
  complete_fifteen: number;

  @Column({ comment: '完成16留', default: 0 })
  complete_sixteen: number;

  @Column({ comment: '完成17留', default: 0 })
  complete_seventeen: number;

  @Column({ comment: '完成18留', default: 0 })
  complete_eighteen: number;

  @Column({ comment: '完成19留', default: 0 })
  complete_nineteen: number;

  @Column({ comment: '完成20留', default: 0 })
  complete_twenty: number;

  @Column({ comment: '完成21留', default: 0 })
  complete_twentyone: number;

  @Column({ comment: '完成22留', default: 0 })
  complete_twentytwo: number;

  @Column({ comment: '完成23留', default: 0 })
  complete_twentythree: number;

  @Column({ comment: '完成24留', default: 0 })
  complete_twentyfour: number;

  @Column({ comment: '完成25留', default: 0 })
  complete_twentyfive: number;

  @Column({ comment: '完成26留', default: 0 })
  complete_twentysix: number;

  @Column({ comment: '完成27留', default: 0 })
  complete_twentyseven: number;

  @Column({ comment: '完成28留', default: 0 })
  complete_twentyeight: number;

  @Column({ comment: '完成29留', default: 0 })
  complete_twentynine: number;

  @Column({ comment: '完成30留', default: 0 })
  complete_thirty: number;

  @Column({ comment: '异常记录', nullable: true })
  remark: string;

}
