-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
MessageModel.base.ts
39 lines (34 loc) · 974 Bytes
/
MessageModel.base.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* This is a mst-sql generated file, don't modify it manually */
/* eslint-disable */
/* tslint:disable */
import { types } from "mobx-state-tree"
import { MSTGQLObject, MSTGQLRef } from "mst-gql"
import { UserModel } from "./UserModel"
import { ReplyModel } from "./ReplyModel"
import { RootStore } from "./index"
/**
* MessageBase
* auto generated base class for the model MessageModel.
*/
export const MessageModelBase = MSTGQLObject
.named('Message')
.props({
__typename: types.optional(types.literal("Message"), "Message"),
id: types.identifier,
timestamp: types.number,
user: MSTGQLRef(types.late(() => UserModel)),
text: types.string,
likes: types.array(MSTGQLRef(types.late(() => UserModel))),
replies: types.array(types.late(() => ReplyModel)),
})
.views(self => ({
get store() {
return self.__getStore<typeof RootStore.Type>()
}
}))
export const messageModelPrimitives = `
__typename
id
timestamp
text
`