This commit is contained in:
huangjin
2026-06-29 17:34:59 +08:00
commit fe3ad20fe2
271 changed files with 51767 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
package model
import (
"time"
"gorm.io/gorm"
)
// BaseModel 基础模型,所有表内嵌此结构,提供 ID、时间戳、软删除
type BaseModel struct {
ID uint `gorm:"primarykey;comment:主键ID" json:"id"`
CreatedAt time.Time `gorm:"comment:创建时间" json:"created_at"`
UpdatedAt time.Time `gorm:"comment:更新时间" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index;comment:删除时间(软删除)" json:"deleted_at,omitempty"`
}