2025-03-27 16:27:41 +08:00

16 lines
320 B
Go

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:"-"`
}