package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 员工评价表
 * 用户对员工的评价和评分
 *
 * @author system
 * @since 2025-01-XX
 */
@Data
@JsonInclude
@TableName("store_staff_review")
@ApiModel(value = "StoreStaffReview对象", description = "员工评价")
public class StoreStaffReview {

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "评价用户ID（订单用户）")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "员工用户ID")
    @TableField("staff_user_id")
    private Integer staffUserId;

    @ApiModelProperty(value = "总体评分（1-5星，支持0.5星）")
    @TableField("overall_rating")
    private java.math.BigDecimal overallRating;

    @ApiModelProperty(value = "服务态度评分（1-5星，支持0.5星）")
    @TableField("service_attitude_rating")
    private java.math.BigDecimal serviceAttitudeRating;

    @ApiModelProperty(value = "响应时间评分（1-5星，支持0.5星）")
    @TableField("response_time_rating")
    private java.math.BigDecimal responseTimeRating;

    @ApiModelProperty(value = "专业能力评分（1-5星，支持0.5星）")
    @TableField("professional_ability_rating")
    private java.math.BigDecimal professionalAbilityRating;

    @ApiModelProperty(value = "评价内容")
    @TableField("review_content")
    private String reviewContent;

    @ApiModelProperty(value = "评价图片（JSON数组格式存储图片URL）")
    @TableField("review_images")
    private String reviewImages;

    @ApiModelProperty(value = "是否匿名评价，0:否，1:是")
    @TableField("is_anonymous")
    private Integer isAnonymous;

    @ApiModelProperty(value = "点赞数")
    @TableField("like_count")
    private Integer likeCount;

    @ApiModelProperty(value = "评论数")
    @TableField("comment_count")
    private Integer commentCount;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField("created_user_id")
    private Integer createdUserId;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    @ApiModelProperty(value = "修改人ID")
    @TableField("updated_user_id")
    private Integer updatedUserId;

    @ApiModelProperty(value = "申诉id （如果该评价被申诉 申诉id会有值）")
    @TableField("appeal_id")
    private String appealId;

    @ApiModelProperty(value = "审核状态：0-待审核 1-通过 2-驳回")
    @TableField("audit_status")
    private Integer auditStatus;

    @ApiModelProperty(value = "审核失败原因")
    @TableField(value = "audit_reason")
    private String auditReason;
}

