From 4b83be6ed8efdf08423c639cee6f40d1e7a6e23e Mon Sep 17 00:00:00 2001
From: Alex <$(pass /github/email)>
Date: Wed, 14 May 2025 15:27:10 +0200
Subject: [PATCH] templates and constraints
---
go-backend/internal/models/bank_account.go | 1 +
go-backend/internal/models/membership.go | 1 +
go-backend/templates/email/mail_change_password.tmpl | 2 +-
go-backend/templates/email/mail_contact_form.tmpl | 2 +-
go-backend/templates/email/mail_grant_backend_access.tmpl | 2 +-
go-backend/templates/email/mail_registration.tmpl | 2 +-
go-backend/templates/email/mail_verification.tmpl | 2 +-
go-backend/templates/email/mail_welcome.tmpl | 2 +-
8 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/go-backend/internal/models/bank_account.go b/go-backend/internal/models/bank_account.go
index 00b8202..2ad00c0 100644
--- a/go-backend/internal/models/bank_account.go
+++ b/go-backend/internal/models/bank_account.go
@@ -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"`
diff --git a/go-backend/internal/models/membership.go b/go-backend/internal/models/membership.go
index 78c72b9..9b56031 100644
--- a/go-backend/internal/models/membership.go
+++ b/go-backend/internal/models/membership.go
@@ -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"`
diff --git a/go-backend/templates/email/mail_change_password.tmpl b/go-backend/templates/email/mail_change_password.tmpl
index eb15566..64f6aec 100644
--- a/go-backend/templates/email/mail_change_password.tmpl
+++ b/go-backend/templates/email/mail_change_password.tmpl
@@ -36,7 +36,7 @@
target="_blank"
>




