package forms

type RbacRole struct {
	ID          uint64 `json:"id,string"`
	Name        string `json:"name"`
	DisplayName string `json:"display_name"`
	ScopeType   string `json:"scope_type"`
	Description string `json:"description"`
}

type RbacRoleResp struct {
	ID          uint64 `json:"ID,string"`
	Name        string `json:"Name"`
	DisplayName string `json:"DisplayName"`
	ScopeType   string `json:"ScopeType"`
	Description string `json:"Description"`
}

type RbacPrivilege struct {
	ID          uint64 `json:"id,string"`
	ResourceUri string `json:"resource_uri"`
	Url         string `json:"url"`
	System      string `json:"system"`
	Description string `json:"description"`
}

type RbacPrivilegeResp struct {
	ID          uint64 `json:"ID,string"`
	ResourceUri string `json:"ResourceUri"`
	Url         string `json:"Url"`
	System      string `json:"System"`
	Description string `json:"Description"`
}

type ListRbacPrivilegeResp struct {
	Total int64               `json:"Total"` //nolint
	List  []RbacPrivilegeResp `json:"List"`  //nolint
}

type RbacRolePrivilege struct {
	ID          uint64 `json:"id,string"`
	RoleID      uint64 `json:"role_id,string"`
	PrivilegeID uint64 `json:"privilege_id,string"`
}

type GrantRolePrivilege struct {
	ID           uint64   `json:"id,string"`
	RoleID       uint64   `json:"role_id,string"`
	PrivilegeIDs []uint64 `json:"privilege_ids"`
}

type RbacRoleBinding struct {
	ID         uint64 `json:"id,string"`
	TargetType string `json:"target_type"`
	TargetID   uint64 `json:"target_id,string"`
	ScopeType  string `json:"scope_type"`
	ScopeID    uint64 `json:"scope_id,string"`
	RoleID     uint64 `json:"role_id,string"`
}

type ListPrivilegeSystemsResp struct {
	Systems []string `json:"systems"`
}
