add postgres and refactor code

This commit is contained in:
andrusyakka
2023-07-17 13:59:44 +03:00
parent 94d2a1df2b
commit 6a386e38cf
15 changed files with 107 additions and 47 deletions

View File

@@ -8,3 +8,8 @@ type Organization struct {
ParentID uint `json:"parent_id"`
Positions []Position `json:"positions,omitempty"`
}
type OrganizationApi struct {
Name string `json:"name" gorm:"unique;index"`
ParentID uint `json:"parent_id"`
}