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

@@ -9,3 +9,9 @@ type Position struct {
OrganizationID uint `json:"organization_id" gorm:"index;not null"`
Users []User `json:"users,omitempty"`
}
type PositionApi struct {
Name string `json:"name" gorm:"unique;index"`
RightMask int `json:"right_mask"`
OrganizationID uint `json:"organization_id" gorm:"index;not null"`
}