Skip to content

Commit aa0909e

Browse files
chore: wip
1 parent 40ba13a commit aa0909e

File tree

17 files changed

+153
-0
lines changed

17 files changed

+153
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,6 +1814,15 @@ export async function generateModelString(
18141814
return this
18151815
}
18161816
1817+
forceFill(data: Partial<${modelName}Type>): ${modelName}Model {
1818+
this.attributes = {
1819+
...this.attributes,
1820+
...data
1821+
}
1822+
1823+
return this
1824+
}
1825+
18171826
18181827
// Method to delete (soft delete) the ${formattedModelName} instance
18191828
async delete(): Promise<any> {

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,15 @@ export class AccessTokenModel {
11321132
return this
11331133
}
11341134

1135+
forceFill(data: Partial<AccessTokenType>): AccessTokenModel {
1136+
this.attributes = {
1137+
...this.attributes,
1138+
...data,
1139+
}
1140+
1141+
return this
1142+
}
1143+
11351144
// Method to delete (soft delete) the accesstoken instance
11361145
async delete(): Promise<any> {
11371146
if (this.id === undefined)

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,15 @@ export class DeploymentModel {
11941194
return this
11951195
}
11961196

1197+
forceFill(data: Partial<DeploymentType>): DeploymentModel {
1198+
this.attributes = {
1199+
...this.attributes,
1200+
...data,
1201+
}
1202+
1203+
return this
1204+
}
1205+
11971206
// Method to delete (soft delete) the deployment instance
11981207
async delete(): Promise<any> {
11991208
if (this.id === undefined)

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,15 @@ export class ErrorModel {
11321132
return this
11331133
}
11341134

1135+
forceFill(data: Partial<ErrorType>): ErrorModel {
1136+
this.attributes = {
1137+
...this.attributes,
1138+
...data,
1139+
}
1140+
1141+
return this
1142+
}
1143+
11351144
// Method to delete (soft delete) the error instance
11361145
async delete(): Promise<any> {
11371146
if (this.id === undefined)

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,15 @@ export class FailedJobModel {
11321132
return this
11331133
}
11341134

1135+
forceFill(data: Partial<FailedJobType>): FailedJobModel {
1136+
this.attributes = {
1137+
...this.attributes,
1138+
...data,
1139+
}
1140+
1141+
return this
1142+
}
1143+
11351144
// Method to delete (soft delete) the failedjob instance
11361145
async delete(): Promise<any> {
11371146
if (this.id === undefined)

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,15 @@ export class JobModel {
11321132
return this
11331133
}
11341134

1135+
forceFill(data: Partial<JobType>): JobModel {
1136+
this.attributes = {
1137+
...this.attributes,
1138+
...data,
1139+
}
1140+
1141+
return this
1142+
}
1143+
11351144
// Method to delete (soft delete) the job instance
11361145
async delete(): Promise<any> {
11371146
if (this.id === undefined)

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,15 @@ export class PaymentMethodModel {
12071207
return this
12081208
}
12091209

1210+
forceFill(data: Partial<PaymentMethodType>): PaymentMethodModel {
1211+
this.attributes = {
1212+
...this.attributes,
1213+
...data,
1214+
}
1215+
1216+
return this
1217+
}
1218+
12101219
// Method to delete (soft delete) the paymentmethod instance
12111220
async delete(): Promise<any> {
12121221
if (this.id === undefined)

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,15 @@ export class PostModel {
10981098
return this
10991099
}
11001100

1101+
forceFill(data: Partial<PostType>): PostModel {
1102+
this.attributes = {
1103+
...this.attributes,
1104+
...data,
1105+
}
1106+
1107+
return this
1108+
}
1109+
11011110
// Method to delete (soft delete) the post instance
11021111
async delete(): Promise<any> {
11031112
if (this.id === undefined)

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,15 @@ export class ProductModel {
11771177
return this
11781178
}
11791179

1180+
forceFill(data: Partial<ProductType>): ProductModel {
1181+
this.attributes = {
1182+
...this.attributes,
1183+
...data,
1184+
}
1185+
1186+
return this
1187+
}
1188+
11801189
// Method to delete (soft delete) the product instance
11811190
async delete(): Promise<any> {
11821191
if (this.id === undefined)

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,15 @@ export class ProjectModel {
11151115
return this
11161116
}
11171117

1118+
forceFill(data: Partial<ProjectType>): ProjectModel {
1119+
this.attributes = {
1120+
...this.attributes,
1121+
...data,
1122+
}
1123+
1124+
return this
1125+
}
1126+
11181127
// Method to delete (soft delete) the project instance
11191128
async delete(): Promise<any> {
11201129
if (this.id === undefined)

0 commit comments

Comments
 (0)