Files
doc_ai_backed/internal/storage/dao/base.go
liuyuanchuang 48e63894eb init repo
2025-12-10 18:33:37 +08:00

12 lines
430 B
Go

package dao
import (
"time"
)
type BaseModel struct {
ID int64 `gorm:"bigint;primaryKey;autoIncrement;column:id;comment:主键ID" json:"id"`
CreatedAt time.Time `gorm:"column:created_at;comment:创建时间;not null;default:current_timestamp" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;comment:更新时间;not null;default:current_timestamp on update current_timestamp" json:"updated_at"`
}