MCPcopy
hub / github.com/hcengineering/platform / genMinModel

Function genMinModel

pods/server/src/__tests__/minmodel.ts:90–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 * @returns R
89 */
90export function genMinModel (): TxCUD<Doc>[] {
91 const txes = []
92 // Fill Tx'es with basic model classes.
93 txes.push(createClass(core.class.Obj, { label: 'Obj' as IntlString, kind: ClassifierKind.CLASS }))
94 txes.push(
95 createClass(core.class.Doc, { label: 'Doc' as IntlString, extends: core.class.Obj, kind: ClassifierKind.CLASS })
96 )
97 txes.push(
98 createClass(core.class.AttachedDoc, {
99 label: 'AttachedDoc' as IntlString,
100 extends: core.class.Doc,
101 kind: ClassifierKind.MIXIN
102 })
103 )
104 txes.push(
105 createClass(core.class.Class, {
106 label: 'Class' as IntlString,
107 extends: core.class.Doc,
108 kind: ClassifierKind.CLASS,
109 domain: DOMAIN_MODEL
110 })
111 )
112 txes.push(
113 createClass(core.class.Space, {
114 label: 'Space' as IntlString,
115 extends: core.class.Doc,
116 kind: ClassifierKind.CLASS,
117 domain: DOMAIN_MODEL
118 })
119 )
120 // txes.push(
121 // createClass(core.class.Account, {
122 // label: 'Account' as IntlString,
123 // extends: core.class.Doc,
124 // kind: ClassifierKind.CLASS,
125 // domain: DOMAIN_MODEL
126 // })
127 // )
128
129 txes.push(
130 createClass(core.class.Tx, {
131 label: 'Tx' as IntlString,
132 extends: core.class.Doc,
133 kind: ClassifierKind.CLASS,
134 domain: DOMAIN_TX
135 })
136 )
137 txes.push(
138 createClass(core.class.TxCUD, {
139 label: 'TxCUD' as IntlString,
140 extends: core.class.Tx,
141 kind: ClassifierKind.CLASS,
142 domain: DOMAIN_TX
143 })
144 )
145 txes.push(
146 createClass(core.class.TxCreateDoc, {
147 label: 'TxCreateDoc' as IntlString,

Callers 1

getModelDbFunction · 0.90

Calls 3

createClassFunction · 0.70
createDocFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected