File tree Expand file tree Collapse file tree 6 files changed +7
-7
lines changed Expand file tree Collapse file tree 6 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1185,7 +1185,7 @@ export async function generateModelString(
1185
1185
jsonFields += `${ snakeCase ( relationName ) } : this.${ snakeCase ( relationName ) } ,\n`
1186
1186
1187
1187
relationMethods += `
1188
- async ${ relationName } Belong(): ${ modelRelation } Model {
1188
+ async ${ relationName } Belong(): Promise< ${ modelRelation } Model> {
1189
1189
if (this.${ modelKeyRelation } === undefined)
1190
1190
throw new HttpError(500, 'Relation Error!')
1191
1191
Original file line number Diff line number Diff line change @@ -657,7 +657,7 @@ export class DeploymentModel {
657
657
. execute ( )
658
658
}
659
659
660
- async userBelong ( ) : UserModel {
660
+ async userBelong ( ) : Promise < UserModel > {
661
661
if ( this . user_id === undefined )
662
662
throw new HttpError ( 500 , 'Relation Error!' )
663
663
Original file line number Diff line number Diff line change @@ -662,7 +662,7 @@ export class PaymentMethodModel {
662
662
. execute ( )
663
663
}
664
664
665
- async userBelong ( ) : UserModel {
665
+ async userBelong ( ) : Promise < UserModel > {
666
666
if ( this . user_id === undefined )
667
667
throw new HttpError ( 500 , 'Relation Error!' )
668
668
Original file line number Diff line number Diff line change @@ -592,7 +592,7 @@ export class PostModel {
592
592
. execute ( )
593
593
}
594
594
595
- async userBelong ( ) : UserModel {
595
+ async userBelong ( ) : Promise < UserModel > {
596
596
if ( this . user_id === undefined )
597
597
throw new HttpError ( 500 , 'Relation Error!' )
598
598
Original file line number Diff line number Diff line change @@ -690,7 +690,7 @@ export class SubscriptionModel {
690
690
. execute ( )
691
691
}
692
692
693
- async userBelong ( ) : UserModel {
693
+ async userBelong ( ) : Promise < UserModel > {
694
694
if ( this . user_id === undefined )
695
695
throw new HttpError ( 500 , 'Relation Error!' )
696
696
Original file line number Diff line number Diff line change @@ -646,7 +646,7 @@ export class TransactionModel {
646
646
. execute ( )
647
647
}
648
648
649
- async userBelong ( ) : UserModel {
649
+ async userBelong ( ) : Promise < UserModel > {
650
650
if ( this . user_id === undefined )
651
651
throw new HttpError ( 500 , 'Relation Error!' )
652
652
@@ -660,7 +660,7 @@ export class TransactionModel {
660
660
return model
661
661
}
662
662
663
- async paymentMethodBelong ( ) : PaymentMethodModel {
663
+ async paymentMethodBelong ( ) : Promise < PaymentMethodModel > {
664
664
if ( this . paymentmethod_id === undefined )
665
665
throw new HttpError ( 500 , 'Relation Error!' )
666
666
You can’t perform that action at this time.
0 commit comments