feat(docker): Add Dockerfile and compose file
This commit is contained in:
24
app/models/domain.go
Normal file
24
app/models/domain.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Domain struct {
|
||||
ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()" json:"id"`
|
||||
Name string `gorm:"not null;unique" json:"name"`
|
||||
Verified bool `gorm:"not null;default:false" json:"verified"`
|
||||
VerificationToken string `gorm:"not null;unique" json:"verification_token"`
|
||||
CreatedAt time.Time `gorm:"not null;default:now()" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"not null;default:now()" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"`
|
||||
|
||||
Records []Record `gorm:"foreignKey:DomainID" json:"-"`
|
||||
}
|
||||
|
||||
func (Domain) TableName() string {
|
||||
return "domains"
|
||||
}
|
||||
Reference in New Issue
Block a user