package org.dromara.domain.partyNews.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.domain.partyNews.PartyNews;

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



/**
 * 党建资讯视图对象 party_news
 *
 * @author boman
 * @date 2025-04-11
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = PartyNews.class)
public class PartyNewsVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 资讯ID
     */
    @ExcelProperty(value = "资讯ID")
    private Long partyId;

    /**
     * 党建资讯标题
     */
    @ExcelProperty(value = "党建资讯标题")
    private String partyTitle;

    /**
     * 党建资讯类型（1：党建活动 2：党建学习3：党建知识）
     */
    @ExcelProperty(value = "党建资讯类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "1=：党建活动,2=：党建学习3：党建知识")
    private String partyType;

    /**
     * 党建资讯内容
     */
    @ExcelProperty(value = "党建资讯内容")
    private String partyContent;

    /**
     * 党建资讯状态（1正常 2关闭）
     */
    @ExcelProperty(value = "党建资讯状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "1=正常,2=关闭")
    private String status;

    /**
     * 发布时间
     */
    @ExcelProperty(value = "发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date publishTime;

    /**
     * 作者，记录资讯的发布者
     */
    @ExcelProperty(value = "作者，记录资讯的发布者")
    private String author;

    /**
     * 来源，记录资讯的来源（如单位、网站等）
     */
    @ExcelProperty(value = "来源，记录资讯的来源", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "如=单位、网站等")
    private String source;

    /**
     * 封面图片，存储图片路径或URL
     */
    @ExcelProperty(value = "封面图片，存储图片路径或URL")
    private String coverImage;

    /**
     * 封面图片，存储图片路径或URLUrl
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "coverImage")
    private String coverImageUrl;
    /**
     * 浏览次数，记录资讯被查看的次数
     */
    @ExcelProperty(value = "浏览次数，记录资讯被查看的次数")
    private Long viewCount;

    /**
     * 是否置顶：Y（置顶）、N（不置顶）
     */
    @ExcelProperty(value = "是否置顶：Y", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "置=顶")
    private String isTop;

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

    /** 是否收藏：Y（收藏）、N（不收藏） */
    private String isStars;

    /**
     * 收藏数量
     */
    private Integer starsCount;


}
