change function and gorm tag
This commit is contained in:
@@ -21,9 +21,9 @@ type Member struct {
|
||||
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"`
|
||||
Group *Group `gorm:"foreignKey:GroupId;constraint:OnDelete:CASCADE;"json:"group,omitempty"`
|
||||
ResponsibleId *int `json:"ResponsibleId,omitempty"`
|
||||
Responsible *Member `gorm:"foreignKey:ResponsibleId" json:"responsible,omitempty"`
|
||||
Responsible *Member `gorm:"foreignKey:ResponsibleId;constraint:OnDelete:CASCADE;" json:"responsible,omitempty"`
|
||||
Comment string `gorm:"column:comment" json:"comment,omitempty"`
|
||||
Events []*Event `gorm:"many2many:member_events;" `
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user