libcore/models/roles.go

21 lines
530 B
Go
Raw Permalink Normal View History

2024-09-07 13:18:20 +02:00
package models
2024-09-07 13:35:52 +02:00
import "time"
2024-09-07 13:18:20 +02:00
type Role struct {
Id string `gorm:"primaryKey;type:varchar(36)"`
OrganizationId string `gorm:"type:varchar(36)"`
Master bool `gorm:"type:tinyint(1)"`
Name string `gorm:"type:varchar(255)"`
2024-09-07 13:35:52 +02:00
CreatedAt time.Time
UpdatedAt time.Time
2024-09-07 13:18:20 +02:00
}
type RolePermission struct {
Id string `gorm:"primaryKey;type:varchar(36)"`
RoleId string `gorm:"type:varchar(36)"`
Permission uint16 `gorm:"type:smallint"`
2024-09-07 13:35:52 +02:00
CreatedAt time.Time
UpdatedAt time.Time
2024-09-07 13:18:20 +02:00
}