Documentation
¶
Overview ¶
Package base provides base model definitions and common database operations Author: Done-0 Created: 2025-09-25
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
ID int64 `gorm:"primaryKey;type:bigint" json:"id"` // Primary key (snowflake)
CreatedAt int64 `gorm:"type:bigint" json:"created_at"` // Creation timestamp
UpdatedAt int64 `gorm:"type:bigint" json:"updated_at"` // Update timestamp
Ext JSONMap `gorm:"type:json" json:"ext"` // Extension fields
Deleted bool `gorm:"type:boolean;default:false" json:"deleted"` // Soft delete flag
}
Base contains common model fields
func (*Base) BeforeCreate ¶
BeforeCreate implements GORM hook
Click to show internal directories.
Click to hide internal directories.