enum AbacusContractMechDeductionAdminType {
    BOTH
    BUSINESS
    CUSTOMER
}

enum AbacusContractMechDeductionMechanicalType {
    DIGITAL
    PHYSICAL
}

enum AbacusContractMechDeductionTerritory {
    CAN
    ROW
    USA
}

input AbacusContractMechanicalDeductionCreate {
    adminFee: Float
    adminType: AbacusContractMechDeductionAdminType!
    contractId: ID!
    isWorldWide: Boolean = false
    mechanicalType: [AbacusContractMechDeductionMechanicalType!]!
    territory: AbacusContractMechDeductionTerritory
}

input AbacusContractMechanicalDeductionUpdate {
    adminFee: Float
    adminType: AbacusContractMechDeductionAdminType
    contractMechanicalDeductionId: ID!
    mechanicalType: [AbacusContractMechDeductionMechanicalType!]
}

type AbacusContractMechanicalDeduction @key(fields: "contractMechanicalDeductionId") {
    adminFee: Float
    adminType: AbacusContractMechDeductionAdminType!
    contractId: ID!
    contractMechanicalDeductionId: ID!
    mechanicalType: [AbacusContractMechDeductionMechanicalType!]!
    territory: AbacusContractMechDeductionTerritory!
}

extend type Query {
    abacusContractMechanicalDeduction(contractMechanicalDeductionId: ID!): AbacusContractMechanicalDeduction
    abacusContractMechanicalDeductions(contractId: ID!): [AbacusContractMechanicalDeduction!]
}

extend type Mutation {
    abacusCreateContractMechanicalDeductions(input: AbacusContractMechanicalDeductionCreate!): [AbacusContractMechanicalDeduction!]!
    abacusUpdateContractMechanicalDeduction(input: AbacusContractMechanicalDeductionUpdate!): AbacusContractMechanicalDeduction!
    abacusDeleteContractMechanicalDeduction(contractMechanicalDeductionId: ID!): AbacusDeleteResponse!
}
