Documentation ¶
Index ¶
- type AuditingEnabled
- type AuditingEntity
- type AuditingModel
- type DeletableEntity
- type DeletableModel
- type DeleteEnabled
- type Entity
- type Model
- type Parameter
- type Parameters
- func (Parameters) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (Parameters) GormDataType() string
- func (js Parameters) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (j Parameters) MarshalJSON() ([]byte, error)
- func (j Parameters) Parameter(name string) *Parameter
- func (j *Parameters) Scan(value interface{}) error
- func (j Parameters) String() string
- func (j *Parameters) UnmarshalJSON(b []byte) error
- func (j Parameters) Value() (driver.Value, error)
- type ParametersEnabled
- type Properties
- func (Properties) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (Properties) GormDataType() string
- func (js Properties) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (j Properties) MarshalJSON() ([]byte, error)
- func (j Properties) Property(name string) *Property
- func (j *Properties) Scan(value interface{}) error
- func (j Properties) String() string
- func (j *Properties) UnmarshalJSON(b []byte) error
- func (j Properties) Value() (driver.Value, error)
- type PropertiesEnabled
- type Property
- type Relation
- type TenantEnabled
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditingEnabled ¶ added in v0.0.15
type AuditingEnabled struct { CreatedBy string `gorm:"column:created_by;<-:create" json:"createdBy"` CreatedTime time.Time `gorm:"column:created_time;autoCreateTime;<-:create" json:"createdTime"` LastModifiedBy string `gorm:"column:last_modified_by;<-:update" json:"lastModifiedBy,omitempty"` LastModifiedTime *time.Time `gorm:"column:last_modified_time;autoUpdateTime;<-:update" json:"lastModifiedTime,omitempty"` }
func (*AuditingEnabled) BeforeCreate ¶ added in v0.0.15
func (m *AuditingEnabled) BeforeCreate(tx *gorm.DB) (err error)
func (*AuditingEnabled) BeforeSave ¶ added in v0.0.15
func (m *AuditingEnabled) BeforeSave(tx *gorm.DB) (err error)
type AuditingEntity ¶
type AuditingEntity struct { Entity AuditingEnabled TenantEnabled }
func (*AuditingEntity) BeforeCreate ¶ added in v0.0.3
func (e *AuditingEntity) BeforeCreate(tx *gorm.DB) (err error)
func (*AuditingEntity) BeforeSave ¶ added in v0.0.3
func (e *AuditingEntity) BeforeSave(tx *gorm.DB) (err error)
type AuditingModel ¶
type AuditingModel struct { Model AuditingEnabled TenantEnabled }
func (*AuditingModel) BeforeCreate ¶ added in v0.0.3
func (e *AuditingModel) BeforeCreate(tx *gorm.DB) (err error)
func (*AuditingModel) BeforeSave ¶ added in v0.0.3
func (e *AuditingModel) BeforeSave(tx *gorm.DB) (err error)
type DeletableEntity ¶
type DeletableEntity struct { Entity AuditingEnabled TenantEnabled DeleteEnabled }
func (*DeletableEntity) BeforeCreate ¶ added in v0.0.15
func (e *DeletableEntity) BeforeCreate(tx *gorm.DB) (err error)
func (*DeletableEntity) BeforeSave ¶ added in v0.0.3
func (e *DeletableEntity) BeforeSave(tx *gorm.DB) (err error)
type DeletableModel ¶
type DeletableModel struct { Model AuditingEnabled TenantEnabled DeleteEnabled }
func (*DeletableModel) BeforeCreate ¶ added in v0.0.15
func (e *DeletableModel) BeforeCreate(tx *gorm.DB) (err error)
func (*DeletableModel) BeforeSave ¶ added in v0.0.3
func (e *DeletableModel) BeforeSave(tx *gorm.DB) (err error)
type DeleteEnabled ¶ added in v0.0.15
type DeleteEnabled struct { 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 (*DeleteEnabled) BeforeSave ¶ added in v0.0.15
func (m *DeleteEnabled) BeforeSave(tx *gorm.DB) (err error)
type Entity ¶
type Entity struct {
Id string `gorm:"column:id;primaryKey" json:"id" primaryKey:"yes"`
}
type Parameters ¶ added in v0.0.15
type Parameters []*Parameter
Properties
func (Parameters) GormDBDataType ¶ added in v0.0.15
GormDBDataType gorm db data type
func (Parameters) GormDataType ¶ added in v0.0.15
func (Parameters) GormDataType() string
GormDataType gorm common data type
func (Parameters) MarshalJSON ¶ added in v0.0.15
func (j Parameters) MarshalJSON() ([]byte, error)
MarshalJSON to output non base64 encoded []byte
func (Parameters) Parameter ¶ added in v0.0.15
func (j Parameters) Parameter(name string) *Parameter
Value return json value, implement driver.Valuer interface
func (*Parameters) Scan ¶ added in v0.0.15
func (j *Parameters) Scan(value interface{}) error
Scan scan value into Jsonb, implements sql.Scanner interface
func (Parameters) String ¶ added in v0.0.15
func (j Parameters) String() string
func (*Parameters) UnmarshalJSON ¶ added in v0.0.15
func (j *Parameters) UnmarshalJSON(b []byte) error
UnmarshalJSON to deserialize []byte
type ParametersEnabled ¶ added in v0.0.15
type ParametersEnabled struct {
Parameters *Parameters `gorm:"column:parameters;type:json" json:"parameters,omitempty"` /* 扩展信息 */
}
func (*ParametersEnabled) AddParameter ¶ added in v0.0.15
func (p *ParametersEnabled) AddParameter(name string) *Parameter
func (*ParametersEnabled) Parameter ¶ added in v0.0.15
func (p *ParametersEnabled) Parameter(name string) *Parameter
func (*ParametersEnabled) SetParameter ¶ added in v0.0.15
func (p *ParametersEnabled) SetParameter(name string, defaultValue string)
type Properties ¶ added in v0.0.15
type Properties map[string]interface{}
Properties
func (Properties) GormDBDataType ¶ added in v0.0.15
GormDBDataType gorm db data type
func (Properties) GormDataType ¶ added in v0.0.15
func (Properties) GormDataType() string
GormDataType gorm common data type
func (Properties) MarshalJSON ¶ added in v0.0.15
func (j Properties) MarshalJSON() ([]byte, error)
MarshalJSON to output non base64 encoded []byte
func (Properties) Property ¶ added in v0.0.15
func (j Properties) Property(name string) *Property
Value return json value, implement driver.Valuer interface
func (*Properties) Scan ¶ added in v0.0.15
func (j *Properties) Scan(value interface{}) error
Scan scan value into Jsonb, implements sql.Scanner interface
func (Properties) String ¶ added in v0.0.15
func (j Properties) String() string
func (*Properties) UnmarshalJSON ¶ added in v0.0.15
func (j *Properties) UnmarshalJSON(b []byte) error
UnmarshalJSON to deserialize []byte
type PropertiesEnabled ¶ added in v0.0.15
type PropertiesEnabled struct {
Properties *Properties `gorm:"column:properties;type:json" json:"properties,omitempty" i18n:"yes"` /* 扩展信息 */
}
func (*PropertiesEnabled) Property ¶ added in v0.0.15
func (p *PropertiesEnabled) Property(name string) *Property
func (*PropertiesEnabled) SetProperty ¶ added in v0.0.15
func (p *PropertiesEnabled) SetProperty(name string, value interface{})
type Property ¶ added in v0.0.15
type Relation ¶
type Relation struct {
AuditingEnabled
}
type TenantEnabled ¶ added in v0.0.15
type TenantEnabled struct {
TenantId string `gorm:"column:tenant_id" json:"tenantId"`
}
func (*TenantEnabled) BeforeCreate ¶ added in v0.0.15
func (m *TenantEnabled) BeforeCreate(tx *gorm.DB) (err error)
Click to show internal directories.
Click to hide internal directories.