Skip to content

Instantly share code, notes, and snippets.

@Mattchewone Mattchewone/messages-model.js Secret
Last active Dec 18, 2018

What would you like to do?
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
You can’t perform that action at this time.