|
@@ -17,14 +17,12 @@ package com.baomidou.mybatisplus.test.h2.entity.persistent;
|
|
|
|
|
|
import java.io.Serializable;
|
|
import java.io.Serializable;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
-import java.sql.Timestamp;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.annotations.TableField;
|
|
import com.baomidou.mybatisplus.annotations.TableField;
|
|
-import com.baomidou.mybatisplus.annotations.TableId;
|
|
|
|
import com.baomidou.mybatisplus.annotations.TableName;
|
|
import com.baomidou.mybatisplus.annotations.TableName;
|
|
import com.baomidou.mybatisplus.annotations.Version;
|
|
import com.baomidou.mybatisplus.annotations.Version;
|
|
import com.baomidou.mybatisplus.enums.FieldFill;
|
|
import com.baomidou.mybatisplus.enums.FieldFill;
|
|
-import com.baomidou.mybatisplus.enums.IdType;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.test.h2.entity.SuperEntity;
|
|
|
|
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
import lombok.experimental.Accessors;
|
|
import lombok.experimental.Accessors;
|
|
@@ -40,15 +38,15 @@ import lombok.experimental.Accessors;
|
|
@Data
|
|
@Data
|
|
@Accessors(chain = true)
|
|
@Accessors(chain = true)
|
|
@TableName("h2user")
|
|
@TableName("h2user")
|
|
-public class H2UserMetaObj implements Serializable {
|
|
|
|
|
|
+public class H2UserMetaObj extends SuperEntity implements Serializable {
|
|
|
|
|
|
/* 表字段注解,false 表中不存在的字段,可无该注解 默认 true */
|
|
/* 表字段注解,false 表中不存在的字段,可无该注解 默认 true */
|
|
@TableField(exist = false)
|
|
@TableField(exist = false)
|
|
private static final long serialVersionUID = 1L;
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
/* 主键ID 注解,value 字段名,type 用户输入ID */
|
|
/* 主键ID 注解,value 字段名,type 用户输入ID */
|
|
- @TableId(value = "test_id", type = IdType.AUTO)
|
|
|
|
- private Long id;
|
|
|
|
|
|
+// @TableId(value = "test_id", type = IdType.AUTO)
|
|
|
|
+// private Long id;
|
|
|
|
|
|
/* 测试忽略验证 */
|
|
/* 测试忽略验证 */
|
|
private String name;
|
|
private String name;
|
|
@@ -66,8 +64,8 @@ public class H2UserMetaObj implements Serializable {
|
|
|
|
|
|
@Version
|
|
@Version
|
|
private Integer version;
|
|
private Integer version;
|
|
- @TableField(value = "last_updated_dt",fill = FieldFill.UPDATE)
|
|
|
|
- private Timestamp lastUpdatedDt;
|
|
|
|
|
|
+// @TableField(value = "last_updated_dt",fill = FieldFill.UPDATE)
|
|
|
|
+// private Timestamp lastUpdatedDt;
|
|
|
|
|
|
|
|
|
|
public H2UserMetaObj() {
|
|
public H2UserMetaObj() {
|
|
@@ -88,17 +86,17 @@ public class H2UserMetaObj implements Serializable {
|
|
}
|
|
}
|
|
|
|
|
|
public H2UserMetaObj(Long id, String name) {
|
|
public H2UserMetaObj(Long id, String name) {
|
|
- this.id = id;
|
|
|
|
|
|
+ this.setId(id);
|
|
this.name = name;
|
|
this.name = name;
|
|
}
|
|
}
|
|
|
|
|
|
public H2UserMetaObj(Long id, Integer age) {
|
|
public H2UserMetaObj(Long id, Integer age) {
|
|
- this.id = id;
|
|
|
|
|
|
+ this.setId(id);
|
|
this.age = age;
|
|
this.age = age;
|
|
}
|
|
}
|
|
|
|
|
|
public H2UserMetaObj(Long id, String name, Integer age, Integer testType) {
|
|
public H2UserMetaObj(Long id, String name, Integer age, Integer testType) {
|
|
- this.id = id;
|
|
|
|
|
|
+ this.setId(id);
|
|
this.name = name;
|
|
this.name = name;
|
|
this.age = age;
|
|
this.age = age;
|
|
this.testType = testType;
|
|
this.testType = testType;
|