Documentation
¶
Index ¶
- Constants
- func NewAttributeColumn(attr *Attribute) *table.Column
- func NewEntityTable(entity *Entity) *table.Table
- func NewRelationTable(relation *Relation) *table.Table
- type ArgAssociation
- type ArgEntity
- type Association
- func (a *Association) Description() string
- func (a *Association) GetName() string
- func (a *Association) IsArray() bool
- func (a *Association) IsCombination() bool
- func (a *Association) IsSource() bool
- func (a *Association) Name() string
- func (a *Association) Owner() *Entity
- func (r *Association) OwnerColumn() *table.Column
- func (a *Association) Path() string
- func (r *Association) SourceColumn() *table.Column
- func (a *Association) Table() *table.Table
- func (r *Association) TargetColumn() *table.Column
- func (r *Association) TypeColumn() *table.Column
- func (a *Association) TypeEntity() *Entity
- type Attribute
- type Class
- func (c *Class) AddAssociation(a *Association)
- func (c *Class) AggregateName() string
- func (c *Class) DeleteByIdName() string
- func (c *Class) DeleteName() string
- func (c *Class) Description() string
- func (c *Class) InnerId() uint64
- func (c *Class) IsSoftDelete() bool
- func (c *Class) ListName() string
- func (c *Class) Name() string
- func (c *Class) QueryAggregateName() string
- func (c *Class) QueryName() string
- func (c *Class) QueryOneName() string
- func (c *Class) SetName() string
- func (c *Class) TableName() string
- func (c *Class) UpsertName() string
- func (c *Class) UpsertOneName() string
- func (c *Class) Uuid() string
- type Entity
- func (e *Entity) AllAttributeNames() []string
- func (e *Entity) AllAttributes() []*Attribute
- func (e *Entity) Associations() []*Association
- func (e *Entity) GetAssociationByName(name string) *Association
- func (e *Entity) GetAttributeByName(name string) *Attribute
- func (e *Entity) GetHasManyName() string
- func (e *Entity) GetHasOneName() string
- func (e *Entity) IsEmperty() bool
- type Enum
- type Ider
- type Interface
- func (f *Interface) AllAssociations() []*Association
- func (f *Interface) AllAttributeNames() []string
- func (f *Interface) AllAttributes() []*Attribute
- func (f *Interface) GetAssociationByName(name string) *Association
- func (f *Interface) GetAttributeByName(name string) *Attribute
- func (f *Interface) IsEmperty() bool
- type Model
- func (m *Model) GetEntityByInnerId(innerId uint64) *Entity
- func (m *Model) GetEntityByName(name string) *Entity
- func (m *Model) GetEntityByUuid(uuid string) *Entity
- func (m *Model) GetEnumByUuid(uuid string) *Enum
- func (m *Model) GetInterfaceByName(name string) *Interface
- func (m *Model) GetInterfaceByUuid(uuid string) *Interface
- func (m *Model) GetThirdPartyByName(name string) *ThirdParty
- func (m *Model) GetValueObjectByUuid(uuid string) *Class
- func (m *Model) RootEnities() []*Entity
- func (m *Model) RootInterfaces() []*Interface
- func (m *Model) Validate()
- type Propertier
- type QueryArg
- type Relation
- type ThirdParty
Constants ¶
View Source
const PREFIX_T string = "t"
Variables ¶
This section is empty.
Functions ¶
func NewAttributeColumn ¶
func NewEntityTable ¶
func NewRelationTable ¶
Types ¶
type ArgAssociation ¶
type ArgAssociation struct { Association *Association TypeArgEntity *ArgEntity }
type ArgEntity ¶
type ArgEntity struct { Id int Entity *Entity Associations []*ArgAssociation ExpressionArgs map[string]interface{} }
func BuildArgEntity ¶
func (*ArgEntity) GetAssociation ¶
func (a *ArgEntity) GetAssociation(name string) *ArgAssociation
func (*ArgEntity) GetWithMakeAssociation ¶
func (a *ArgEntity) GetWithMakeAssociation(name string, ider Ider) *ArgAssociation
type Association ¶
func NewAssociation ¶
func NewAssociation(r *Relation, ownerUuid string) *Association
func (*Association) Description ¶
func (a *Association) Description() string
func (*Association) GetName ¶
func (a *Association) GetName() string
func (*Association) IsArray ¶
func (a *Association) IsArray() bool
func (*Association) IsCombination ¶
func (a *Association) IsCombination() bool
if a.isNTo1() && !a.IsSource() && a.isOneWay() { return true } return false }
func (*Association) IsSource ¶
func (a *Association) IsSource() bool
func (*Association) Name ¶
func (a *Association) Name() string
func (*Association) Owner ¶
func (a *Association) Owner() *Entity
func (*Association) OwnerColumn ¶
func (r *Association) OwnerColumn() *table.Column
func (*Association) Path ¶
func (a *Association) Path() string
func (*Association) SourceColumn ¶
func (r *Association) SourceColumn() *table.Column
func (*Association) Table ¶
func (a *Association) Table() *table.Table
func (*Association) TargetColumn ¶
func (r *Association) TargetColumn() *table.Column
func (*Association) TypeColumn ¶
func (r *Association) TypeColumn() *table.Column
func (*Association) TypeEntity ¶
func (a *Association) TypeEntity() *Entity
type Attribute ¶
type Attribute struct { domain.Attribute Class *Class EumnType *Enum EnityType *Entity ValueObjectType *Class }
func (*Attribute) GetEnityType ¶
func (*Attribute) GetEumnType ¶
type Class ¶
func (*Class) AddAssociation ¶
func (c *Class) AddAssociation(a *Association)
func (*Class) AggregateName ¶
func (*Class) DeleteByIdName ¶
func (*Class) DeleteName ¶
func (*Class) Description ¶
func (*Class) IsSoftDelete ¶
func (*Class) QueryAggregateName ¶
func (*Class) QueryOneName ¶
func (*Class) UpsertName ¶
func (*Class) UpsertOneName ¶
type Entity ¶
func (*Entity) AllAttributeNames ¶
func (*Entity) Associations ¶
func (e *Entity) Associations() []*Association
func (*Entity) GetAssociationByName ¶
func (e *Entity) GetAssociationByName(name string) *Association
func (*Entity) GetAttributeByName ¶
func (*Entity) GetHasManyName ¶
func (*Entity) GetHasOneName ¶
type Interface ¶
func NewInterface ¶
func (*Interface) AllAssociations ¶
func (f *Interface) AllAssociations() []*Association
func (*Interface) AllAttributeNames ¶
func (*Interface) AllAttributes ¶
func (*Interface) GetAssociationByName ¶
func (f *Interface) GetAssociationByName(name string) *Association
func (*Interface) GetAttributeByName ¶
type Model ¶
type Model struct { Enums []*Enum Interfaces []*Interface Entities []*Entity ThirdParties []*ThirdParty ValueObjects []*Class Relations []*Relation Tables []*table.Table }
func (*Model) GetEntityByInnerId ¶
func (*Model) GetEntityByName ¶
func (*Model) GetEntityByUuid ¶
func (*Model) GetEnumByUuid ¶
func (*Model) GetInterfaceByName ¶
func (*Model) GetInterfaceByUuid ¶
func (*Model) GetThirdPartyByName ¶
func (m *Model) GetThirdPartyByName(name string) *ThirdParty
func (*Model) GetValueObjectByUuid ¶
func (*Model) RootEnities ¶
func (*Model) RootInterfaces ¶
type Propertier ¶
type Relation ¶
type Relation struct { AppId uint64 Uuid string InnerId uint64 RelationType string SourceEntity *Entity TargetEntity *Entity RoleOfTarget string RoleOfSource string DescriptionOnSource string DescriptionOnTarget string SourceMutiplicity string TargetMultiplicity string EnableAssociaitonClass bool AssociationClass meta.AssociationClass Table *table.Table }
type ThirdParty ¶
type ThirdParty struct {
Class
}
func NewThirdParty ¶
func NewThirdParty(c *domain.Class) *ThirdParty
func (*ThirdParty) Attributes ¶
func (t *ThirdParty) Attributes() []*Attribute
Click to show internal directories.
Click to hide internal directories.