model

package module
v0.0.0-...-ca67535 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2018 License: GPL-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive struct {
	Id        int64  `json:"id"`
	Title     string `json:"title" roles:"archive"`
	Style     string `json:"style" roles:"archive"`
	Level     string `json:"level" roles:"archive"`
	Composer  string `json:"composer" roles:"archive"`
	Arranger  string `json:"arranger" roles:"archive"`
	Publisher string `json:"publisher" roles:"archive"`
	Subtitles string `json:"subtitles" roles:"archive"`
	Score     bool   `json:"score" roles:"archive"`
	Location  string `json:"location" roles:"archive"`
	Note      string `json:"note" roles:"archive"`
}

defines the archive which stores all scores

type Event

type Event struct {
	Id            int64     `json:"id"`
	Date          time.Time `json:"date" roles:"event"`
	Time          time.Time `json:"time" roles:"event"`
	End           time.Time `json:"end" roles:"event"`
	OpenEnd       uint8     `json:"openEnd" roles:"event"`
	MusicianTime  time.Time `json:"musicianTime" roles:"event"`
	Name          string    `json:"name" roles:"event"`
	Note          string    `json:"note" roles:"event"`
	Uniform       string    `json:"uniform" roles:"event"`
	Place         string    `json:"place" roles:"event"`
	MusicianPlace string    `json:"musicianPlace" roles:"event"`
	Internal      bool      `json:"internal" roles:"event"`
	Important     bool      `json:"important" roles:"event"`
}

Defines an event.

type Instrument

type Instrument struct {
	Id         int64  `json:"id"`
	Name       string `json:"name" roles:"instrument"`
	NamePlural string `json:"namePlural" roles:"instrument"`
	Priority   int64  `json:"priority" roles:"instrument"`
}

Defines an instrument.

type LeaderRole

type LeaderRole struct {
	Id         int64  `json:"id"`
	Name       string `json:"name" roles:"leader"`
	NamePlural string `json:"namePlural" roles:"leader"`
}

Defines a leader role.

type LeaderRoleMember

type LeaderRoleMember struct {
	Id           int64       `json:"id"`
	LeaderRole   *LeaderRole `json:"leaderRole" roles:"leader"`
	LeaderRoleId int64       `qbs:"fk:LeaderRole" json:"leaderRoleId" roles:"leader"`
	Member       *Member     `json:"member" roles:"leader"`
	MemberId     int64       `qbs:"fk:Member" json:"memberId" roles:"leader"`
	Priority     int         `json:"priority" roles:"leader"`
	Deputy       bool        `json:"deputy" roles:"leader"`
}

Defines the relation between a leader role an a member.

func (*LeaderRoleMember) Validate

func (l *LeaderRoleMember) Validate(qbs *qbs.Qbs) error

Validates all association pointers and assign its id fields to the one of LeaderRoleMember.

type Member

type Member struct {
	Id           int64     `json:"id"`
	FirstName    string    `json:"firstName" roles:"member"`
	LastName     string    `json:"lastName" roles:"member"`
	Joined       int       `json:"joined" roles:"member"`
	Picture      string    `json:"picture" roles:"member"`
	Active       bool      `json:"active" roles:"member"`
	Birthday     time.Time `json:"birthday" roles:"member"`
	LoginAllowed bool      `json:"loginAllowed"`
	Username     string    `json:"username"`
	Password     string    `json:"-"`
	Gender       string    `json:"gender" roles:"member"`

	Instrument   *Instrument `json:"instrument" roles:"member"`
	InstrumentId int64       `qbs:"fk:Instrument" json:"instrumentId" roles:"member"`
}

Defines a member.

func (*Member) Validate

func (m *Member) Validate(qbs *qbs.Qbs) error

Validates all association pointers and assign its id fields to the one of Member.

type Role

type Role struct {
	Id         string `qbs:"pk" json:"id"`
	Name       string `json:"name"`
	NamePlural string `json:"namePlural"`
}

Defines a role.

type RoleMember

type RoleMember struct {
	Id       int64   `json:"id"`
	Role     *Role   `json:"role"`
	RoleId   string  `qbs:"fk:Role" json:"roleId"`
	Member   *Member `json:"member"`
	MemberId int64   `qbs:"fk:Member" json:"memberId"`
}

Defines the relation between a role and a member.

func (*RoleMember) Validate

func (r *RoleMember) Validate(qbs *qbs.Qbs) error

Validates all association pointers and assign its id fields to the one of RoleMember.

Jump to

Keyboard shortcuts

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