/*
 * @Author: YKH
 * @Date: 2022-06-08 10:20:29
 * @LastEditTime: 2022-06-09 17:24:28
 * @Description: 
 * @FilePath: \cool-admin\cool-admin-midway-master\src\app\modules\shuyou\entity\data_abnormal_rate.ts
 */
import { EntityModel } from '@midwayjs/orm';
import { BaseEntity } from 'midwayjs-cool-core';
import { Column, Index } from 'typeorm';

/**
 * data_abnormal_rate游戏异常率
 */
@EntityModel('data_abnormal_rate')
@Index(["task_id", "new_date", "hour"], { unique: true }) // 联合索引
export class ShuyouAbnormalRateEntity extends BaseEntity {

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

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

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

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

    @Column({ comment: '小时', default: 1 })
    hour: number;

    @Column({ comment: '游戏封号数', default: 0 })
    num_frozen: number;

    @Column({ comment: '拉取账号数', default: 0 })
    num_pull_account: number;

    @Column({ comment: '启动模拟器成功数', default: 0 })
    num_start_simulator: number;

    @Column({ comment: '上传Ip', default: 0 })
    num_ip: number;

    @Column({ comment: '脚本启动成功数', default: 0 })
    num_start_script: number;

    @Column({ comment: '游戏启动成功数', default: 0 })
    num_start_game: number;

    @Column({ comment: '账号登陆成功数', default: 0 })
    num_login_success: number;

    @Column({ comment: '进入游戏成功数', default: 0 })
    num_into_game: number;

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

    @Column({ comment: '留存成功', default: 0 })
    num_lc_success: number;

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

    @Column({ type: "double", comment: '完整率', default: 0.00, scale: 2 })
    rate_all_step: number;

    @Column({ comment: '下发付费账号', default: 0 })
    num_pull_pay: number;

    @Column({ comment: '留存账号总数', default: 0 })
    num_account_lc: number;

    @Column({ comment: '可以付费的账号', default: 0 })
    num_could_pay: number;

    @Column({ comment: '订单数/付费成功数/成功率', default: '0/0/0%' })
    order_success_rate: string;


}
