mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-02-12 16:12:44 +00:00
34 lines
628 B
Go
34 lines
628 B
Go
package database
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
const (
|
|
ASSET_TABLE = "assets"
|
|
)
|
|
|
|
// Asset is gorm data model
|
|
type Asset struct {
|
|
ID *uuid.UUID `gorm:"primary_key;not null;unique;type:uuid"`
|
|
CreatedAt *time.Time `gorm:"not null;index;"`
|
|
UpdatedAt *time.Time `gorm:"not null;index;"`
|
|
|
|
// has one
|
|
DomainID *uuid.UUID `gorm:"index;type:uuid;"`
|
|
DomainName string
|
|
|
|
// can has one
|
|
CompanyID *uuid.UUID `gorm:"index;type:uuid;"`
|
|
|
|
Name string `gorm:";index"`
|
|
Description string `gorm:";"`
|
|
Path string `gorm:"not null;index"`
|
|
}
|
|
|
|
func (Asset) TableName() string {
|
|
return ASSET_TABLE
|
|
}
|