package com.yida.data.common.core.entity.school;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * 学校智慧迎新-须知
 *
 * @author ZYJ
 * @date 2021/8/19
 */
@Data
@TableName("edu_school_tips")
public class EduSchoolTips implements Serializable {

    private static final long serialVersionUID = -2123309192753945681L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建人id
     */
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    /**
     * 创建人时间
     */
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /**
     * 最后修改人id
     */
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    /**
     * 最后修改时间
     */
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

    /**
     * 删除标识. 0: 未删除, 1: 已删除
     */
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    /**
     * 须知页面标题
     */
    @TableField("title")
    private String title;

    /**
     * 发布时间
     */
    @TableField("publish_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date publishDate;

    /**
     * 发布状态. 0-待发布, 1-已发布
     */
    @TableField("status")
    private Byte status;

    /**
     * 学校id
     */
    @TableField("school_id")
    private Long schoolId;

    /**
     * 页面二维码地址
     */
    @TableField("qr_code_address")
    private String qrCodeAddress;

    /**
     * H5页面地址
     */
    @TableField("page_url")
    private String pageUrl;

    /**
     * 须知内容(富文本内容)
     */
    @TableField("content")
    private String content;
}
