BaseEntity.java 1.16 KB
package com.huaheng.pc.common.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 基本实体类
 */
@Data
@ApiModel(value = "BseEntity")
public class BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 创建时间
     */
    @TableField(value = "created", fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建时间")
    private Date created;

    /**
     * 创建用户
     */
    @TableField(value = "createdBy", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value="创建用户")
    private String createdBy;

    /**
     * 更新时间
     */
    @TableField(value = "lastUpdated", fill = FieldFill.INSERT)
    @ApiModelProperty(value="更新时间")
    private Date lastUpdated;

    /**
     * 更新用户
     */
    @TableField(value = "lastUpdatedBy", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value="更新用户")
    private String lastUpdatedBy;
}