feat(init): First commit

This commit is contained in:
Thomas Maurice 2024-02-11 19:59:34 +01:00
commit f92368748a
Signed by: thomas
GPG key ID: 1D577F50583032A6
22 changed files with 1298 additions and 0 deletions

23
pkg/models/dkimkey.go Normal file
View file

@ -0,0 +1,23 @@
package models
import (
"time"
"github.com/google/uuid"
)
type DKIMKey struct {
ID uuid.UUID `gorm:"primaryKey;column:id;type:uuid;default:gen_random_uuid()" yaml:"id"`
Selector string `gorm:"column:selector;type:varchar(128);not null" yaml:"selector"`
DomainName string `gorm:"column:domain_name;type:varchar(256);not null" yaml:"domain_name"`
PublicKey string `gorm:"column:public_key;type:text;not null" yaml:"public_key"`
PrivateKey string `gorm:"column:private_key;type:text;not null" yaml:"private_key"`
Record string `gorm:"column:record;type:text;not null" yaml:"record"`
Active bool `gorm:"column:active;type:boolean;not null;default:true" yaml:"active"`
CreatedAt time.Time `gorm:"column:created_at;type:timestamp;not null;autoCreateTime:nano;default:now()" yaml:"created_at"`
UpdatedAt time.Time `gorm:"column:udpated_at;type:timestamp;not null;autoUpdateTime:nano;default:now()" yaml:"updated_at"`
}
func (o *DKIMKey) TableName() string {
return "dkimkeys"
}