Files
micro_layout/internal/storage/model/base.go
T
2026-11-11 17:49:38 +08:00

11 lines
408 B
Go

package model
import "gorm.io/plugin/soft_delete"
type BaseModel struct {
ID int64 `json:"id" gorm:"primaryKey;autoIncrement"`
CreatedAt int64 `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt int64 `json:"updated_at" gorm:"autoUpdateTime"`
DeletedAt soft_delete.DeletedAt `json:"deleted_at" gorm:"softDelete:second;not null;default:0;index"`
}