templates and constraints
This commit is contained in:
@@ -13,6 +13,7 @@ type BankAccount struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
User User `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
|
||||
UserID uint `gorm:"index" json:"user_id"`
|
||||
MandateDateSigned time.Time `json:"mandate_date_signed"`
|
||||
Bank string `json:"bank_name" binding:"safe_content"`
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
type Membership struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
UserID uint `gorm:"index" json:"user_id"`
|
||||
User User `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
StartDate time.Time `json:"start_date"`
|
||||
|
||||
Reference in New Issue
Block a user