main v1.0.5
alex 2024-09-07 13:35:52 +02:00
parent ed64beb5fa
commit 668c7d0795
1 changed files with 6 additions and 0 deletions

View File

@ -1,14 +1,20 @@
package models package models
import "time"
type Role struct { type Role struct {
Id string `gorm:"primaryKey;type:varchar(36)"` Id string `gorm:"primaryKey;type:varchar(36)"`
OrganizationId string `gorm:"type:varchar(36)"` OrganizationId string `gorm:"type:varchar(36)"`
Master bool `gorm:"type:tinyint(1)"` Master bool `gorm:"type:tinyint(1)"`
Name string `gorm:"type:varchar(255)"` Name string `gorm:"type:varchar(255)"`
CreatedAt time.Time
UpdatedAt time.Time
} }
type RolePermission struct { type RolePermission struct {
Id string `gorm:"primaryKey;type:varchar(36)"` Id string `gorm:"primaryKey;type:varchar(36)"`
RoleId string `gorm:"type:varchar(36)"` RoleId string `gorm:"type:varchar(36)"`
Permission uint16 `gorm:"type:smallint"` Permission uint16 `gorm:"type:smallint"`
CreatedAt time.Time
UpdatedAt time.Time
} }