Skip to content

Commit

Permalink
Updated docs and bumped version to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Dekel committed Aug 26, 2018
1 parent 7fff580 commit 5189468
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 32 deletions.
52 changes: 22 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 5189468

Please sign in to comment.