import { ITenant } from '../../common.models';
import { IApiSuccess } from '../../api.models';

export interface IGroup {
    tenant: ITenant;
    deletable: boolean;
    isAdmin: boolean;
    key: string;
    name: string;
    tenantId: number;
    id: number;
}
export interface IRightsOptions {
    rightId: number;
    allowed: boolean;
}
export interface ISaveRightsOptions {
    groupId: number;
    rights: IRightsOptions[];
}
export interface IPrivilegeRight {
    id: number;
    gid: number;
    title: string;
    subnamespace: string;
    allowed: boolean;
    expanded: boolean;
    global: boolean;
    leaf: boolean;
    children: IPrivilegeRight[];
}
export interface IGroupRights extends IApiSuccess {
    n_rows: number;
    children: IPrivilegeRight[];
}
export interface ISaveGroupOptions {
    name: string;
    id: number;
}
export interface ISaveGroupResponse extends IApiSuccess {
    gid: string;
}
