Last active
December 12, 2017 20:27
-
-
Save ratneshsinghparihar/6beea0b1a959769ff529d53203a9bc6d to your computer and use it in GitHub Desktop.
node-data-sample-demo-start-model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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