-
Notifications
You must be signed in to change notification settings - Fork 3
/
org_model.go
21 lines (19 loc) · 942 Bytes
/
org_model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package models
type Org struct {
Model
Name string `json:"name" gorm:"type:text"`
ContactPhoneNumber *string `json:"contactPhoneNumber" gorm:"type:text"`
NumberOfEmployees *int `json:"numberOfEmployees"`
Country *string `json:"country" gorm:"type:text"`
Industry *string `json:"industry" gorm:"type:text"`
CriticalInfrastructure bool `json:"criticalInfrastructure"`
ISO27001 bool `json:"iso27001"`
NIST bool `json:"nist"`
Grundschutz bool `json:"grundschutz"`
Projects []Project `json:"projects" gorm:"foreignKey:OrganizationID;constraint:OnDelete:CASCADE;"`
Slug string `json:"slug" gorm:"type:text;unique;not null;index"`
Description string `json:"description" gorm:"type:text"`
}
func (m Model) TableName() string {
return "organizations"
}