File tree 1 file changed +10
-5
lines changed
storage/framework/core/types/src
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,12 @@ interface Relation<T = string> extends BaseRelation {
17
17
interface HasOne < T = string > extends Array < Relation < T > > { }
18
18
interface HasMany < T = string > extends Array < Relation < T > > { }
19
19
interface BelongsTo < T = string > extends Array < Relation < T > > { }
20
- interface BelongsToMany < T = string > extends Array < T > { }
20
+ interface BelongsToMany < T = string > extends Array < {
21
+ model : T
22
+ firstForeignKey ?: string
23
+ secondForeignKey ?: string
24
+ pivotTable ?: string
25
+ } | T > { }
21
26
22
27
interface HasOneThrough < T = string > extends Array < {
23
28
model : T
@@ -69,10 +74,10 @@ interface ActivityLogOption {
69
74
}
70
75
71
76
export interface Relations {
72
- hasOne ?: HasOne < ModelNames > | string [ ]
73
- hasMany ?: HasMany < ModelNames > | ModelNames [ ]
74
- belongsTo ?: BelongsTo < ModelNames > | ModelNames [ ]
75
- belongsToMany ?: BelongsToMany < ModelNames > | ModelNames [ ]
77
+ hasOne ?: HasOne < ModelNames >
78
+ hasMany ?: HasMany < ModelNames >
79
+ belongsTo ?: BelongsTo < ModelNames >
80
+ belongsToMany ?: BelongsToMany < ModelNames >
76
81
hasOneThrough ?: HasOneThrough < ModelNames >
77
82
}
78
83
You can’t perform that action at this time.
0 commit comments