-
-
Save Mattchewone/edc7ee41470d3b700c6be2fc85f17bed to your computer and use it in GitHub Desktop.
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 { 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