79 lines
1.9 KiB
Java
79 lines
1.9 KiB
Java
package tech.riemann.ims.entity;
|
|
|
|
import cn.idev.excel.annotation.ExcelIgnore;
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Builder.Default;
|
|
import lombok.Data;
|
|
import lombok.EqualsAndHashCode;
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.experimental.Accessors;
|
|
import lombok.experimental.SuperBuilder;
|
|
import org.nutz.dao.entity.annotation.Column;
|
|
import org.nutz.dao.entity.annotation.Comment;
|
|
import org.nutz.dao.entity.annotation.Id;
|
|
import org.nutz.spring.boot.service.entity.Entity;
|
|
|
|
import java.io.Serial;
|
|
import java.time.LocalDateTime;
|
|
|
|
/**
|
|
*
|
|
* @author Kerbores(kerbores@gmail.com)
|
|
*
|
|
*/
|
|
@Data
|
|
@SuperBuilder
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
@Accessors(chain = true)
|
|
@EqualsAndHashCode(callSuper = true)
|
|
public class IdBaseEntity extends Entity {
|
|
|
|
/**
|
|
*
|
|
*/
|
|
@Serial
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
@Id
|
|
@TableId(type = IdType.AUTO)
|
|
@ExcelIgnore
|
|
private Long id;
|
|
|
|
@Column("created_time")
|
|
@Comment("创建时间")
|
|
@TableField("created_time")
|
|
@Default
|
|
@ExcelIgnore
|
|
protected LocalDateTime createdTime = LocalDateTime.now();
|
|
|
|
@Column("updated_time")
|
|
@TableField("updated_time")
|
|
@Comment("最后更新时间")
|
|
@Default
|
|
@ExcelIgnore
|
|
protected LocalDateTime updatedTime = LocalDateTime.now();
|
|
|
|
@Schema(description = "创建人")
|
|
@Column("created_by")
|
|
@TableField("created_by")
|
|
@Comment("创建人")
|
|
@JsonIgnore
|
|
@ExcelIgnore
|
|
protected String createdBy;
|
|
|
|
@Schema(description = "更新人")
|
|
@Column("updated_by")
|
|
@TableField("updated_by")
|
|
@Comment("更新人")
|
|
@JsonIgnore
|
|
@ExcelIgnore
|
|
protected String updatedBy;
|
|
|
|
}
|