/*
 * @Author: YKH
 * @Date: 2021-12-09 18:01:49
 * @LastEditTime: 2022-03-15 13:53:27
 * @Description: 记录每天 每月 每年的总新增 总付费 总活跃，便于数据的展示
 * @FilePath: \cool-admin\cool-admin-midway-master\src\app\modules\shuyou\entity\data_active.ts
 */
import { EntityModel } from '@midwayjs/orm';
import { Column, Index } from 'typeorm';
import { BaseEntity } from 'midwayjs-cool-core';

/**
 * 活跃数据表
 */
@EntityModel('shuyou_data_active')
export class ShuyouDataActiveEntity extends BaseEntity {

  // @Column({ comment: '数据的类型 0:日 1:周 2:月 3:年', default: 0, type: 'tinyint' })
  // data_type: number;

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

  // @Rule(RuleType.number().max(366).min(1))
  // @Column({ comment: '第几日', nullable: true })
  // day: number;

  // @Rule(RuleType.number().max(55).min(1))
  // @Column({ comment: '第几周', nullable: true })
  // week: number;

  // @Rule(RuleType.number().max(12).min(1))
  // @Column({ comment: '第几月', nullable: true })
  // month: number;

  // @Rule(RuleType.number().max(2099).min(2021))
  // @Column({ comment: '年份', nullable: true })
  // year: number;
  @Column({ comment: '负责人', default: '合计' })
  game_director: string;

  @Column({ comment: '渠道', default: '合计' })
  game_agent: string;

  @Column({ comment: '目标新增', default: 0 })
  target_new: number;

  @Column({ comment: '目标活跃', default: 0 })
  target_active: number;

  @Column({ comment: '目标付费', default: 0 })
  target_pay: number;

  @Column({ comment: '总新增', default: 0 })
  sum_new: number;

  @Column({ comment: '总活跃', default: 0 })
  sum_active: number;

  @Column({ comment: '总付费', default: 0 })
  sum_pay: number;

  // @Column({ comment: '新增增长，为负则表示降低', default: 0 })
  // growth_new: number;

  // @Column({ comment: '付费增长，为负则表示降低', default: 0 })
  // growth_pay: number;

  // @Column({ comment: '活跃增长，为负则表示降低', default: 0 })
  // growth_active: number;

  // @Column({ type: "double", comment: '新增增长比例，为负则表示降低', default: 0.0, scale: 2 })
  // growthRatio_new: number;

  // @Column({ type: "double", comment: '付费增长比例，为负则表示降低', default: 0.0, scale: 2 })
  // growthRatio_pay: number;

  // @Column({ type: "double", comment: '活跃增长比例，为负则表示降低', default: 0.0, scale: 2 })
  // growthRatio_active: number;

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

}
