21 lines
530 B
Go
21 lines
530 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
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)"`
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
type RolePermission struct {
|
|
Id string `gorm:"primaryKey;type:varchar(36)"`
|
|
RoleId string `gorm:"type:varchar(36)"`
|
|
Permission uint16 `gorm:"type:smallint"`
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|