type RoleResult {
    totalCount: Int
    count: Int
    nodes: [Role]
}

type Role implements DbModel {
    id: ID
    name: String
    description: String
    permissions: [Permission]
    users: [User]

    deleted: Boolean
    editor: User
    createdUtc: String
    updatedUtc: String
}

input RoleSort {
    id: SortOrder
    name: SortOrder
    description: SortOrder

    deleted: SortOrder
    editorId: SortOrder
    createdUtc: SortOrder
    updatedUtc: SortOrder
}

input RoleFilter {
    id: IntFilter
    name: StringFilter
    description: StringFilter

    deleted: BooleanFilter
    editorId: IntFilter
    createdUtc: DateFilter
    updatedUtc: DateFilter
}

type RoleMutation {
    create(input: RoleCreateInput!): Role
    update(input: RoleUpdateInput!): Role
    delete(id: ID!): Boolean
    restore(id: ID!): Boolean
}

input RoleCreateInput {
    name: String!
    description: String
    permissions: [ID]
}

input RoleUpdateInput {
    id: ID!
    name: String
    description: String
    permissions: [ID]
}