package org.dromara.work.domain.vo;

import org.dromara.work.domain.TpNews;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 新闻活动视图对象 tp_news
 *
 * @author Maosw
 * @date 2025-04-12
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = TpNews.class)
public class TpNewsVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @ExcelProperty(value = "ID")
    private Long id;

    /**
     * 分类  1-新闻  2-活动
     */
    @ExcelProperty(value = "分类  1-新闻  2-活动")
    private Integer type;

    /**
     * 标题
     */
    @ExcelProperty(value = "标题")
    private String title;

    /**
     * 封面图片
     */
    @ExcelProperty(value = "封面图片")
    private String icon;

    /**
     * 图片集JSON
     */
    @ExcelProperty(value = "图片集JSON")
    private String imgs;

    /**
     * 内容
     */
    @ExcelProperty(value = "内容")
    private String content;

    /**
     * 跳转地址
     */
    @ExcelProperty(value = "跳转地址")
    private String url;

    /**
     * 状态（1正常 0关闭）
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "1=正常,0=关闭")
    private Integer status;

    /**
     * 排序
     */
    @ExcelProperty(value = "排序")
    private Long sort;

    /**
     * 浏览量
     */
    @ExcelProperty(value = "浏览量")
    private Long num;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;


}
