domain

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 5 Imported by: 0

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

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

func (*Model) BeforeCreate

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

type Relation

type Relation struct {
	CreatedTime      time.Time `gorm:"column:created_time;autoCreateTime;<-:create" json:"createdTime"`
	LastModifiedTime time.Time `gorm:"column:last_modified_time;autoUpdateTime;<-:update" json:"lastModifiedTime"`
}

Jump to

Keyboard shortcuts

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