package jnpf.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jnpf.base.entity.SuperBaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author Created by wyr on 2023/7/20.
 **/
@Data
@Accessors(chain = true)
public class BaseInsertEntity {

    @Schema(description = "主键")
    @TableId("F_Id")
    private String id;

    @Schema(description = "创建用户")
    @TableField("F_CreatorUserId")
    private String creatorUserId;

    @Schema(description = "创建时间")
    @TableField(value = "F_CreatorTime", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date creatorTime;

    @Schema(description = "租户id")
    @TableField("F_TenantId")
    private String tenantId;
}
