switched to gorm..

This commit is contained in:
$(pass /github/name)
2024-07-10 14:22:56 +02:00
parent 87e9f71ceb
commit 6ac5491053
27 changed files with 368 additions and 283 deletions

View File

@@ -3,11 +3,12 @@ package models
import "time"
type Consent struct {
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Email string `json:"email"`
UpdatedAt time.Time `json:"updated_at"`
CreatedAt time.Time `json:"created_at"`
ConsentType string `json:"consent_type"`
UserID int `json:"id"`
CreatedAt time.Time
UpdatedAt time.Time
FirstName string `gorm:"not null" json:"first_name"`
LastName string `gorm:"not null" json:"last_name"`
Email string `gorm:"unique" json:"email"`
ConsentType string `gorm:"not null" json:"consent_type"`
ID int64 `gorm:"primaryKey"`
UserID int64 `gorm:"not null" json:"user_id"`
}