domain

package
v0.0.61 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StandardSysOption = map[string]interface{}{
	"": "",
}

Functions

func OptionsToMap

func OptionsToMap(sysEnvs []Option) map[string]interface{}

Types

type ContentTemplate

type ContentTemplate struct {
	domain.AuditingEntity
	ContentTemplateInfo
}

func (*ContentTemplate) TableName

func (*ContentTemplate) TableName() string

type ContentTemplateInfo

type ContentTemplateInfo struct {
	domain.ParametersEnabled
	domain.PropertiesEnabled
	Name    string `gorm:"column:name" json:"name,omitempty" i18n:"true"`
	Title   string `gorm:"column:title" json:"title,omitempty" i18n:"true"`
	Type    string `gorm:"column:type" json:"type,omitempty"`
	Scene   string `gorm:"column:scene" json:"scene,omitempty"`
	Content string `gorm:"column:content" json:"content,omitempty" i18n:"true"`
	Status  int    `gorm:"column:status" json:"status"`
}

type CountryArea

type CountryArea struct {
	Code     string `gorm:"column:code" json:"code"`
	AreaCode int64  `gorm:"column:area_code" json:"areaCode"`
	Name     string `gorm:"column:name" json:"name"`
}

func (*CountryArea) TableName

func (*CountryArea) TableName() string

type Event

type Event struct {
	domain.DeletableModel
	EventInfo
	Read bool `gorm:"-" json:"read"`
}

func (*Event) TableName

func (*Event) TableName() string

type EventAccessLog

type EventAccessLog struct {
	UserId     string    `gorm:"column:user_id;primaryKey" json:"userId" primaryKey:"yes"`
	Action     string    `gorm:"column:action;primaryKey" json:"action" primaryKey:"yes"`
	AccessTime time.Time `gorm:"column:access_time;autoCreateTime;autoUpdateTime" json:"accessTime"`
}

func (*EventAccessLog) TableName

func (*EventAccessLog) TableName() string

type EventHistory

type EventHistory struct {
	Event
}

func (*EventHistory) TableName

func (*EventHistory) TableName() string

type EventInfo

type EventInfo struct {
	Source     string             `gorm:"column:source" json:"source"`
	SourceId   string             `gorm:"column:source_id" json:"sourceId"`
	Type       string             `gorm:"column:type" json:"type"`
	Target     string             `gorm:"column:target" json:"target"`
	Scope      string             `gorm:"column:scope" json:"scope"`
	Content    string             `gorm:"column:content" json:"content"`
	Status     int                `gorm:"column:status;default:1" json:"status"`
	Properties *domain.Properties `gorm:"column:properties;type:json" json:"properties,omitempty"`
}

type LocaleField

type LocaleField struct {
	*i18n.LocaleFieldValue
}

func (*LocaleField) TableName

func (*LocaleField) TableName() string

type Message

type Message struct {
	domain.DeletableModel
	MessageInfo
}

func (*Message) TableName

func (*Message) TableName() string

type MessageAccessLog

type MessageAccessLog struct {
	MessageId   int64     `gorm:"column:message_id;primaryKey" json:"messageId" primaryKey:"yes"`
	UserId      string    `gorm:"column:user_id;primaryKey" json:"userId" primaryKey:"yes"`
	Action      string    `gorm:"column:action;primaryKey" json:"action" primaryKey:"yes"`
	CreatedTime time.Time `gorm:"column:created_time;autoCreateTime;<-:create" json:"createdTime"`
}

func (*MessageAccessLog) TableName

func (*MessageAccessLog) TableName() string

type MessageHistory

type MessageHistory struct {
	Message
}

func (*MessageHistory) TableName

func (*MessageHistory) TableName() string

type MessageInfo

type MessageInfo struct {
	From      string     `gorm:"column:from" json:"from"`
	To        string     `gorm:"column:to" json:"to"`
	Scope     string     `gorm:"column:scope;default:TENANT" json:"scope"`
	Type      string     `gorm:"column:type;default:NOTICE" json:"type"`
	Title     string     `gorm:"column:title" json:"title" i18n:"yes"`
	Content   string     `gorm:"column:content" json:"content" i18n:"yes"`
	ValidTime *time.Time `gorm:"column:valid_time" json:"validTime"`
	DueTime   *time.Time `gorm:"column:due_time" json:"dueTime"`
	Status    int        `gorm:"column:status;default:1" json:"status"`
	Read      bool       `gorm:"column:read;->" json:"read"`
}

type OperationLog

type OperationLog struct {
	domain.Model
	OperatorId   string             `gorm:"column:operator_id" json:"operatorId"`
	Operation    string             `gorm:"column:operation" json:"operation"`
	Target       string             `gorm:"column:target" json:"target"`
	TargetId     string             `gorm:"column:target_id" json:"targetId"`
	Location     string             `gorm:"column:location" json:"location"`
	LocationId   string             `gorm:"column:location_id" json:"locationId"`
	Content      string             `gorm:"column:content" json:"content"`
	OperatedTime time.Time          `gorm:"column:operatedTime;autoCreateTime;->" json:"operatedTime"`
	Properties   *domain.Properties `gorm:"column:properties;type:json" json:"properties,omitempty"`
	TenantId     string             `gorm:"column:tenant_id" json:"tenantId"`
	Text         string             `gorm:"-" json:"text"` /* 组合文本 */
}

func NewOperationLog

func NewOperationLog(operation string) *OperationLog

func (OperationLog) TableName

func (OperationLog) TableName() string

func (*OperationLog) WithContent

func (o *OperationLog) WithContent(content string) *OperationLog

func (*OperationLog) WithLocation

func (o *OperationLog) WithLocation(location string, locationId interface{}) *OperationLog

func (*OperationLog) WithLocationEx

func (o *OperationLog) WithLocationEx(location interface{}) *OperationLog

func (*OperationLog) WithTarget

func (o *OperationLog) WithTarget(target string, targetId interface{}) *OperationLog

func (*OperationLog) WithTargetEx

func (o *OperationLog) WithTargetEx(target interface{}) *OperationLog

type Option

type Option struct {
	Name        string `gorm:"column:name" json:"name"`
	Value       string `gorm:"column:value" json:"value"`
	ValueType   string `gorm:"column:value_type" json:"valueType"`
	Description string `gorm:"column:description;default:null" json:"description"`
}

type SimpleMessage

type SimpleMessage struct {
	domain.DeletableModel
	From      string     `gorm:"column:from" json:"from"`
	To        string     `gorm:"column:to" json:"to"`
	Scope     string     `gorm:"column:scope;default:TENANT" json:"scope"`
	Type      string     `gorm:"column:type;default:NOTICE" json:"type"`
	Title     string     `gorm:"column:title" json:"title" i18n:"yes"`
	ValidTime *time.Time `gorm:"column:valid_time" json:"validTime"`
	DueTime   *time.Time `gorm:"column:due_time" json:"dueTime"`
	Status    int        `gorm:"column:status;default:1" json:"status"`
	Read      bool       `gorm:"column:read;->" json:"read"`
}

type SysOption

type SysOption struct {
	Option
	Public           bool      `gorm:"column:public" json:"public"`
	CreatedTime      time.Time `gorm:"column:created_time;autoCreateTime" json:"createdTime"`
	CreatedBy        string    `gorm:"column:created_by" json:"createdBy"`
	LastModifiedTime time.Time `gorm:"column:last_modified_time;autoUpdateTime" json:"lastModifiedTime"`
	LastModifiedBy   string    `gorm:"column:last_modified_by" json:"lastModifiedBy"`
	TenantId         string    `gorm:"column:tenant_id" json:"tenantId"`
}

func (*SysOption) TableName

func (*SysOption) TableName() string

type SysOptions

type SysOptions struct {
	TenantId string
	Options  map[string]SysOption
}

func (*SysOptions) GetOption

func (s *SysOptions) GetOption(name string) (string, bool)

func (*SysOptions) SetOption

func (s *SysOptions) SetOption(name string, value string) bool

type UserOption

type UserOption struct {
	Option
	UserId string `gorm:"column:user_id"`
}

func (*UserOption) TableName

func (*UserOption) TableName() string

type UserOptions

type UserOptions struct {
	UserId  string
	Options map[string]UserOption
}

func (*UserOptions) GetOption

func (s *UserOptions) GetOption(name string) (string, bool)

func (*UserOptions) SetOption

func (s *UserOptions) SetOption(name string, value string) bool

Jump to

Keyboard shortcuts

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