23 lines
1 KiB
Go
23 lines
1 KiB
Go
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"
|
|
}
|