A:数据库初始化,并增加User表示例

This commit is contained in:
jimmy committed 2025-06-15 17:37:31 +08:00
1 parent da2222f2d9
commit b8dc199cff
15 files changed
+1459 -108

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
package model
import (
"gorm.io/gorm"
"time"
)
// BaseModel 基础模型,包含通用字段
type BaseModel struct {
ID uint `gorm:"primaryKey" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
IsDeleted bool `json:"is_deleted"`
}