Files
phishingclub/backend/database/domain.go
Ronni Skansing 3855e6d39b self signed certificates
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
2025-11-04 20:00:59 +01:00

38 lines
1020 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;"`
ProxyID *uuid.UUID `gorm:"index;type:uuid;"`
Name string `gorm:"not null;unique;"`
Type string `gorm:"not null;default:'regular';"`
ProxyTargetDomain string
ManagedTLSCerts bool `gorm:"not null;index;default:false"`
OwnManagedTLS bool `gorm:"not null;index;default:false"`
SelfSignedTLS 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
}