package com.xjrsoft.module.oa.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.yulichang.annotation.EntityMapping;
import com.xjrsoft.common.model.base.AuditEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 新闻中心表
 * </p>
 *
 * @author zlf
 * @since 2022-06-16
 */
@TableName("xjr_oa_news")
@ApiModel(value = "OaNews对象", description = "新闻中心表")
@Data
@EqualsAndHashCode(callSuper = false)
public class News extends AuditEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("新闻主键")
    private Long id;

    @ApiModelProperty("类型（1-新闻2-公告）")
    private Integer typeId;

    @ApiModelProperty("班级(base_class)")
    private Long classId;

    @ApiModelProperty("状态 1=未发布 2=已发布 3=下架")
    private Integer status;

    @ApiModelProperty("所属类别主键")
    private Long categoryId;

    @ApiModelProperty("所属类别")
    private String category;

    @ApiModelProperty("完整标题")
    private String fullHead;

    @ApiModelProperty("标题颜色")
    private String fullHeadColor;

    @ApiModelProperty("简略标题")
    private String briefHead;

    @ApiModelProperty("作者")
    private String authorName;

    @ApiModelProperty("编辑")
    private String compileName;

    @ApiModelProperty("Tag词")
    private String tagWord;

    @ApiModelProperty("关键字")
    private String keyword;

    @ApiModelProperty("来源")
    private String sourceName;

    @ApiModelProperty("来源地址")
    private String sourceAddress;

    @ApiModelProperty("新闻内容")
    private String newsContent;

    @ApiModelProperty("浏览量")
    private Integer pv;

    @ApiModelProperty("发布时间")
    private LocalDateTime releaseTime;

    @ApiModelProperty("排序码")
    private Integer sortCode;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("紧急程度  1=一般 2=紧急")
    private Integer emergent;

    @ApiModelProperty("发送部门")
    private Long sendDeptId;

    @ApiModelProperty("张贴开起时间")
    private LocalDateTime sendStartDate;

    @ApiModelProperty("张贴结束时间")
    private LocalDateTime sendEndDate;

    @ApiModelProperty("接收人回复要求 1=必须回复 2=不允许回复 3=可以回复 (不强制要求)")
    private Integer openReply;

    @ApiModelProperty("是否允许接收人转发 0=不能转发 1=允许转发")
    private Integer openForward;

    @ApiModelProperty("是否允许接收人查看其他接收人 0=不允许查看 1=允许查看")
    private Integer openViewOther;

    @ApiModelProperty("级别 1=校级 2=班级")
    private Integer level;

    @ApiModelProperty("发送范围 1=所有人 2=根据权限")
    private Integer sendRange;

    @ApiModelProperty("审核是否通过")
    private Integer wfStatus;

    /**
     * 附件子表
     */
    @ApiModelProperty("附件子表")
    @TableField(exist = false)
    @EntityMapping(thisField = "id", joinField = "newsId")
    private List<NewsAppendix> appendixList;
}
