first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 21:35:24 +03:00
commit bbbf76b184
592 changed files with 246870 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
package models
import (
"time"
"github.com/google/uuid"
)
// Contact model structure
type Contact struct {
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey" json:"id"`
Name string `gorm:"not null" json:"name"`
Email string `gorm:"not null" json:"email"`
Subject string `gorm:"not null" json:"subject"`
Message string `gorm:"not null" json:"message"`
IP string `json:"ip"`
UserID *uuid.UUID `gorm:"type:uuid" json:"user_id,omitempty"` // Optional: if user is logged in
User *User `gorm:"foreignKey:UserID" json:"user,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}