NodeGeeks / loopback-connector-quickbooks

MIT License
6 stars 0 forks source link

Prepend `QB` to all models #8

Closed TeknoloGenie closed 7 years ago

TeknoloGenie commented 7 years ago

We consume the common model names, preventing developers from using them.

Problem: Developer wants to name their model Customer but can't. Solution: Prepend QB to all the connectors built-in models resulting in QBCustomer.

{
  "name": "Customer",
  "base": "QBCustomer",
  "idInjection": true,
  "options": {
    "validateUpsert": true
  },
  "properties": {
    "extra_property": {
      "type": "string"
    }
  },
  "validations": [],
  ...
}

note: until issue #10 extending on a QBModel will only result in the extra data being stored in the db DataSource.

TeknoloGenie commented 7 years ago

Resolved with commithttps://github.com/NodeGeeks/loopback-connector-quickbooks/commit/abcad85b38c849097040b879a1edaeec1a31dc1b