package com.huiju.estateagents.sample.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

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

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 开屏通知
 * </p>
 *
 * @author fxf
 * @since 2020-03-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TaNotice implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 通知id
     */
    @TableId(value = "notice_id", type = IdType.AUTO)
    private Integer noticeId;

    /**
     * 通知标题
     */
    private String title;

    /**
     * 通知图
     */
    private String noticeImg;

    /**
     * 关联业务类型 此版本固定sample
     */
    private String targetType;

    /**
     * 关联业务 此版本固定sample_id
     */
    private Integer targetId;

    /**
     * 关联业务名
     */
    @TableField(exist = false)
    private String targetName;

    /**
     * 状态 -1删除0是未发布1是已发布
     */
    private Integer status;

    /**
     * 创建时间
     */
    private LocalDateTime createDate;

    /**
     * 自动下架时间 每次查询的时候过滤，并更新status
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(strategy = FieldStrategy.IGNORED)
    private LocalDateTime invalidTime;

    /**
     * 权重
     */
    @TableField(strategy = FieldStrategy.IGNORED)
    private Integer orderNo;
}
