package com.ruoyi.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("dl_plan")
public class Plan {
    @TableId(value = "plan_id",type = IdType.ASSIGN_ID)
    private String planId;

    @TableField("plan_name")
    private String planName;

    @TableField("commercial_id")
    private String commercialId;
    @TableField("commercial_name")
    private String commercialName;
    @TableField("appkey")
    private String appkey;
    @TableField("app_name")
    private String appName;
    @TableField("goods_id")
    private String goodsId;
    @TableField("goods_img")
    private String goodsImg;
    @TableField("goods_name")
    private String goodsName;
    @TableField("goods_logo")
    private String goodsLogo;
    @TableField("goods_introduce")
    private String goodsIntroduce;
    @TableField("goods_price")
    private Float goodsPrice;
    @TableField("goods_classify")
    private String goodsClassify;
    @TableField("plan_create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime planCreateTime;
    @TableField("plan_start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime planStartTime;
    @TableField("plan_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime planEndTime;
    @TableField("state")
    private Integer state;

    @TableField("on_state")
    private Integer onState;
    @TableField("principal_name")
    private String principalName;
    @TableField("principal_telephone")
    private String principalTelephone;

    @TableField("show_delete")
    private Integer showDelete;
}
