Skip to content

Commit 2cae246

Browse files
chore: wip
1 parent 8dc1704 commit 2cae246

19 files changed

+38
-39
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,11 +1864,11 @@ export async function generateModelString(
18641864
18651865
${whereStatements}
18661866
1867-
whereIn(column: string, values: any[]): ${modelName}Model {
1867+
whereIn(column: keyof ${formattedTableName}Table, values: any[]): ${modelName}Model {
18681868
return ${modelName}Model.whereIn(column, values)
18691869
}
18701870
1871-
static whereIn(column: string, values: any[]): ${modelName}Model {
1871+
static whereIn(column: keyof ${formattedTableName}Table, values: any[]): ${modelName}Model {
18721872
const instance = new ${modelName}Model(null)
18731873
18741874
instance.selectFromQuery = instance.selectFromQuery.where(column, 'in', values)
@@ -2131,7 +2131,6 @@ export async function generateModelString(
21312131
this.mapCustomGetters(model)
21322132
await this.loadRelations(model)
21332133
}
2134-
21352134
21362135
const data = new ${modelName}Model(model as ${modelName}Type)
21372136

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,11 +1098,11 @@ export class AccessTokenModel {
10981098
return instance
10991099
}
11001100

1101-
whereIn(column: string, values: any[]): AccessTokenModel {
1101+
whereIn(column: keyof PersonalAccessTokensTable, values: any[]): AccessTokenModel {
11021102
return AccessTokenModel.whereIn(column, values)
11031103
}
11041104

1105-
static whereIn(column: string, values: any[]): AccessTokenModel {
1105+
static whereIn(column: keyof PersonalAccessTokensTable, values: any[]): AccessTokenModel {
11061106
const instance = new AccessTokenModel(null)
11071107

11081108
instance.selectFromQuery = instance.selectFromQuery.where(column, 'in', values)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,11 +1148,11 @@ export class ActivityModel {
11481148
return instance
11491149
}
11501150

1151-
whereIn(column: string, values: any[]): ActivityModel {
1151+
whereIn(column: keyof ActivitiesTable, values: any[]): ActivityModel {
11521152
return ActivityModel.whereIn(column, values)
11531153
}
11541154

1155-
static whereIn(column: string, values: any[]): ActivityModel {
1155+
static whereIn(column: keyof ActivitiesTable, values: any[]): ActivityModel {
11561156
const instance = new ActivityModel(null)
11571157

11581158
instance.selectFromQuery = instance.selectFromQuery.where(column, 'in', values)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,11 +1163,11 @@ export class DeploymentModel {
11631163
return instance
11641164
}
11651165

1166-
whereIn(column: string, values: any[]): DeploymentModel {
1166+
whereIn(column: keyof DeploymentsTable, values: any[]): DeploymentModel {
11671167
return DeploymentModel.whereIn(column, values)
11681168
}
11691169

1170-
static whereIn(column: string, values: any[]): DeploymentModel {
1170+
static whereIn(column: keyof DeploymentsTable, values: any[]): DeploymentModel {
11711171
const instance = new DeploymentModel(null)
11721172

11731173
instance.selectFromQuery = instance.selectFromQuery.where(column, 'in', values)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,11 +1102,11 @@ export class ErrorModel {
11021102
return instance
11031103
}
11041104

1105-
whereIn(column: string, values: any[]): ErrorModel {
1105+
whereIn(column: keyof ErrorsTable, values: any[]): ErrorModel {
11061106
return ErrorModel.whereIn(column, values)
11071107
}
11081108

1109-
static whereIn(column: string, values: any[]): ErrorModel {
1109+
static whereIn(column: keyof ErrorsTable, values: any[]): ErrorModel {
11101110
const instance = new ErrorModel(null)
11111111

11121112
instance.selectFromQuery = instance.selectFromQuery.where(column, 'in', values)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,11 +1102,11 @@ export class FailedJobModel {
11021102
return instance
11031103
}
11041104

1105-
whereIn(column: string, values: any[]): FailedJobModel {
1105+
whereIn(column: keyof FailedJobsTable, values: any[]): FailedJobModel {
11061106
return FailedJobModel.whereIn(column, values)
11071107
}
11081108

1109-
static whereIn(column: string, values: any[]): FailedJobModel {
1109+
static whereIn(column: keyof FailedJobsTable, values: any[]): FailedJobModel {
11101110
const instance = new FailedJobModel(null)
11111111

11121112
instance.selectFromQuery = instance.selectFromQuery.where(column, 'in', values)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,11 +1102,11 @@ export class JobModel {
11021102
return instance
11031103
}
11041104

1105-
whereIn(column: string, values: any[]): JobModel {
1105+
whereIn(column: keyof JobsTable, values: any[]): JobModel {
11061106
return JobModel.whereIn(column, values)
11071107
}
11081108

1109-
static whereIn(column: string, values: any[]): JobModel {
1109+
static whereIn(column: keyof JobsTable, values: any[]): JobModel {
11101110
const instance = new JobModel(null)
11111111

11121112
instance.selectFromQuery = instance.selectFromQuery.where(column, 'in', values)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,11 +1170,11 @@ export class PaymentMethodModel {
11701170
return instance
11711171
}
11721172

1173-
whereIn(column: string, values: any[]): PaymentMethodModel {
1173+
whereIn(column: keyof PaymentMethodsTable, values: any[]): PaymentMethodModel {
11741174
return PaymentMethodModel.whereIn(column, values)
11751175
}
11761176

1177-
static whereIn(column: string, values: any[]): PaymentMethodModel {
1177+
static whereIn(column: keyof PaymentMethodsTable, values: any[]): PaymentMethodModel {
11781178
const instance = new PaymentMethodModel(null)
11791179

11801180
instance.selectFromQuery = instance.selectFromQuery.where(column, 'in', values)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,11 +1064,11 @@ export class PostModel {
10641064
return instance
10651065
}
10661066

1067-
whereIn(column: string, values: any[]): PostModel {
1067+
whereIn(column: keyof PostsTable, values: any[]): PostModel {
10681068
return PostModel.whereIn(column, values)
10691069
}
10701070

1071-
static whereIn(column: string, values: any[]): PostModel {
1071+
static whereIn(column: keyof PostsTable, values: any[]): PostModel {
10721072
const instance = new PostModel(null)
10731073

10741074
instance.selectFromQuery = instance.selectFromQuery.where(column, 'in', values)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,11 +1150,11 @@ export class ProductModel {
11501150
return instance
11511151
}
11521152

1153-
whereIn(column: string, values: any[]): ProductModel {
1153+
whereIn(column: keyof ProductsTable, values: any[]): ProductModel {
11541154
return ProductModel.whereIn(column, values)
11551155
}
11561156

1157-
static whereIn(column: string, values: any[]): ProductModel {
1157+
static whereIn(column: keyof ProductsTable, values: any[]): ProductModel {
11581158
const instance = new ProductModel(null)
11591159

11601160
instance.selectFromQuery = instance.selectFromQuery.where(column, 'in', values)

0 commit comments

Comments
 (0)