package com.seer.teach.mall.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.seer.teach.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 商品评论
 * </p>
 *
 * @author Wang
 * @since 2025-07-03 13:53:33
 */
@Getter
@Setter
@TableName(value = "mall_goods_comment",autoResultMap = true)
@Schema(name = "GoodsCommentEntity对象", description = "商品评论")
public class GoodsCommentEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "评价人的用户id")
    @TableField("user_id")
    private Integer userId;

    @Schema(description = "评价人名称")
    @TableField("user_nickname")
    private String userNickname;

    @Schema(description = "评价人头像")
    @TableField("user_avatar")
    private String userAvatar;

    @Schema(description = "订单编号")
    @TableField("order_id")
    private Integer orderId;

    @Schema(description = "订单项编号")
    @TableField("order_item_id")
    private Integer orderItemId;

    @TableField("child_order_id")
    private Integer childOrderId;

    @TableField("merchant_id")
    private Long merchantId;

    @TableField("spu_id")
    private Integer spuId;

    @TableField("spu_name")
    private String spuName;

    @TableField("sku_id")
    private Integer skuId;

    @TableField("sku_pic_url")
    private String skuPicUrl;

    @Schema(description = "是否虚拟商品，Y:是 N:否")
    @TableField("is_real")
    private String isReal;

    @Schema(description = "是否匿名，Y:是 N:否")
    @TableField("is_anonymous")
    private String isAnonymous;

    @Schema(description = "是否可见，Y:显示 N:隐藏")
    @TableField("is_visible")
    private String isVisible;

    @Schema(description = "商家是否回复")
    @TableField("is_reply")
    private String isReply;

    @Schema(description = "评分星级1-5分")
    @TableField("scores")
    private Integer scores;

    @Schema(description = "描述星级 1-5 星")
    @TableField("description_scores")
    private Integer descriptionScores;

    @Schema(description = "服务星级 1-5 星")
    @TableField("benefit_scores")
    private Integer benefitScores;

    @Schema(description = "评论内容")
    @TableField("content")
    private String content;

    @Schema(description = "评论图片地址数组")
    @TableField(value = "pic_urls",typeHandler = JacksonTypeHandler.class)
    private List<String> picUrls;

    @Schema(description = "评论时间")
    @TableField("comment_time")
    private LocalDateTime commentTime;

    @Schema(description = "回复管理员id")
    @TableField("reply_user_id")
    private Integer replyUserId;

    @Schema(description = "商家回复内容")
    @TableField("reply_content")
    private String replyContent;

    @Schema(description = "商家回复时间")
    @TableField("reply_time")
    private LocalDateTime replyTime;


}