change table to references
This commit is contained in:
@@ -1,21 +1,24 @@
|
||||
package models
|
||||
|
||||
type Member struct {
|
||||
Id int `gorm:"primaryKey" json:"id"`
|
||||
FirstName string `gorm:"column:firstName" json:"firstName,omitempty"`
|
||||
FirstNameHash string `gorm:"column:firstNameHash" json:"-"`
|
||||
LastName string `gorm:"column:lastName" json:"lastName,omitempty"`
|
||||
LastNameHash string `gorm:"column:lastNameHash" json:"-"`
|
||||
Birthday string `gorm:"column:birthday" json:"birthday,omitempty"`
|
||||
BirthdayHash string `gorm:"column:birthdayHash" json:"-"`
|
||||
Address string `gorm:"column:address" json:"address,omitempty"`
|
||||
Zip string `gorm:"column:zip" json:"zip,omitempty"`
|
||||
Town string `gorm:"column:town" json:"town,omitempty"`
|
||||
Phone string `gorm:"column:phone" json:"phone,omitempty"`
|
||||
Email string `gorm:"column:email" json:"email,omitempty"`
|
||||
FirstVisit string `gorm:"column:firstVisit" json:"firstVisit,omitempty"`
|
||||
LastVisit string `gorm:"column:lastVisit" json:"lastVisit,omitempty"`
|
||||
Group string `gorm:"column:group" json:"group,omitempty"`
|
||||
ResponsiblePerson Person `gorm:"type:json" json:"responsiblePerson"`
|
||||
Comment string `gorm:"column:comment" json:"comment"`
|
||||
Id int `gorm:"primaryKey" json:"id,omitempty"`
|
||||
FirstName string `gorm:"column:firstName" json:"firstName,omitempty"`
|
||||
FirstNameHash string `gorm:"column:firstNameHash" json:"-"`
|
||||
LastName string `gorm:"column:lastName" json:"lastName,omitempty"`
|
||||
LastNameHash string `gorm:"column:lastNameHash" json:"-"`
|
||||
Birthday string `gorm:"column:birthday" json:"birthday,omitempty"`
|
||||
BirthdayHash string `gorm:"column:birthdayHash" json:"-"`
|
||||
Address string `gorm:"column:address" json:"address,omitempty"`
|
||||
Zip string `gorm:"column:zip" json:"zip,omitempty"`
|
||||
Town string `gorm:"column:town" json:"town,omitempty"`
|
||||
Phone string `gorm:"column:phone" json:"phone,omitempty"`
|
||||
Email string `gorm:"column:email" json:"email,omitempty"`
|
||||
FirstVisit string `gorm:"column:firstVisit" json:"firstVisit,omitempty"`
|
||||
LastVisit string `gorm:"column:lastVisit" json:"lastVisit,omitempty"`
|
||||
GroupId *int `json:"GroupId,omitempty"`
|
||||
Group *Group `gorm:"foreignKey:GroupId" json:"group,omitempty"`
|
||||
ResponsibleId *int `json:"ResponsibleId,omitempty"`
|
||||
Responsible *Member `gorm:"foreignKey:ResponsibleId" json:"responsible,omitempty"`
|
||||
Comment string `gorm:"column:comment" json:"comment,omitempty"`
|
||||
Events []*Event `gorm:"many2many:member_events;" `
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user