This commit is contained in:
杭州明婳科技
2026-04-30 23:26:14 +08:00
commit 2dfcbbbb22
76 changed files with 17478 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
package model
import (
"time"
"gorm.io/gorm"
)
// 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:"-"`
}
// BaseModelWithTime 带时间戳的模型
type BaseModelWithTime struct {
ID uint `gorm:"primaryKey" json:"id"`
CreatedAt time.Time `gorm:"type:datetime" json:"created_at"`
UpdatedAt time.Time `gorm:"type:datetime" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
}