Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct {
Id uuid.UUID `json:"id" gorm:"primarykey"`
// Object string `json:"object"`
Metadata JSONB `json:"metadata,omitempty" gorm:"default:null"`
CreatedAt time.Time `json:"created_at,omitempty" gorm:"column:created_at;type:timestamp with time zone;not null"`
UpdatedAt time.Time `json:"updated_at,omitempty" gorm:"column:updated_at;type:timestamp with time zone;not null"`
}
type FilterModel ¶
type JSONB ¶
type JSONB map[string]interface{}
JSONB Interface for JSONB Field of yourTableName Table
type NumberModel ¶
type SoftDeletableModel ¶
type SoftDeletableModel struct {
Id uuid.UUID `json:"id" gorm:"primarykey"`
Metadata JSONB `json:"metadata,omitempty" gorm:"default:null"`
CreatedAt time.Time `json:"created_at,omitempty" gorm:"column:created_at;type:timestamp with time zone;not null"`
UpdatedAt time.Time `json:"updated_at,omitempty" gorm:"column:updated_at;type:timestamp with time zone;not null"`
DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"column:deleted_at;index;type:timestamp with time zone"`
}
func (*SoftDeletableModel) BeforeCreate ¶
func (m *SoftDeletableModel) BeforeCreate(tx *gorm.DB) (err error)
func (*SoftDeletableModel) BeforeUpdate ¶
func (m *SoftDeletableModel) BeforeUpdate(tx *gorm.DB) (err error)
func (*SoftDeletableModel) ParseUUID ¶
func (m *SoftDeletableModel) ParseUUID(id string) (err error)
type StringModel ¶
Click to show internal directories.
Click to hide internal directories.