package entities import ( "time" "github.com/google/uuid" ) type InstitutionType string const ( InstGovernment InstitutionType = "government" InstPrivate InstitutionType = "private" InstNGO InstitutionType = "ngo" InstIndividual InstitutionType = "individual" ) type Institution struct { ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()" json:"id"` Name string `gorm:"not null;size:255" json:"name"` Type InstitutionType `gorm:"not null;size:32" json:"type"` Address *string `json:"address,omitempty"` ContactPerson *string `gorm:"size:255" json:"contact_person,omitempty"` Phone *string `gorm:"size:50" json:"phone,omitempty"` Email *string `gorm:"size:255" json:"email,omitempty"` CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"` UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"` } func (Institution) TableName() string { return "institutions" }