Skip to content

Instantly share code, notes, and snippets.

@Mattchewone
Last active December 18, 2018 14:31
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 Mattchewone/edc7ee41470d3b700c6be2fc85f17bed to your computer and use it in GitHub Desktop.
Save Mattchewone/edc7ee41470d3b700c6be2fc85f17bed to your computer and use it in GitHub Desktop.
import { DefineMap, DefineList, QueryLogic } from 'can'
import feathersClient from '../feathers-client'
import feathersConnection from './connections/feathers'
import feathersQueryLogic from 'feathers-query-logic'
var Message = DefineMap.extend('Message', {
_id: {
identity: true,
type: 'string'
},
name: 'string',
to: 'string',
from: 'string'
})
Message.List = DefineList.extend({
'#': Message
})
Message.connection = feathersConnection({
idProp: '_id',
Map: Message,
List: Message.List,
feathersService: feathersClient.service('/messages'),
name: 'message',
queryLogic: new QueryLogic(Message, feathersQueryLogic)
})
export default Message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment