type DomainResult {
    totalCount: Int
    count: Int
    nodes: [Domain]
}

type DomainHistory implements DbHistoryModel {
    id: Int
    name: String

    shortUrls: [ShortUrl]

    deleted: Boolean
    editor: String
    created: String
    updated: String
}

type Domain implements DbModel {
    id: Int
    name: String

    shortUrls: [ShortUrl]

    deleted: Boolean
    editor: User
    created: String
    updated: String

    history: [DomainHistory]
}

input DomainSort {
    id: SortOrder
    name: SortOrder

    deleted: SortOrder
    editorId: SortOrder
    created: SortOrder
    updated: SortOrder
}

enum DomainFuzzyFields {
    name
}

input DomainFuzzy {
    fields: [DomainFuzzyFields]
    term: String
    threshold: Int
}

input DomainFilter {
    id: IntFilter
    name: StringFilter

    fuzzy: DomainFuzzy

    deleted: BooleanFilter
    editor: IntFilter
    created: DateFilter
    updated: DateFilter
}

type DomainMutation {
    create(input: DomainCreateInput!): Domain
    update(input: DomainUpdateInput!): Domain
    delete(id: Int!): Boolean
    restore(id: Int!): Boolean
}

input DomainCreateInput {
    name: String!
}

input DomainUpdateInput {
    id: Int!
    name: String
}