Skip to content

Instantly share code, notes, and snippets.

@ratneshsinghparihar
Last active December 12, 2017 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ratneshsinghparihar/6beea0b1a959769ff529d53203a9bc6d to your computer and use it in GitHub Desktop.
Save ratneshsinghparihar/6beea0b1a959769ff529d53203a9bc6d to your computer and use it in GitHub Desktop.
node-data-sample-demo-start-model
import {field, document} from 'nodedata/mongoose/decorators';
import {Strict} from 'nodedata/mongoose/enums';
@document({ name: 'blogs', strict: Strict.true })
export class BlogModel{
@field({primary: true, autogenerated: true})
_id: any;
@field()
name: any;
}
import {repository} from "nodedata/core/decorators/repository";
import {BlogModel} from '../models/blogmodel';
@repository({ path: 'blogs', model: BlogModel })
export default class BlogRepository {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment