package
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Mar 2, 2026
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package types provides common database types and models
used across database operations.
type BaseModel struct {
ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()"`
CreatedAt time.Time `gorm:"autoCreateTime"`
UpdatedAt time.Time `gorm:"autoUpdateTime"`
DeletedAt gorm.DeletedAt `gorm:"index"`
}
BaseModel contains common fields for all database models.
BeforeCreate generates a UUID if not already set.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.