package com.fs.course.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fs.common.annotation.Excel;
import lombok.Data;
import com.fs.common.core.domain.BaseEntity;
import lombok.EqualsAndHashCode;

/**
 * 会员每日看课统计对象 fs_user_course_company_statistics
 *
 * @author fs
 * @date 2025-10-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class FsUserCourseCompanyStatistics extends BaseEntity {

    private Long id;

    private Long projectId;

    @Excel(name = "完播次数")
    private Long completeWatchCount;

    @Excel(name = "观看次数")
    private Long watchCount;

    /** DB字段，存放放大100倍后的比例整数值，例 12.34% -> 1234 */
    private Long completeRate;

    @Excel(name = "答题人次")
    private Long answerCount;

    @Excel(name = "正确人次")
    private Long correctCount;

    /** DB字段，同样放大100倍后存储 */
    private Long correctRate;

    @Excel(name = "领取次数")
    private Long receiveCount;

    @Excel(name = "领取金额(元)")
    private BigDecimal receiveAmount;

    @Excel(name = "会员数量")
    private Long userCount;

    @Excel(name = "会员黑名单数量")
    private Long userBlacklistCount;

    private Long companyId;

    @Excel(name = "公司名称")
    private String companyName;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "统计日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate;

    /** 用于 Excel 导出显示的字符串，不入库 */
    @Excel(name = "完播率(%)")
    private String completeRateStr;

    @Excel(name = "正确率(%)")
    private String correctRateStr;
}
