gekent_test

package
v0.0.0-...-b6e4086 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContactTypeK = iota
	ContactTypeL
	ContactTypeP
	ContactTypeI
	ContactTypeW
)

Variables

View Source
var (
	MessiName        = "Lionel"
	MessiPass        = "Secret00"
	MessiEmail       = "lionel.messi@fcb.com"
	MessiEmail2      = "lm@barcelona.es"
	MessiID          = uint(0)
	MustermannName   = "Mustermann GesmbH"
	MustermannStreet = "Short Street"
)

...

Functions

func NewInMemoryDatastore

func NewInMemoryDatastore() (*gekentities.GormEntityDatastoreImpl, error)

NewInMemoryDatastore ...

Types

type Contact

type Contact struct {
	gekentities.Entity `entity:"type:Contact;name:contact"`
	OrgType            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        ContactType `gorm:"type:integer;not null" form:"gkvContactType"`
	ContactAddresses   []ContactAddress
}

Contact ...

func (Contact) BuildEntityOption

func (c Contact) BuildEntityOption() gekentities.EntityOption

BuildEntityOption build entity options (implements EntityOptionBuilder)

func (*Contact) LoadRelated

func (c *Contact) LoadRelated(db *gorm.DB) error

LoadRelated load related entities (implements EntityHolder)

type ContactAddress

type ContactAddress struct {
	gekentities.Entity `entity:"type:ContactAddress;name:contactaddress"`
	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 ContactType

type ContactType int

ContactType type of customer relationship

func ContactTypes

func ContactTypes() []ContactType

ContactTypes ...

func (ContactType) Desc

func (ct ContactType) Desc() string

Desc ...

func (ContactType) String

func (ct ContactType) String() string

func (ContactType) Val

func (ct ContactType) Val() string

Val the value used in html template

type OrgType

type OrgType int

OrgType type of organization (organization/person)

const (
	OrgTypeOrg OrgType = iota
	OrgTypePerson
)

func OrgTypes

func OrgTypes() []OrgType

OrgTypes ...

func (OrgType) Desc

func (ot OrgType) Desc() string

Desc ...

func (OrgType) String

func (ot OrgType) String() string

func (OrgType) Val

func (ot OrgType) Val() string

Val the value used in html template

type RoleType

type RoleType int

RoleType type of user role

const (
	RoleTypeUser RoleType = iota
	RoleTypeAdmin
)

func ParseRoleType

func ParseRoleType(s string) RoleType

ParseRoleType ...

func RoleTypes

func RoleTypes() []RoleType

RoleTypes ...

func (RoleType) Desc

func (rt RoleType) Desc() string

Desc ...

func (RoleType) Val

func (rt RoleType) Val() string

Val the value used in html template

type User

type User struct {
	gekentities.Entity `entity:"type:User;name:user"`
	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               RoleType `gorm:"type:integer;not null" form:"gkvRole"`
}

User ...

func (User) BuildEntityOption

func (u User) BuildEntityOption() gekentities.EntityOption

BuildEntityOption ...

Jump to

Keyboard shortcuts

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