Initial
This commit is contained in:
28
app/models/cert.go
Normal file
28
app/models/cert.go
Normal file
@ -0,0 +1,28 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type Cert struct {
|
||||
Id uuid.UUID `gorm:"type(uuid);unique;default:uuid_generate_v4()"`
|
||||
CompanyId uuid.UUID `gorm:"type(uuid)" faker:"-"`
|
||||
Company Company `faker:"-"`
|
||||
Alive bool `faker:"-"`
|
||||
SerialNumber string
|
||||
Issuer string
|
||||
Subject string
|
||||
ValidAfter time.Time `faker:"-"`
|
||||
ValidBefore time.Time `faker:"-"`
|
||||
CertFile string
|
||||
KeyFile string
|
||||
KeyPassword string
|
||||
CreatedAt time.Time `faker:"-"`
|
||||
UpdatedAt time.Time `faker:"-"`
|
||||
}
|
||||
|
||||
func (m *Cert) TableName() string {
|
||||
return "certificates"
|
||||
}
|
||||
Reference in New Issue
Block a user