Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setup() {
return new Schema(new Db(), {
wordSmith: Model.extend({
blogPosts: hasMany()
}),
blogPost: Model.extend({
wordSmith: belongsTo(),
fineComments: hasMany()
}),
fineComment: Model.extend({
blogPost: belongsTo()
}),
greatPhoto: Model,
foo: Model.extend({
bar: belongsTo()
}),
bar: Model.extend({
baz: belongsTo()
}),
baz: Model.extend({
quuxes: hasMany()
}),
quux: Model.extend({
wordSmith: belongsTo(),
fineComments: hasMany()
}),
fineComment: Model.extend({
blogPost: belongsTo()
}),
greatPhoto: Model,
foo: Model.extend({
bar: belongsTo()
}),
bar: Model.extend({
baz: belongsTo()
}),
baz: Model.extend({
quuxes: hasMany()
}),
quux: Model.extend({
zomgs: hasMany()
}),
zomg: Model.extend({
lol: belongsTo()
}),
lol: Model
});
}
import { Model, hasMany, belongsTo } from 'ember-cli-mirage';
export default Model.extend({
parent: belongsTo('category', { inverse: 'subcategories' }),
subcategories: hasMany('category', { inverse: 'parent' }),
addons: hasMany('addon')
});
import { Model, hasMany, belongsTo } from 'ember-cli-mirage';
export default Model.extend({
readme: belongsTo(),
latestAddonVersion: belongsTo('version', { inverse: null }),
latestReview: belongsTo('review', { inverse: null }),
versions: hasMany('version', { inverse: 'addon' }),
keywords: hasMany(),
categories: hasMany(),
maintainers: hasMany(),
githubUsers: hasMany(),
});
import { Model, belongsTo, hasMany } from 'ember-cli-mirage';
export default Model.extend({
plugin: belongsTo('csi-plugin'),
writeAllocs: hasMany('allocation'),
readAllocs: hasMany('allocation'),
allocations: hasMany('allocation'),
});
import { Model, belongsTo, hasMany } from 'ember-cli-mirage';
export default Model.extend({
githubAppInstallations: hasMany('github-app-installation'),
organizations: hasMany('organization'),
projectUsers: hasMany('project-user'),
sluggedRoute: belongsTo('slugged-route'),
stripeConnectSubscriptions: hasMany('stripe-connect-subscription'),
stripePlatformCard: belongsTo('stripe-platform-card'),
stripePlatformCustomer: belongsTo('stripe-platform-customer'),
userCategories: hasMany('user-category'),
userRoles: hasMany('user-role'),
userSkills: hasMany('user-skill')
});
import { Model, belongsTo, hasMany } from 'ember-cli-mirage';
export default Model.extend({
donationGoals: hasMany('donation-goal'),
githubRepos: hasMany('github-repo'),
organization: belongsTo(),
projectCategories: hasMany('project-category'),
projectSkills: hasMany('project-skill'),
projectUsers: hasMany('project-user'),
stripeConnectPlan: belongsTo('stripe-connect-plan'),
taskLists: hasMany('task-list'),
tasks: hasMany()
});
import { Model, belongsTo, hasMany } from 'ember-cli-mirage';
export default Model.extend({
owner: belongsTo('githubUser', { inverse: null }),
defaultBranch: belongsTo('github-branch', { inverse: null }),
pulls: hasMany('github-pull'),
branches: hasMany('github-branch'),
releases: hasMany('github-release')
});
import { Model, hasMany } from 'ember-cli-mirage';
export default Model.extend({
repositories: hasMany(),
});
import { Model, hasMany, belongsTo } from 'ember-cli-mirage';
export default Model.extend({
readme: belongsTo(),
latestAddonVersion: belongsTo('version', { inverse: null }),
latestReview: belongsTo('review', { inverse: null }),
versions: hasMany('version', { inverse: 'addon' }),
keywords: hasMany(),
categories: hasMany(),
maintainers: hasMany(),
githubUsers: hasMany(),
});