package com.rj.entity;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 门店录音统计表
 * </p>
 *
 * @author 李中华 ,spllzh
 * @since 2025-08-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("audio_management_statistics")
@Schema(description="门店录音统计表")
public class AudioManagementStatistics implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "租户ID")
    @TableField("tenant_id")
    private String tenantId;

    @Schema(description = "门店ID")
    @TableField("dealership_id")
    private Long dealershipId;

    @Schema(description = "门店名称")
    @TableField("dealership_name")
    private String dealershipName;

    @Schema(description = "门店录音总时长(分钟)")
    @TableField("dealership_total_duration")
    private Long dealershipTotalDuration;

    @Schema(description = "门店录音数量")
    @TableField("dealership_recording_count")
    private Integer dealershipRecordingCount;

    @Schema(description = "门店录音平均时长(分钟)")
    @TableField("dealership_avg_duration")
    private BigDecimal dealershipAvgDuration;

    @Schema(description = "销售人员ID")
    @TableField("sales_id")
    private String salesId;

    @Schema(description = "销售人员录音总时长(分钟)")
    @TableField("personal_total_duration")
    private Long salesTotalDuration;
    
    @Schema(description = "销售人员录音总时长统计(汇总，不映射到数据库)")
    @TableField(exist = false)
    private Long salesTotalDurationStatistic;

    @Schema(description = "销售人员录音数量")
    @TableField("personal_recording_count")
    private Integer salesRecordingCount;
    
    @Schema(description = "销售人员录音数量统计(汇总，不映射到数据库)")
    @TableField(exist = false)
    private Integer salesRecordingCountStatistic;

    @Schema(description = "销售人员录音平均时长(分钟)")
    @TableField("personal_avg_duration")
    private BigDecimal salesAvgDuration;

    @Schema(description = "统计日期")
    @TableField("statistics_date")
    private LocalDate statisticsDate;

    @Schema(description = "创建时间")
    @TableField("created_at")
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    @TableField("updated_at")
    private LocalDateTime updatedAt;
}
