package org.dromara.system.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysAgreement;

/**
 * 协议信息业务对象 sys_agreement
 *
 * @author Lion Li
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysAgreement.class, reverseConvertGenerate = false)
public class SysAgreementBo extends BaseEntity {

    /**
     * 协议ID（修改时必填）
     */
    @NotNull(message = "协议ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 协议标题
     */
    @NotBlank(message = "协议标题不能为空")
    @Size(min = 1, max = 100, message = "协议标题长度不能超过{max}个字符")
    private String title;

    /**
     * 协议内容（前端传入 base64 编码的 HTML 富文本）
     */
    @NotBlank(message = "协议内容不能为空")
    private String content;

}
