Initial
This commit is contained in:
23
app/models/api_key.go
Normal file
23
app/models/api_key.go
Normal file
@ -0,0 +1,23 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type ApiKey struct {
|
||||
Key uuid.UUID `gorm:"type(uuid);unique;default:uuid_generate_v4()"`
|
||||
CompanyId uuid.UUID `gorm:"type(uuid)" faker:"-"`
|
||||
ActiveFrom *time.Time `faker:"-"`
|
||||
ActiveTo *time.Time `faker:"-"`
|
||||
LastUsed *time.Time
|
||||
CreatedAt time.Time `faker:"-"`
|
||||
UpdatedAt time.Time `faker:"-"`
|
||||
|
||||
Company Company `faker:"-"`
|
||||
}
|
||||
|
||||
func (m *ApiKey) TableName() string {
|
||||
return "api_keys"
|
||||
}
|
||||
Reference in New Issue
Block a user