Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Create the data types
  • Loading branch information
mtancoigne committed Sep 28, 2018
1 parent a5ce485 commit 986504e
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions src/data_types/data_types.js
@@ -0,0 +1,54 @@
export default {
user: {
singular: 'user',
plural: 'users',
relations: {
many: ['posts', 'tasks'],
one: [
{field: 'billing_address', type: 'address'},
{field: 'delivery_address', type: 'address'},
],
habtm: [],
},
},
address: {
singular: 'address',
plural: 'addresses',
relations: {
many: [],
one: ['user'],
habtm: [],
},
},
article: {
singular: 'post',
plural: 'posts',
relations: {
many: [],
one: ['user'],
habtm: [
{name: 'tags', field: 'post_id', assoc: 'tag_id'},
],
},
},
tag: {
singular: 'tag',
plural: 'tags',
relations: {
many: [],
one: [],
habtm: [
{name: 'posts', field: 'tag_id', assoc: 'post_id'},
],
},
},
task: {
singular: 'task',
plural: 'tasks',
relations: {
many: [],
one: ['user'],
habtm: [],
},
},
}

0 comments on commit 986504e

Please sign in to comment.