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

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 用户须知模板表 Entity
 *
 * @author zhanghaijun
 * @date 2021-06-30 15:43:25
 */
@Data
@TableName("edu_product_model")
public class EduProductModel {

    @TableId(value = "model_id", type = IdType.AUTO)
    private Long modelId;

    /**
     * 默认0=应用型商品模板，其他类型暂时保留
     */
    @TableField("model_type")
    private String modelType;

    /**
     * 模板名称
     */
    @TableField("model_name")
    private String modelName;

    /**
     * 模板内容
     */
    @TableField("model_content")
    private String modelContent;

    /**
     * 是否删除，	1删除0未删除默认0
     */
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    /**
     * 创建时间
     */
    @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 = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    /**
     * 修改时间
     */
    @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;

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

    /**
     * 创建人部门id
     */
    private Long createDeptId;

    @ApiModelProperty("创建人名称")
    private transient String createName;
}