From 5189468bde32eb7d66dd593b34df82f6a091b167 Mon Sep 17 00:00:00 2001 From: Dekel Date: Sun, 26 Aug 2018 22:11:02 +0300 Subject: [PATCH] Updated docs and bumped version to 1.1.0 --- README.md | 52 ++++++++++++++++++++--------------------------- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 24 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 507efd0..f350b0b 100644 --- a/README.md +++ b/README.md @@ -72,22 +72,18 @@ const { Model } = require('objection'); class User extends Model { - static get tableName() { - return 'user'; - } + static tableName = 'user' + + static jsonSchema = { + type: 'object', + required: ['firstName', 'lastName'], - static get jsonSchema() { - return { - type: 'object', - required: ['firstName', 'lastName'], - - properties: { - id: { type: 'integer' }, - firstName: { type: 'string', maxLength: 45 }, - lastName: { type: 'string', maxLength: 45 }, - status: { type: 'string', enum: ['active', 'disabled'], default: 'active' }, - }, - }; + properties: { + id: { type: 'integer' }, + firstName: { type: 'string', maxLength: 45 }, + lastName: { type: 'string', maxLength: 45 }, + status: { type: 'string', enum: ['active', 'disabled'], default: 'active' }, + } } static get relationMappings() { @@ -132,22 +128,18 @@ const { Model } = require('objection'); class Todo extends Model { - static get tableName() { - return 'todo'; - } + static tableName = 'todo' + + static jsonSchema = { + type: 'object', + required: ['userId', 'text'], - static get jsonSchema() { - return { - type: 'object', - required: ['userId', 'text'], - - properties: { - id: { type: 'integer' }, - userId: { type: 'integer' }, - text: { type: 'string' }, - complete: { type: 'boolean', default: false }, - }, - }; + properties: { + id: { type: 'integer' }, + userId: { type: 'integer' }, + text: { type: 'string' }, + complete: { type: 'boolean', default: false }, + } } static get relationMappings() { diff --git a/package-lock.json b/package-lock.json index 33c8e4b..df7c0de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "feathers-objection", - "version": "1.0.6", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2e739a5..92dfa66 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "feathers-objection", "description": "A service plugin for ObjectionJS an ORM based on KnexJS", - "version": "1.0.6", + "version": "1.1.0", "homepage": "https://github.com/mcchrish/feathers-objection", "keywords": [ "feathers",