1313// limitations under the License.
1414//
1515
16- import type { Account , Arr , Class , Data , Doc , Domain , Mixin , Obj , Ref , TxCreateDoc , TxCUD } from '@hcengineering/core'
16+ import type {
17+ Account ,
18+ Arr ,
19+ Class ,
20+ Data ,
21+ Doc ,
22+ Domain ,
23+ Mixin ,
24+ Obj ,
25+ Ref ,
26+ Space ,
27+ TxCreateDoc ,
28+ TxCUD
29+ } from '@hcengineering/core'
1730import core , { AccountRole , AttachedDoc , ClassifierKind , DOMAIN_MODEL , DOMAIN_TX , TxFactory } from '@hcengineering/core'
1831import type { IntlString , Plugin } from '@hcengineering/platform'
1932import { plugin } from '@hcengineering/platform'
@@ -54,16 +67,26 @@ export interface AttachedComment extends AttachedDoc {
5467 message : string
5568}
5669
70+ interface TestProject extends Space {
71+ prjName : string
72+ }
73+
74+ interface TestProjectMixin extends TestProject {
75+ someField ?: string
76+ }
77+
5778/**
5879 * @public
5980 */
6081export const test = plugin ( 'test' as Plugin , {
6182 mixin : {
62- TestMixin : '' as Ref < Mixin < TestMixin > >
83+ TestMixin : '' as Ref < Mixin < TestMixin > > ,
84+ TestProjectMixin : '' as Ref < Mixin < TestProjectMixin > >
6385 } ,
6486 class : {
6587 TestComment : '' as Ref < Class < AttachedComment > > ,
66- ParticipantsHolder : '' as Ref < Class < ParticipantsHolder > >
88+ ParticipantsHolder : '' as Ref < Class < ParticipantsHolder > > ,
89+ TestProject : '' as Ref < Class < TestProject > >
6790 }
6891} )
6992
@@ -89,20 +112,28 @@ export function genMinModel (): TxCUD<Doc>[] {
89112 createClass ( core . class . Doc , { label : 'Doc' as IntlString , extends : core . class . Obj , kind : ClassifierKind . CLASS } )
90113 )
91114 txes . push (
92- createClass ( core . class . AttachedDoc , {
93- label : 'AttachedDoc ' as IntlString ,
115+ createClass ( core . class . Class , {
116+ label : 'Class ' as IntlString ,
94117 extends : core . class . Doc ,
95- kind : ClassifierKind . MIXIN
118+ kind : ClassifierKind . CLASS ,
119+ domain : DOMAIN_MODEL
96120 } )
97121 )
98122 txes . push (
99- createClass ( core . class . Class , {
100- label : 'Class ' as IntlString ,
101- extends : core . class . Doc ,
123+ createClass ( core . class . Mixin , {
124+ label : 'Mixin ' as IntlString ,
125+ extends : core . class . Class ,
102126 kind : ClassifierKind . CLASS ,
103127 domain : DOMAIN_MODEL
104128 } )
105129 )
130+ txes . push (
131+ createClass ( core . class . AttachedDoc , {
132+ label : 'AttachedDoc' as IntlString ,
133+ extends : core . class . Doc ,
134+ kind : ClassifierKind . MIXIN
135+ } )
136+ )
106137 txes . push (
107138 createClass ( core . class . Space , {
108139 label : 'Space' as IntlString ,
@@ -164,6 +195,13 @@ export function genMinModel (): TxCUD<Doc>[] {
164195 kind : ClassifierKind . CLASS
165196 } )
166197 )
198+ txes . push (
199+ createClass ( core . class . TxMixin , {
200+ label : 'TxMixin' as IntlString ,
201+ extends : core . class . TxCUD ,
202+ kind : ClassifierKind . CLASS
203+ } )
204+ )
167205
168206 txes . push (
169207 createClass ( test . mixin . TestMixin , {
@@ -173,6 +211,23 @@ export function genMinModel (): TxCUD<Doc>[] {
173211 } )
174212 )
175213
214+ txes . push (
215+ createClass ( test . class . TestProject , {
216+ label : 'TestProject' as IntlString ,
217+ extends : core . class . Space ,
218+ kind : ClassifierKind . CLASS ,
219+ domain : DOMAIN_TEST
220+ } )
221+ )
222+
223+ txes . push (
224+ createClass ( test . mixin . TestProjectMixin , {
225+ label : 'TestProjectMixin' as IntlString ,
226+ extends : test . class . TestProject ,
227+ kind : ClassifierKind . MIXIN
228+ } )
229+ )
230+
176231 txes . push (
177232 createClass ( test . class . TestComment , {
178233 label : 'TestComment' as IntlString ,
0 commit comments