package com.storlead.sales.pojo.entity.customer;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.storlead.framework.annotate.AnnotateEnumType;
import com.storlead.framework.annotate.Dict;
import com.storlead.framework.annotate.OrgAutoMateAnnotate;
import com.storlead.framework.mybatis.entity.SysBaseField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 公告主表
 * </p>
 *
 * @author YPZ
 * @since 2024-10-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("bulletin")
@ApiModel(value="BulletinEntity对象", description="公告主表")
public class BulletinEntity extends SysBaseField {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公告id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "截止时间")
    @TableField("deadline_date")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deadlineDate;

    @ApiModelProperty(value = "标题")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "所属栏目（对应字典栏目value）")
    @TableField("column_value")
    @Dict(dictCode = "column_value",valueField = "columnName")
    private String columnValue;

    @ApiModelProperty(value = "内容")
    @TableField("content")
    private String content;

    @ApiModelProperty(value = "通知范围 1.全员 2.部分")
    @TableField("bulletin_type")
    private Integer bulletinType;

    @ApiModelProperty(value = "允许评论： 1.允许 2.不允许")
    @TableField("is_talk")
    private Integer isTalk;

    @ApiModelProperty(value = "提醒类型：site：站内，mail：邮件,sms：短信 ： 多个逗号分割")
    @Dict(dictCode = "task_remind_mode",valueField = "remindModeName",multiple = true)
    @TableField("remind_mode")
    private String remindMode;

    @ApiModelProperty(value = "通知时间")
    @TableField("notice_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime noticeTime;

    @ApiModelProperty(value = "通知人员")
    @TableField("notice_user_ids")
    @OrgAutoMateAnnotate(valueField = "noticeUserNames",multiple = true,annotateType = AnnotateEnumType.USER)
    private String noticeUserIds;

    @ApiModelProperty(value = "前拥有者")
    @TableField("former_owner_by")
    private Long formerOwnerBy;


}
