This repository has been archived on 2026-06-21. You can view files and clone it, but cannot push or open issues or pull requests.
Files
MetaLab/internal/model/common.go

16 lines
329 B
Go

package model
import (
"time"
"gorm.io/gorm"
)
// BaseModel 所有模型的公共字段
type BaseModel struct {
ID uint `gorm:"primarykey;column:uid" json:"uid"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
}