package com.storlead.framework.mybatis.entity;

import org.springframework.format.annotation.DateTimeFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import lombok.extern.log4j.Log4j2;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import lombok.Data;
import java.util.*;

/**
 * @program: sp-sales
 * @description:
 * @author: chenkq
 * @create: 2022-07-06 14:59
 */
@EqualsAndHashCode(callSuper = false)
@Log4j2
@Accessors(chain = true)
@Data
public class SysBaseField implements Serializable {

    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format ="yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "是否删除:1: 已删除 ,0: 未删除(默认)")
    private Integer isDelete;

    @ApiModelProperty(value = "是否启用(1:启用 0:禁用)")
    private Boolean enabled;

    @ApiModelProperty(value = "排序")
    private Integer sort;
}
