domain

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 4 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" json:"createdBy"`
	LastModifiedBy string `gorm:"column:last_modified_by" json:"lastModifiedBy"`
}

type AuditingModel

type AuditingModel struct {
	Model
	CreatedBy      string `gorm:"created_by" json:"createdBy"`
	LastModifiedBy string `gorm:"lastModified_by" json:"lastModifiedBy"`
}

type DeletableEntity

type DeletableEntity struct {
	AuditingEntity
	DelFlag     bool      `gorm:"column:del_flag;default:false" json:"delFlag"`
	DeletedTime time.Time `gorm:"column:deleted_time;autoUpdateTime" json:"deleted_time"`
	DeletedBy   string    `gorm:"column:deleted_by" json:"deleted_by"`
}

type DeletableModel

type DeletableModel struct {
	AuditingModel
	DelFlag     bool      `gorm:"column:del_flag;default:false" json:"delFlag"`
	DeletedTime time.Time `gorm:"column:deleted_time;autoUpdateTime" json:"deleted_time"`
	DeletedBy   string    `gorm:"column:deleted_by" json:"deleted_by"`
}

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

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" json:"createdTime"`
	LastModifiedTime time.Time `gorm:"column:last_modified_time;autoUpdateTime" json:"lastModifiedTime"`
	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" json:"createdTime"`
	LastModifiedTime time.Time `gorm:"column:last_modified_time;autoUpdateTime" json:"lastModifiedTime"`
}

Jump to

Keyboard shortcuts

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