商品模块代码提交

This commit is contained in:
Tankaikai
2025-02-13 16:28:40 +08:00
parent 140f9344e0
commit 604387850e
3 changed files with 14 additions and 11 deletions

View File

@@ -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;
}