Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditingEntity ¶
type AuditingEntity struct {
Entity
CreatedBy string `gorm:"column:created_by" json:"createdBy"`
LastModifiedBy string `gorm:"column:last_modified_by" json:"lastModifiedBy"`
}
func (*AuditingEntity) BeforeCreate ¶ added in v0.0.3
func (m *AuditingEntity) BeforeCreate(tx *gorm.DB) (err error)
func (*AuditingEntity) BeforeSave ¶ added in v0.0.3
func (m *AuditingEntity) BeforeSave(tx *gorm.DB) (err error)
type AuditingModel ¶
type AuditingModel struct {
Model
CreatedBy string `gorm:"created_by" json:"createdBy"`
LastModifiedBy string `gorm:"lastModified_by" json:"lastModifiedBy"`
}
func (*AuditingModel) BeforeCreate ¶ added in v0.0.3
func (m *AuditingModel) BeforeCreate(tx *gorm.DB) (err error)
func (*AuditingModel) BeforeSave ¶ added in v0.0.3
func (m *AuditingModel) BeforeSave(tx *gorm.DB) (err error)
type DeletableEntity ¶
type DeletableEntity struct {
AuditingEntity
DelFlag bool `gorm:"column:del_flag;default:false" json:"delFlag"`
DeletedTime *time.Time `gorm:"column:deleted_time" json:"deleted_time"`
DeletedBy string `gorm:"column:deleted_by" json:"deleted_by"`
}
func (*DeletableEntity) BeforeSave ¶ added in v0.0.3
func (m *DeletableEntity) BeforeSave(tx *gorm.DB) (err error)
type DeletableModel ¶
type DeletableModel struct {
AuditingModel
DelFlag bool `gorm:"column:del_flag;default:false" json:"delFlag"`
DeletedTime *time.Time `gorm:"column:deleted_time" json:"deleted_time"`
DeletedBy string `gorm:"column:deleted_by" json:"deleted_by"`
}
func (*DeletableModel) BeforeSave ¶ added in v0.0.3
func (m *DeletableModel) BeforeSave(tx *gorm.DB) (err error)
type Entity ¶
type Entity struct {
Id string `gorm:"column:id;primaryKey" json:"id" primaryKey:"yes"`
CreatedTime time.Time `gorm:"column:created_time;autoCreateTime" json:"createdTime"`
LastModifiedTime *time.Time `gorm:"column:last_modified_time;autoUpdateTime" json:"lastModifiedTime"`
TenantId string `gorm:"column:tenant_id" json:"tenantId"`
}
type Model ¶
type Model struct {
Id int64 `gorm:"primaryKey" json:"id" primaryKey:"yes"`
CreatedTime time.Time `gorm:"column:created_time;autoCreateTime" json:"createdTime"`
LastModifiedTime *time.Time `gorm:"column:last_modified_time;autoUpdateTime" json:"lastModifiedTime"`
TenantId string `gorm:"column:tenant_id" json:"tenantId"`
}
Click to show internal directories.
Click to hide internal directories.