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("lawyer_order_review")
@ApiModel(value = "OrderReview对象", description = "订单评价")
public class OrderReview {

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

    @ApiModelProperty(value = "订单ID")
    @TableField("order_id")
    private Integer orderId;

    @ApiModelProperty(value = "订单编号")
    @TableField("order_number")
    private String orderNumber;

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

    @ApiModelProperty(value = "律师用户ID")
    @TableField("lawyer_user_id")
    private Integer lawyerUserId;

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

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

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

    @ApiModelProperty(value = "专业能力评分（1-5星，支持0.5星）")
    @TableField("professional_ability_rating")
    private Double 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;
}

