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;<-:create" json:"createdBy"`
LastModifiedBy string `gorm:"column:last_modified_by;<-:update" json:"lastModifiedBy,omitempty"`
}
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;<-:create" json:"createdBy"`
LastModifiedBy string `gorm:"lastModified_by;<-:update" json:"lastModifiedBy,omitempty"`
}
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:"deletedTime,omitempty"`
DeletedBy string `gorm:"column:deleted_by" json:"deletedBy,omitempty"`
}
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:"deletedTime,omitempty"`
DeletedBy string `gorm:"column:deleted_by" json:"deletedBy,omitempty"`
}
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;<-:create" json:"createdTime"`
LastModifiedTime *time.Time `gorm:"column:last_modified_time;autoUpdateTime;<-:update" json:"lastModifiedTime,omitempty"`
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;<-:create" json:"createdTime"`
LastModifiedTime *time.Time `gorm:"column:last_modified_time;autoUpdateTime;<-:update" json:"lastModifiedTime,omitempty"`
TenantId string `gorm:"column:tenant_id" json:"tenantId"`
}
Click to show internal directories.
Click to hide internal directories.