package org.dromara.work.domain.bo;

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

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

    /**
     * 分类  1-新闻  2-活动
     */
    private Integer type;

    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 封面图片
     */
    private String icon;

    /**
     * 图片集JSON
     */
    private String imgs;

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

    /**
     * 跳转地址
     */
    private String url;

    /**
     * 状态（1正常 0关闭）
     */
    private Integer status;

    /**
     * 排序
     */
    private Long sort;

    /**
     * 浏览量
     */
    private Long num;

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


}
