Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Collection name: blockUnblockAccounts

  • Schema:

    Code Block
    languagejson
    db.createCollection("blockUnblockAccounts", {
      validator: {
        $jsonSchema: {
          bsonType: "object",
          title: "Block Unblock Accounts Object Validation",
          required: ["accountBlockUnblockKey.accountNumber","accountBlockUnblockKey.blockCode"
          ,"accountBlockUnblockKey.blockCodeIndicator","accountBlockUnblockKey.foreignUse","accountBlockUnblockKey.functionCode","accountBlockUnblockKey.organizationNumber"],
          properties: {
            accountBlockUnblockKey: {
              bsonType: "object",
              properties: {
                accountNumber: {
                  bsonType: "string",
                  description: "'accountNumber' must be a string and is required"
                },
                blockCode: {
                  bsonType: "string",
                  description: "'blockCode' must be a string and is required"
                },
                blockCodeIndicator: {
                  bsonType: "int",
                  description: "'blockCodeIndicator' must be a int and is required"
                },
                foreignUse: {
                  bsonType: "int",
                  description: "'foreignUse' must be a int and is required"
                },
                functionCode: {
                  bsonType: "string",
                  description: "'functionCode' must be a string and is required"
                },
                organizationNumber: {
                  bsonType: [ "string" ],
                  description: "'organizationNumber' must be a string and is required"
                }
              }
            },
            blockCode1Local: {
              bsonType: "string",
              description: "'blockCode1Local' must be a string"
            },
            localOrganization: {
              bsonType: "stringint",
              description: "'localOrganization' must be a stringint"
            }
          }
        }
      }
    });
  • Index

    Code Block
    languagejson
    db.blockUnblockAccounts.createIndex({accountBlockUnblockKey: 1});
    db.blockUnblockAccounts.createIndex({"accountBlockUnblockKey.accountNumber": 1});

...

  • Collection name: customers

  • Schema:

    Code Block
    languagejson
    db.createCollection("customers", {
      validator: {
        $jsonSchema: {
          bsonType: "object",
          title: "Customers Object Validation",
          required: ["customerKey.customerNumber", customerKey."org","customerKey.logo","customerKey.address","customerKey.houseNumber","customerKey.externalNumber","customerKey.colony","customerKey.city","customerKey.state","customerKey.postalCode","customerKey.dateOfBirth","customerKey.stateOfBirth","customerKey.email","customerKey.genderCode","customerKey.firstName","customerKey.lastName","customerKey.maternalLastName","customerKey.mobilePhoneNumber","customerKey.identificationNumberFlag","customerKey.identificationNumber","customerKey.ine","customerKey.occupation"],
          properties: {
            customerKey: {
              bsonType: "object",
              properties: {
                customerNumber: {
                  bsonType: "string",
                  description: "'customerNumber' must be a string and is required"
                },
              }
            },
            org: {
              bsonType: "string",
              description: "'org' must be a string and is required"
            },
            logo: {
              bsonType: "string",
              description: "'logo' must be a string and is required"
            },
            address: {
              bsonType: "string",
              description: "'address' must be a string and is required"
            },
            houseNumber: {
              bsonType: "string",
              description: "'houseNumber' must be a string and is required"
            },
            externalNumber: {
              bsonType: "string",
              description: "'externalNumber' must be a string and is required"
            },
            colony: {
              bsonType: "string",
              description: "'colony' must be a string and is required"
            },
            city: {
              bsonType: "string",
              description: "'city' must be a string and is required"
            },
            state: {
              bsonType: "string",
              description: "'state' must be a string and is required"
            },
            postalCode: {
              bsonType: "string",
              description: "'postalCode' must be a string and is required"
            },
            dateOfBirth: {
              bsonType: "string",
              description: "'dateOfBirth' must be a string and is required"
            },
            stateOfBirth: {
              bsonType: "string",
              description: "'stateOfBirth' must be a string and is required"
            },
            email: {
              bsonType: "string",
              description: "'email' must be a string and is required"
            },
            genderCode: {
              bsonType: "int",
              description: "'genderCode' must be a int and is required"
            },
            firstName: {
              bsonType: "string",
              description: "'firstName' must be a string and is required"
            },
            lastName: {
              bsonType: "string",
              description: "'lastName' must be a string and is required"
            },
            maternalLastName: {
              bsonType: "string",
              description: "'maternalLastName' must be a string and is required"
            },
            mobilePhoneNumber: {
              bsonType: "string",
              description: "'mobilePhoneNumber' must be a string and is required"
            },
            identificationNumberFlag: {
              bsonType: "string",
              description: "'identificationNumberFlag' must be a string and is required"
            },
            identificationNumber: {
              bsonType: "string",
              description: "'identificationNumber' must be a string and is required"
            },
            ine: {
              bsonType: "string",
              description: "'ine' must be a string and is required"
            },
            occupation: {
              bsonType: "string",
              description: "'occupation' must be a string and is required"
            }
          }
        }
      }
    });
  • Index

    Code Block
    languagejson
    db.customers.createIndex({customerKey: 1});

...

  • Collection name: accountCardLinks

  • Schema:

    Code Block
    languagejson
    db.createCollection("accountCardLinks", {
      validator: {
        $jsonSchema: {
          bsonType: "object",
          title: "Account Card Links Object Validation",
          required: ["cardNumber","cardholderType","customerOrAccountNumber"],
          properties: {
            cardNumber: {
              bsonType: "string",
              description: "'cardNumber' must be a string and is required"
            },
            cardholderType: {
              bsonType: "int",
              description: "'cardholderType' must be a stringint and is required"
            },
            customerOrAccountNumber: {
              bsonType: "string",
              description: "'customerOrAccountNumber' must be a string and is required"
            }
          }
        }
      }
    });
  • Index

    Code Block
    languagejson
    db.accountCardLinks.createIndex({cardNumber: 1});
    db.accountCardLinks.createIndex({cardholderType: 1});
    db.accountCardLinks.createIndex({customerOrAccountNumber: 1});
    db.accountCardLinks.createIndex({"cardNumber,cardholderType,customerOrAccountNumber": 1});

...