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

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.format.annotation.DateTimeFormat;

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

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 购买通知
 */
@ApiModel(value = "com-yida-data-common-core-entity-notice-EduNoticeBuy")
@Data
@TableName(value = "edu_notice_buy")
public class EduNoticeBuy {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "")
    private Long id;

    @ApiModelProperty(value = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createDate;

    @TableField(value = "create_id")
    @ApiModelProperty(value = "")
    private Long createId;

    @ApiModelProperty("创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createName;

    @ApiModelProperty(value = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateDate;

    @TableField(value = "update_id")
    @ApiModelProperty(value = "")
    private Long updateId;

    /**
     * 通知内容
     */
    @TableField(value = "content")
    @ApiModelProperty(value = "通知内容")
    private String content;

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

    /**
     * 学校名称
     */
    @TableField(value = "school_name")
    @ApiModelProperty(value = "学校名称")
    private String schoolName;

    /**
     * 校区id
     */
    @ApiModelProperty(value = "校区id")
    private Long campsId;

    /**
     * 校区名称
     */
    @ApiModelProperty(value = "校区名称")
    private String campsName;

    /**
     * 发送时间
     */
    @TableField(value = "send_date")
    @ApiModelProperty(value = "发送时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime sendDate;

    /**
     * 通知状态，0-待发送，1-已发送
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value = "通知状态，0-待发送，1-已发送")
    private Integer status;

    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    @TableField(exist = false)
    private EduNoticeBuyProduct eduNoticeBuyProducts;

    @TableField(exist = false)
    private List<EduNoticeBuyReceiver> eduNoticeBuyReceivers;


}