package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
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 lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 评论表
 *
 * @author ssk
 * @since 2025-01-02
 */
@Data
@JsonInclude
@EqualsAndHashCode(callSuper = false)
@TableName("store_comment")
@ApiModel(value = "StoreComment对象", description = "评论表")
public class StoreComment extends Model<StoreComment> {

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

    @ApiModelProperty(value = "门店id")
    @TableField("store_id")
    private Integer storeId;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "评论内容")
    @TableField("comment_content")
    private String commentContent;

//    @ApiModelProperty(value = "评价星级")
//    @TableField("comment_star")
//    private Integer commentStar;

    @ApiModelProperty(value = "业务id")
    @TableField("business_id")
    private Integer businessId;

    @ApiModelProperty(value = "业务类型(1:订单评论, 2:动态社区评论, 3:活动评论, 4:店铺打卡评论, 5:订单评价)")
    @TableField("business_type")
    private Integer businessType;

    @ApiModelProperty(value = "图片id")
    @TableField("img_id")
    private String imgId;

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

    @ApiModelProperty(value = "回复id, 本表其他ID, 代表回复了本条评论")
    @TableField("reply_id")
    private Integer replyId;

    @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.INSERT_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 = "评分")
    @TableField("score")
    private Double score;

    @ApiModelProperty(value = "其他评分")
    @TableField("other_score")
    private String otherScore;

//    @ApiModelProperty(value = "评论类型(1:评论(默认), 2:评价)")
//    @TableField("comment_type")
//    private Integer commentType;

    @ApiModelProperty(value = "是否匿名(0:否(默认), 1:是)")
    @TableField("is_anonymous")
    private Integer isAnonymous;

    @ApiModelProperty(value = "评价标签")
    @TableField("evaluation_tags")
    private String evaluationTags;

    @ApiModelProperty(value = "用户id")
    @TableField("phone_id")
    private String phoneId;

    @ApiModelProperty(value = "口味评分")
    @TableField("taste_score")
    private Double tasteScore;

    @ApiModelProperty(value = "环境评分")
    @TableField("en_score")
    private Double enScore;

    @ApiModelProperty(value = "服务评分")
    @TableField("service_score")
    private Double serviceScore;

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

    @ApiModelProperty(value = "律师id")
    @TableField("lawyer_id")
    private Integer lawyerId;

    @ApiModelProperty(value = "口味评分")
    @TableField("score_one")
    private Double scoreOne;

    @ApiModelProperty(value = "环境评分")
    @TableField("score_two")
    private Double scoreTwo;

    @ApiModelProperty(value = "服务评分")
    @TableField("score_three")
    private Double scoreThree;

}
