package org.dromara.work.domain.bo;

import org.dromara.work.domain.TpComments;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 评论业务对象 tp_comments
 *
 * @author Maosw
 * @date 2025-04-12
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TpComments.class, reverseConvertGenerate = false)
public class TpCommentsBo extends BaseEntity {

    /**
     * ID
     */
    @NotNull(message = "ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 作品动态ID
     */
    @NotNull(message = "作品动态ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long pictureId;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 被回复用户
     */
    @NotNull(message = "被回复用户不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long toUserId;

    /**
     * 父评论 ID
     */
    private Long parentId;

    /**
     * 评论内容
     */
    @NotBlank(message = "评论内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String content;

    /**
     * 点赞数
     */
    private Integer num;

    /**
     * 子评论数量
     */
    private Integer subset;

    /**
     * 类型  1-作品  2-动态
     */
    @NotNull(message = "类型  1-作品  2-动态不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer type;

    /**
     * 备注
     */
    private String remark;


    /**
     * 排序 1-降序  2-升序
     */
    private Integer orderBy;



}
