...
|
...
|
@@ -42,10 +42,23 @@ type PermissionContentObject interface { |
|
|
ObjectMarshal() (string, error)
|
|
|
}
|
|
|
|
|
|
type UserObject struct {
|
|
|
UserId int64 `json:"user_id"`
|
|
|
CompanyId int64 `json:"company_id"`
|
|
|
UserCompanyId int64 `json:"user_company_id"`
|
|
|
}
|
|
|
|
|
|
type PermissionContentBase struct {
|
|
|
Check int8 `json:"check"`
|
|
|
}
|
|
|
|
|
|
func (p *PermissionContentBase) ValidDefault(obj UserObject) bool {
|
|
|
if p.Check == 1 {
|
|
|
return true
|
|
|
}
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
func NewPermissionContentBase() PermissionContentObject {
|
|
|
return &PermissionContentBase{}
|
|
|
}
|
...
|
...
|
|