Files
phishingclub/backend/database/domain.go
T
2025-08-21 16:14:09 +02:00

33 lines
834 B
Go

package database
import (
"time"
"github.com/google/uuid"
)
const (
DOMAIN_TABLE = "domains"
)
// Domain is gorm data model
type Domain struct {
ID uuid.UUID `gorm:"primary_key;not null;unique;type:uuid;"`
CreatedAt *time.Time `gorm:"not null;index;"`
UpdatedAt *time.Time `gorm:"not null;index;"`
CompanyID *uuid.UUID `gorm:"index;type:uuid;"`
Name string `gorm:"not null;unique;"`
ManagedTLSCerts bool `gorm:"not null;index;default:false"`
OwnManagedTLS bool `gorm:"not null;index;default:false"`
HostWebsite bool `gorm:"not null;"`
PageContent string
PageNotFoundContent string
RedirectURL string
// could has-one
Company *Company
}
func (Domain) TableName() string {
return DOMAIN_TABLE
}