templates and constraints

This commit is contained in:
Alex
2025-05-14 15:27:10 +02:00
parent 8fcb73f24d
commit 4b83be6ed8
8 changed files with 8 additions and 6 deletions

View File

@@ -13,6 +13,7 @@ type BankAccount struct {
ID uint `gorm:"primaryKey"` ID uint `gorm:"primaryKey"`
CreatedAt time.Time CreatedAt time.Time
UpdatedAt time.Time UpdatedAt time.Time
User User `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
UserID uint `gorm:"index" json:"user_id"` UserID uint `gorm:"index" json:"user_id"`
MandateDateSigned time.Time `json:"mandate_date_signed"` MandateDateSigned time.Time `json:"mandate_date_signed"`
Bank string `json:"bank_name" binding:"safe_content"` Bank string `json:"bank_name" binding:"safe_content"`

View File

@@ -10,6 +10,7 @@ import (
type Membership struct { type Membership struct {
ID uint `gorm:"primaryKey" json:"id"` ID uint `gorm:"primaryKey" json:"id"`
UserID uint `gorm:"index" json:"user_id"` UserID uint `gorm:"index" json:"user_id"`
User User `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
CreatedAt time.Time CreatedAt time.Time
UpdatedAt time.Time UpdatedAt time.Time
StartDate time.Time `json:"start_date"` StartDate time.Time `json:"start_date"`

View File

@@ -36,7 +36,7 @@
target="_blank" target="_blank"
><img ><img
alt="Dörpsmobil Hasloh" alt="Dörpsmobil Hasloh"
src="{{.BASEURL}}/images/CarsharingSH-Hasloh-LOGO.jpeg" src="{{.Logo}}"
style=" style="
outline: none; outline: none;
border: none; border: none;

View File

@@ -40,7 +40,7 @@
target="_blank" target="_blank"
><img ><img
alt="{{.WebsiteTitle}}" alt="{{.WebsiteTitle}}"
src="{{.BASEURL}}{{.Logo}}" src="{{.Logo}}"
style=" style="
outline: none; outline: none;
border: none; border: none;

View File

@@ -36,7 +36,7 @@
target="_blank" target="_blank"
><img ><img
alt="Dörpsmobil Hasloh" alt="Dörpsmobil Hasloh"
src="{{.BASEURL}}/images/CarsharingSH-Hasloh-LOGO.jpeg" src="{{.Logo}}"
style=" style="
outline: none; outline: none;
border: none; border: none;

View File

@@ -36,7 +36,7 @@
target="_blank" target="_blank"
><img ><img
alt="{{.WebsiteTitle}}" alt="{{.WebsiteTitle}}"
src="{{.BASEURL}}{{.Logo}}" src="{{.Logo}}"
style=" style="
outline: none; outline: none;
border: none; border: none;

View File

@@ -36,7 +36,7 @@
target="_blank" target="_blank"
><img ><img
alt="Dörpsmobil Hasloh" alt="Dörpsmobil Hasloh"
src="{{.BASEURL}}/images/CarsharingSH-Hasloh-LOGO.jpeg" src="{{.Logo}}"
style=" style="
outline: none; outline: none;
border: none; border: none;

View File

@@ -36,7 +36,7 @@
target="_blank" target="_blank"
><img ><img
alt="{{.WebsiteTitle}}" alt="{{.WebsiteTitle}}"
src="{{.BASEURL}}{{.Logo}}" src="{{.Logo}}"
style=" style="
outline: none; outline: none;
border: none; border: none;