MSP-1756 implement roles (as a service)
This commit is contained in:
1 parent
1e6c72ead2
commit
557491ed05
5 files changed
+334
-11
No files matched your search
+23
-6
@@ -2,13 +2,30 @@ package entity
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/integration-system/isp-kit/json"
|
||||
)
|
||||
|
||||
type Role struct {
|
||||
Id int
|
||||
Name string
|
||||
Rights interface{}
|
||||
Description *string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
Id int
|
||||
Name string
|
||||
ExternalGroup string
|
||||
ChangeMessage string
|
||||
Permissions PermList
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type PermList []string
|
||||
|
||||
func (p *PermList) Scan(src any) error {
|
||||
var data []byte
|
||||
switch v := src.(type) {
|
||||
case string:
|
||||
data = []byte(v)
|
||||
case []byte:
|
||||
data = v
|
||||
}
|
||||
|
||||
return json.Unmarshal(data, p)
|
||||
}
|
||||
Reference in new issue
Block a user