domain

package
v0.0.31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

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"`
}

func (*Entity) BeforeCreate

func (e *Entity) BeforeCreate(tx *gorm.DB) (err error)

type Model

type Model struct {
	Id int64 `gorm:"primaryKey" json:"id" primaryKey:"yes"`
}

func (*Model) BeforeCreate

func (m *Model) BeforeCreate(tx *gorm.DB) (err error)

type Parameter added in v0.0.15

type Parameter struct {
	Name         string `json:"name"`
	Type         string `json:"type,omitempty"`
	Description  string `json:"description,omitempty"`
	Value        string `json:"value,omitempty"`
	DefaultValue string `json:"defaultValue,omitempty"`
}

type Parameters added in v0.0.15

type Parameters []*Parameter

Properties

func (Parameters) GormDBDataType added in v0.0.15

func (Parameters) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (Parameters) GormDataType added in v0.0.15

func (Parameters) GormDataType() string

GormDataType gorm common data type

func (Parameters) GormValue added in v0.0.15

func (js Parameters) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

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

func (Parameters) Value added in v0.0.15

func (j Parameters) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

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

func (Properties) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (Properties) GormDataType added in v0.0.15

func (Properties) GormDataType() string

GormDataType gorm common data type

func (Properties) GormValue added in v0.0.15

func (js Properties) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

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

func (Properties) Value added in v0.0.15

func (j Properties) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

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 Property struct {
	Name         string      `json:"name"`
	Description  string      `json:"description"`
	Scope        string      `json:"scope"` /* 作用范围:USER、ADMIN、ALL */
	Value        interface{} `json:"value"`
	DefaultValue interface{} `json:"defaultValue"`
}

func (*Property) AsBool added in v0.0.15

func (p *Property) AsBool() bool

func (*Property) AsInt added in v0.0.15

func (p *Property) AsInt() int

func (*Property) AsString added in v0.0.15

func (p *Property) AsString() string

func (*Property) Default added in v0.0.15

func (p *Property) Default(v interface{}) *Property

func (*Property) GetValue added in v0.0.15

func (p *Property) GetValue() interface{}

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL