Documentation
¶
Index ¶
Constants ¶
View Source
const ( CLASSS_ENTITY string = "Entity" CLASSS_ENUM string = "Enum" CLASSS_ABSTRACT string = "Abstract" CLASS_VALUE_OBJECT string = "ValueObject" )
View Source
const ( QUERY string = "query" MUTATION string = "mutation" )
View Source
const ( INHERIT string = "inherit" TWO_WAY_ASSOCIATION string = "twoWayAssociation" TWO_WAY_AGGREGATION string = "twoWayAggregation" TWO_WAY_COMBINATION string = "twoWayCombination" ONE_WAY_ASSOCIATION string = "oneWayAssociation" //ONE_WAY_AGGREGATION string = "oneWayAggregation" ONE_WAY_COMBINATION string = "oneWayCombination" ZERO_ONE string = "0..1" ZERO_MANY string = "0..*" )
View Source
const ( ID string = "ID" INT string = "Int" FLOAT string = "Float" BOOLEAN string = "Boolean" STRING string = "String" DATE string = "Date" ENUM string = "Enum" JSON string = "JSON" VALUE_OBJECT string = "ValueObject" ENTITY string = "Entity" ID_ARRAY string = "ID[]" INT_ARRAY string = "Int[]" FLOAT_ARRAY string = "Float[]" STRING_ARRAY string = "String[]" DATE_ARRAY string = "Date[]" ENUM_ARRAY string = "EnumArray" VALUE_OBJECT_ARRAY string = "ValueObjectArray" ENTITY_ARRAY string = "EntityArray" PASSWORD string = "Password" UUID string = "Uuid" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssociationClass ¶
type AssociationClass struct {
Name string `json:"name"`
Attributes []AttributeMeta `json:"attributes"`
}
type AttributeMeta ¶
type AttributeMeta struct {
Uuid string `json:"uuid"`
Type string `json:"type"`
Primary bool `json:"primary"`
Name string `json:"name"`
Label string `json:"label"`
Nullable bool `json:"nullable"`
Default string `json:"default"`
Unique bool `json:"unique"`
Index bool `json:"index"`
CreateDate bool `json:"createDate"`
UpdateDate bool `json:"updateDate"`
DeleteDate bool `json:"deleteDate"`
Hidden bool `json:"hidden"`
Length int `json:"length"`
FloatM int `json:"floatM"` //M digits in total
FloatD int `json:"floatD"` //D digits may be after the decimal point
Unsigned bool `json:"unsigned"`
TypeUuid string `json:"typeUuid"`
Readonly bool `json:"readonly"`
Description string `json:"description"`
TypeLabel string `json:"typeLabel"`
System bool `json:"system"`
AutoIncrement bool `json:"autoIncrement"`
AutoGenerate bool `json:"autoGenerate"`
}
type ClassMeta ¶
type ClassMeta struct {
Uuid string `json:"uuid"`
InnerId uint64 `json:"innerId"`
Name string `json:"name"`
Label string `json:"label"`
StereoType string `json:"stereoType"`
Attributes []AttributeMeta `json:"attributes"`
Methods []MethodMeta `json:"methods"`
Root bool `json:"root"`
Description string `json:"description"`
SoftDelete bool `json:"softDelete"`
PackageUuid string `json:"packageUuid"`
OnCreated string `json:"onCreated"`
OnUpdated string `json:"onUpdated"`
OnDeleted string `json:"onDeleted"`
//生成表名时使用,运行时动态注入,不持久化
MetaId uint64
}
type MethodMeta ¶
type MethodMeta struct {
Uuid string `json:"uuid"`
Name string `json:"name"`
Type string `json:"type"`
TypeUuid string `json:"typeUuid"`
TypeLabel string `json:"typeLabel"`
Args []ArgMeta `json:"args"`
OperateType string `json:"operateType"` //mutation or query
Description string `json:"description"`
LogicMetas dsl.LogicFlowMeta `json:"logicMetas"`
LogicScript string `json:"logicScript"`
}
type Model ¶
type Model struct {
Classes []*ClassMeta
Relations []*RelationMeta
Codes []*CodeMeta
ScriptLogics []*MethodMeta
GraphLogics []*MethodMeta
APIs []*MethodMeta
}
func (*Model) GetAbstractClassByUuid ¶
func (*Model) GetClassByUuid ¶
type PackageMeta ¶
type RelationMeta ¶
type RelationMeta struct {
Uuid string `json:"uuid"`
InnerId uint64 `json:"innerId"`
RelationType string `json:"relationType"`
SourceId string `json:"sourceId"`
TargetId string `json:"targetId"`
RoleOfTarget string `json:"roleOfTarget"`
RoleOfSource string `json:"roleOfSource"`
LabelOfTarget string `json:"labelOfTarget"`
LabelOfSource string `json:"labelOfSource"`
DescriptionOnSource string `json:"descriptionOnSource"`
DescriptionOnTarget string `json:"descriptionOnTarget"`
SourceMutiplicity string `json:"sourceMutiplicity"`
TargetMultiplicity string `json:"targetMultiplicity"`
EnableAssociaitonClass bool `json:"enableAssociaitonClass"`
AssociationClass AssociationClass `json:"associationClass"`
System bool `json:"system"`
AppId uint64
}
func (*RelationMeta) IsAbsract ¶
func (r *RelationMeta) IsAbsract(m *Model) bool
type UMLMeta ¶
type UMLMeta struct {
//导出、导入文件时使用
//Id shared.ID `json:"id"`
Classes []ClassMeta `json:"classes"`
Relations []RelationMeta `json:"relations"`
Codes []CodeMeta `json:"codes"`
ScriptLogics []MethodMeta `json:"scriptLogics"` //脚本逻辑编排
GraphLogics []MethodMeta `json:"graphLogics"` //图形化逻辑编排
APIs []MethodMeta `json:"apis"` //用于生成服务接口
}
Click to show internal directories.
Click to hide internal directories.