商品模块代码提交
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
package com.czg.product.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.core.keygen.KeyGenerators;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -25,7 +27,7 @@ public class ShopProdUnit implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id(keyType = KeyType.Auto)
|
||||
@Id(keyType = KeyType.Generator, value = KeyGenerators.snowFlakeId)
|
||||
private Long id;
|
||||
/**
|
||||
* 单位名称
|
||||
@@ -50,9 +52,11 @@ public class ShopProdUnit implements Serializable {
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
Reference in New Issue
Block a user