package com.ruoyi.system.domain.communityNews;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 社区资讯对象 community_news
 * 
 * @author boman
 * @date 2025-02-14
 */
public class CommunityNews extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 社区资讯ID */
    private Long communityId;

    /** 社区资讯标题 */
    @Excel(name = "社区资讯标题")
    private String communityTitle;

    /** 社区资讯类型（1：公告 2：通知 3：资讯） */
    @Excel(name = "社区资讯类型", readConverterExp = "1=：公告,2=：通知,3=：资讯")
    private String communityType;

    /** 社区资讯内容 */
    @Excel(name = "社区资讯内容")
    private String communityContent;

    /** 社区资讯状态（0正常 1关闭） */
    @Excel(name = "社区资讯状态", readConverterExp = "0=正常,1=关闭")
    private String status;

    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishTime;

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

    /** 来源，记录资讯的来源（如单位、网站等） */
    @Excel(name = "来源，记录资讯的来源", readConverterExp = "如=单位、网站等")
    private String source;

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

    /** 浏览次数，记录资讯被查看的次数 */
    @Excel(name = "浏览次数，记录资讯被查看的次数")
    private Long viewCount;

    /** 是否置顶：Y（置顶）、N（不置顶） */
    @Excel(name = "是否置顶：Y", readConverterExp = "置=顶")
    private String isTop;

    public void setCommunityId(Long communityId) 
    {
        this.communityId = communityId;
    }

    public Long getCommunityId() 
    {
        return communityId;
    }
    public void setCommunityTitle(String communityTitle) 
    {
        this.communityTitle = communityTitle;
    }

    public String getCommunityTitle() 
    {
        return communityTitle;
    }
    public void setCommunityType(String communityType) 
    {
        this.communityType = communityType;
    }

    public String getCommunityType() 
    {
        return communityType;
    }
    public void setCommunityContent(String communityContent) 
    {
        this.communityContent = communityContent;
    }

    public String getCommunityContent() 
    {
        return communityContent;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setPublishTime(Date publishTime) 
    {
        this.publishTime = publishTime;
    }

    public Date getPublishTime() 
    {
        return publishTime;
    }
    public void setAuthor(String author) 
    {
        this.author = author;
    }

    public String getAuthor() 
    {
        return author;
    }
    public void setSource(String source) 
    {
        this.source = source;
    }

    public String getSource() 
    {
        return source;
    }
    public void setCoverImage(String coverImage) 
    {
        this.coverImage = coverImage;
    }

    public String getCoverImage() 
    {
        return coverImage;
    }
    public void setViewCount(Long viewCount) 
    {
        this.viewCount = viewCount;
    }

    public Long getViewCount() 
    {
        return viewCount;
    }
    public void setIsTop(String isTop) 
    {
        this.isTop = isTop;
    }

    public String getIsTop() 
    {
        return isTop;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("communityId", getCommunityId())
            .append("communityTitle", getCommunityTitle())
            .append("communityType", getCommunityType())
            .append("communityContent", getCommunityContent())
            .append("status", getStatus())
            .append("publishTime", getPublishTime())
            .append("author", getAuthor())
            .append("source", getSource())
            .append("coverImage", getCoverImage())
            .append("viewCount", getViewCount())
            .append("isTop", getIsTop())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
