Skip to content

Commit 56eaf95

Browse files
chore: wip
1 parent af99567 commit 56eaf95

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

storage/framework/core/orm/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ export async function generateModelString(
11851185
jsonFields += `${snakeCase(relationName)}: this.${snakeCase(relationName)},\n`
11861186

11871187
relationMethods += `
1188-
async ${relationName}Belong(): ${modelRelation}Model {
1188+
async ${relationName}Belong(): Promise<${modelRelation}Model> {
11891189
if (this.${modelKeyRelation} === undefined)
11901190
throw new HttpError(500, 'Relation Error!')
11911191

storage/framework/orm/src/models/Deployment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ export class DeploymentModel {
657657
.execute()
658658
}
659659

660-
async userBelong(): UserModel {
660+
async userBelong(): Promise<UserModel> {
661661
if (this.user_id === undefined)
662662
throw new HttpError(500, 'Relation Error!')
663663

storage/framework/orm/src/models/PaymentMethod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ export class PaymentMethodModel {
662662
.execute()
663663
}
664664

665-
async userBelong(): UserModel {
665+
async userBelong(): Promise<UserModel> {
666666
if (this.user_id === undefined)
667667
throw new HttpError(500, 'Relation Error!')
668668

storage/framework/orm/src/models/Post.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ export class PostModel {
592592
.execute()
593593
}
594594

595-
async userBelong(): UserModel {
595+
async userBelong(): Promise<UserModel> {
596596
if (this.user_id === undefined)
597597
throw new HttpError(500, 'Relation Error!')
598598

storage/framework/orm/src/models/Subscription.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ export class SubscriptionModel {
690690
.execute()
691691
}
692692

693-
async userBelong(): UserModel {
693+
async userBelong(): Promise<UserModel> {
694694
if (this.user_id === undefined)
695695
throw new HttpError(500, 'Relation Error!')
696696

storage/framework/orm/src/models/Transaction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ export class TransactionModel {
646646
.execute()
647647
}
648648

649-
async userBelong(): UserModel {
649+
async userBelong(): Promise<UserModel> {
650650
if (this.user_id === undefined)
651651
throw new HttpError(500, 'Relation Error!')
652652

@@ -660,7 +660,7 @@ export class TransactionModel {
660660
return model
661661
}
662662

663-
async paymentMethodBelong(): PaymentMethodModel {
663+
async paymentMethodBelong(): Promise<PaymentMethodModel> {
664664
if (this.paymentmethod_id === undefined)
665665
throw new HttpError(500, 'Relation Error!')
666666

0 commit comments

Comments
 (0)