feat(init): First commit
This commit is contained in:
commit
f92368748a
22 changed files with 1298 additions and 0 deletions
23
pkg/models/dkimkey.go
Normal file
23
pkg/models/dkimkey.go
Normal 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"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue