Documentation / @zerotal/orm / index / BaseModelWith
Function: BaseModelWith()
Call Signature
BaseModelWith<
A>(a):A
Defined in: packages/orm/src/model/mixins.ts:60
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
Parameters
a
(base) => A
Returns
A
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B>(a,b):B
Defined in: packages/orm/src/model/mixins.ts:61
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
Returns
B
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C>(a,b,c):C
Defined in: packages/orm/src/model/mixins.ts:65
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
Returns
C
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D>(a,b,c,d):D
Defined in: packages/orm/src/model/mixins.ts:70
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
Returns
D
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E>(a,b,c,d,e):E
Defined in: packages/orm/src/model/mixins.ts:76
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
Returns
E
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F>(a,b,c,d,e,f):F
Defined in: packages/orm/src/model/mixins.ts:89
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
Returns
F
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G>(a,b,c,d,e,f,g):G
Defined in: packages/orm/src/model/mixins.ts:104
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
Returns
G
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H>(a,b,c,d,e,f,g,h):H
Defined in: packages/orm/src/model/mixins.ts:121
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
Returns
H
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H,I>(a,b,c,d,e,f,g,h,i):I
Defined in: packages/orm/src/model/mixins.ts:140
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
I
I extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
i
(base) => I
Returns
I
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H,I,J>(a,b,c,d,e,f,g,h,i,j):J
Defined in: packages/orm/src/model/mixins.ts:161
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
I
I extends Constructor<object>
J
J extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
i
(base) => I
j
(base) => J
Returns
J
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H,I,J,K>(a,b,c,d,e,f,g,h,i,j,k):K
Defined in: packages/orm/src/model/mixins.ts:184
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
I
I extends Constructor<object>
J
J extends Constructor<object>
K
K extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
i
(base) => I
j
(base) => J
k
(base) => K
Returns
K
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H,I,J,K,L>(a,b,c,d,e,f,g,h,i,j,k,l):L
Defined in: packages/orm/src/model/mixins.ts:209
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
I
I extends Constructor<object>
J
J extends Constructor<object>
K
K extends Constructor<object>
L
L extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
i
(base) => I
j
(base) => J
k
(base) => K
l
(base) => L
Returns
L
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H,I,J,K,L,M>(a,b,c,d,e,f,g,h,i,j,k,l,m):M
Defined in: packages/orm/src/model/mixins.ts:236
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
I
I extends Constructor<object>
J
J extends Constructor<object>
K
K extends Constructor<object>
L
L extends Constructor<object>
M
M extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
i
(base) => I
j
(base) => J
k
(base) => K
l
(base) => L
m
(base) => M
Returns
M
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H,I,J,K,L,M,N>(a,b,c,d,e,f,g,h,i,j,k,l,m,n):N
Defined in: packages/orm/src/model/mixins.ts:265
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
I
I extends Constructor<object>
J
J extends Constructor<object>
K
K extends Constructor<object>
L
L extends Constructor<object>
M
M extends Constructor<object>
N
N extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
i
(base) => I
j
(base) => J
k
(base) => K
l
(base) => L
m
(base) => M
n
(base) => N
Returns
N
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o):O
Defined in: packages/orm/src/model/mixins.ts:296
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
I
I extends Constructor<object>
J
J extends Constructor<object>
K
K extends Constructor<object>
L
L extends Constructor<object>
M
M extends Constructor<object>
N
N extends Constructor<object>
O
O extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
i
(base) => I
j
(base) => J
k
(base) => K
l
(base) => L
m
(base) => M
n
(base) => N
o
(base) => O
Returns
O
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p):P
Defined in: packages/orm/src/model/mixins.ts:329
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
I
I extends Constructor<object>
J
J extends Constructor<object>
K
K extends Constructor<object>
L
L extends Constructor<object>
M
M extends Constructor<object>
N
N extends Constructor<object>
O
O extends Constructor<object>
P
P extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
i
(base) => I
j
(base) => J
k
(base) => K
l
(base) => L
m
(base) => M
n
(base) => N
o
(base) => O
p
(base) => P
Returns
P
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q):Q
Defined in: packages/orm/src/model/mixins.ts:364
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
I
I extends Constructor<object>
J
J extends Constructor<object>
K
K extends Constructor<object>
L
L extends Constructor<object>
M
M extends Constructor<object>
N
N extends Constructor<object>
O
O extends Constructor<object>
P
P extends Constructor<object>
Q
Q extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
i
(base) => I
j
(base) => J
k
(base) => K
l
(base) => L
m
(base) => M
n
(base) => N
o
(base) => O
p
(base) => P
q
(base) => Q
Returns
Q
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r):R
Defined in: packages/orm/src/model/mixins.ts:401
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
I
I extends Constructor<object>
J
J extends Constructor<object>
K
K extends Constructor<object>
L
L extends Constructor<object>
M
M extends Constructor<object>
N
N extends Constructor<object>
O
O extends Constructor<object>
P
P extends Constructor<object>
Q
Q extends Constructor<object>
R
R extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
i
(base) => I
j
(base) => J
k
(base) => K
l
(base) => L
m
(base) => M
n
(base) => N
o
(base) => O
p
(base) => P
q
(base) => Q
r
(base) => R
Returns
R
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s):S
Defined in: packages/orm/src/model/mixins.ts:440
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
I
I extends Constructor<object>
J
J extends Constructor<object>
K
K extends Constructor<object>
L
L extends Constructor<object>
M
M extends Constructor<object>
N
N extends Constructor<object>
O
O extends Constructor<object>
P
P extends Constructor<object>
Q
Q extends Constructor<object>
R
R extends Constructor<object>
S
S extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
i
(base) => I
j
(base) => J
k
(base) => K
l
(base) => L
m
(base) => M
n
(base) => N
o
(base) => O
p
(base) => P
q
(base) => Q
r
(base) => R
s
(base) => S
Returns
S
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}
Call Signature
BaseModelWith<
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t):T
Defined in: packages/orm/src/model/mixins.ts:481
Compose any number of model mixins on top of BaseModel,
folding them left-to-right so the resulting class carries BaseModel's full
static surface (query(), find(), create(), scopes, …) plus every mixin's
instance and static members — all fully type-checked.
Prefer this over hand-nesting mixins (Roles(Permissions(AuthUser))), which
reads inside-out and repeats the base. Each overload (1–20 mixins) threads the
accumulated type through every step; for more, nest a second BaseModelWith(...).
Type Parameters
A
A extends Constructor<object>
B
B extends Constructor<object>
C
C extends Constructor<object>
D
D extends Constructor<object>
E
E extends Constructor<object>
F
F extends Constructor<object>
G
G extends Constructor<object>
H
H extends Constructor<object>
I
I extends Constructor<object>
J
J extends Constructor<object>
K
K extends Constructor<object>
L
L extends Constructor<object>
M
M extends Constructor<object>
N
N extends Constructor<object>
O
O extends Constructor<object>
P
P extends Constructor<object>
Q
Q extends Constructor<object>
R
R extends Constructor<object>
S
S extends Constructor<object>
T
T extends Constructor<object>
Parameters
a
(base) => A
b
(base) => B
c
(base) => C
d
(base) => D
e
(base) => E
f
(base) => F
g
(base) => G
h
(base) => H
i
(base) => I
j
(base) => J
k
(base) => K
l
(base) => L
m
(base) => M
n
(base) => N
o
(base) => O
p
(base) => P
q
(base) => Q
r
(base) => R
s
(base) => S
t
(base) => T
Returns
T
A model class extending BaseModel with every mixin applied.
Example
class User extends BaseModelWith(Authenticatable, Permissions, Roles) {}