models

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account added in v0.1.6

type Account struct {
	entitymodel.GormEntity `entity:"type:Account;name:account;gui:no;nav:yes"`
	Name                   string `gorm:"type:varchar(50);not null;unique" form:"gkvName"`
	Nr                     string `gorm:"type:text;not null" form:"gkvNr"`
}

Account ...

func (Account) EntityOption added in v0.1.6

func (a Account) EntityOption() entitydto.EntityOption

EntityOption ...

type Contact

type Contact struct {
	entitymodel.GormEntity `entity:"type:Contact;name:contact;gui:no;nav:yes"`
	OrgType                types.OrgType     `gorm:"type:integer;not null" form:"gkvOrgType"`
	Name                   string            `gorm:"type:varchar(100);not null" form:"gkvName"`
	NameExt                string            `gorm:"type:varchar(100)" form:"gkvNameExt"`
	ContactType            types.ContactType `gorm:"type:integer;not null" form:"gkvContactType"`
	ContactAddresses       []ContactAddress
}

Contact ...

func (Contact) EntityOption added in v0.1.6

func (c Contact) EntityOption() entitydto.EntityOption

EntityOption ...

func (Contact) MustEmbed added in v0.1.6

func (c Contact) MustEmbed() []string

MustEmbed returns the names of the fields that must be embedded (oneToMany)

type ContactAddress

type ContactAddress struct {
	entitymodel.GormEntity `entity:"type:ContactAddress;name:contactaddress;gui:no;nav:no"`
	ContactID              uint
	Street                 string `gorm:"type:varchar(100);not null"`
	StreetNr               string `gorm:"type:varchar(10);not null"`
	StreetExt              string `gorm:"type:varchar(50)"`
	Zip                    string `gorm:"type:varchar(10);not null"`
	City                   string `gorm:"type:varchar(100);not null"`
}

ContactAddress ...

type User

type User struct {
	entitymodel.GormEntity `entity:"type:User;name:user;gui:no;nav:yes"`
	Name                   string         `gorm:"type:varchar(50);not null;unique" form:"gkvName"`
	Pass                   string         `gorm:"type:text;not null" form:"gkvPass"`
	Email                  string         `gorm:"type:varchar(100);not null" form:"gkvEmail"`
	Role                   types.RoleType `gorm:"type:integer;not null" form:"gkvRole"`
}

User ...

func (User) EntityOption added in v0.1.6

func (u User) EntityOption() entitydto.EntityOption

EntityOption ...

Directories

Path Synopsis
Package genmodels contains all entities and must also have a struct which implements entitymodel.EntityFactory.
Package genmodels contains all entities and must also have a struct which implements entitymodel.EntityFactory.

Jump to

Keyboard shortcuts

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