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

Function genMinModel

plugins/process-resources/src/__tests__/minmodel.ts:43–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41}
42
43export function genMinModel (): Array<TxCUD<Doc>> {
44 const txes = []
45 // Fill Tx'es with basic model classes.
46 txes.push(createClass(core.class.Obj, { label: 'Obj' as IntlString, kind: ClassifierKind.CLASS }))
47 txes.push(
48 createClass(core.class.Doc, { label: 'Doc' as IntlString, extends: core.class.Obj, kind: ClassifierKind.CLASS })
49 )
50 txes.push(
51 createClass(core.class.AttachedDoc, {
52 label: 'AttachedDoc' as IntlString,
53 extends: core.class.Doc,
54 kind: ClassifierKind.MIXIN
55 })
56 )
57 txes.push(
58 createClass(core.class.Class, {
59 label: 'Class' as IntlString,
60 extends: core.class.Doc,
61 kind: ClassifierKind.CLASS,
62 domain: DOMAIN_MODEL
63 })
64 )
65 txes.push(
66 createClass(core.class.Space, {
67 label: 'Space' as IntlString,
68 extends: core.class.Doc,
69 kind: ClassifierKind.CLASS,
70 domain: DOMAIN_MODEL
71 })
72 )
73
74 txes.push(
75 createClass(core.class.Tx, {
76 label: 'Tx' as IntlString,
77 extends: core.class.Doc,
78 kind: ClassifierKind.CLASS,
79 domain: DOMAIN_TX
80 })
81 )
82 txes.push(
83 createClass(core.class.TxCUD, {
84 label: 'TxCUD' as IntlString,
85 extends: core.class.Tx,
86 kind: ClassifierKind.CLASS,
87 domain: DOMAIN_TX
88 })
89 )
90 txes.push(
91 createClass(core.class.TxCreateDoc, {
92 label: 'TxCreateDoc' as IntlString,
93 extends: core.class.TxCUD,
94 kind: ClassifierKind.CLASS
95 })
96 )
97
98 // Add Card and Attribute related classes
99 txes.push(
100 createClass(card.class.Card, { label: 'Card' as IntlString, extends: core.class.Doc, kind: ClassifierKind.CLASS })

Callers 2

Calls 3

createClassFunction · 0.70
createDocFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected