package org.dromara.work.domain.bo;

import org.dromara.work.domain.TpMessage;
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_message
 *
 * @author Maosw
 * @date 2025-04-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TpMessage.class, reverseConvertGenerate = false)
public class TpMessageBo extends BaseEntity {

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

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

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

    /**
     * 订单ID
     */
    private Long orderId;

    /**
     * 订单编号
     */
    private String orderNum;

    /**
     * 作品ID
     */
    private Long pictureId;

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

    /**
     * 消息类型  1-订单消息  2-互动消息
     */
    private Integer type;

    /**
     * 消息状态（1-已发送，2-已读）
     */
    private Integer status;

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


}
