Skip to content

Commit e790e17

Browse files
chore: wip
1 parent ffe64d4 commit e790e17

File tree

18 files changed

+147
-69
lines changed

18 files changed

+147
-69
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -905,21 +905,24 @@ export async function generateModelString(
905905
906906
mapCustomGetters(models: ${modelName}JsonResponse | ${modelName}JsonResponse[]): void {
907907
const data = models
908-
909-
const customGetter = {
910-
${getterOutput.output}
911-
}
912908
913909
if (Array.isArray(data)) {
914910
data.map((model: ${modelName}JsonResponse) => {
915-
911+
912+
const customGetter = {
913+
${getterOutput.output}
914+
}
916915
917916
${getterOutput.loopString}
918917
919918
return model
920919
})
921920
} else {
922921
const model = data
922+
923+
const customGetter = {
924+
${getterOutput.output}
925+
}
923926
924927
${getterOutput.loopString}
925928
}

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,21 @@ export class AccessTokenModel {
8989
mapCustomGetters(models: AccessTokenJsonResponse | AccessTokenJsonResponse[]): void {
9090
const data = models
9191

92-
const customGetter = {
93-
94-
}
95-
9692
if (Array.isArray(data)) {
9793
data.map((model: AccessTokenJsonResponse) => {
94+
const customGetter = {
95+
96+
}
97+
9898
return model
9999
})
100100
}
101101
else {
102102
const model = data
103+
104+
const customGetter = {
105+
106+
}
103107
}
104108
}
105109

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,21 @@ export class ActivityModel {
8888
mapCustomGetters(models: ActivityJsonResponse | ActivityJsonResponse[]): void {
8989
const data = models
9090

91-
const customGetter = {
92-
93-
}
94-
9591
if (Array.isArray(data)) {
9692
data.map((model: ActivityJsonResponse) => {
93+
const customGetter = {
94+
95+
}
96+
9797
return model
9898
})
9999
}
100100
else {
101101
const model = data
102+
103+
const customGetter = {
104+
105+
}
102106
}
103107
}
104108

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,21 @@ export class DeploymentModel {
9494
mapCustomGetters(models: DeploymentJsonResponse | DeploymentJsonResponse[]): void {
9595
const data = models
9696

97-
const customGetter = {
98-
99-
}
100-
10197
if (Array.isArray(data)) {
10298
data.map((model: DeploymentJsonResponse) => {
99+
const customGetter = {
100+
101+
}
102+
103103
return model
104104
})
105105
}
106106
else {
107107
const model = data
108+
109+
const customGetter = {
110+
111+
}
108112
}
109113
}
110114

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,21 @@ export class ErrorModel {
8585
mapCustomGetters(models: ErrorJsonResponse | ErrorJsonResponse[]): void {
8686
const data = models
8787

88-
const customGetter = {
89-
90-
}
91-
9288
if (Array.isArray(data)) {
9389
data.map((model: ErrorJsonResponse) => {
90+
const customGetter = {
91+
92+
}
93+
9494
return model
9595
})
9696
}
9797
else {
9898
const model = data
99+
100+
const customGetter = {
101+
102+
}
99103
}
100104
}
101105

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,21 @@ export class FailedJobModel {
8585
mapCustomGetters(models: FailedJobJsonResponse | FailedJobJsonResponse[]): void {
8686
const data = models
8787

88-
const customGetter = {
89-
90-
}
91-
9288
if (Array.isArray(data)) {
9389
data.map((model: FailedJobJsonResponse) => {
90+
const customGetter = {
91+
92+
}
93+
9494
return model
9595
})
9696
}
9797
else {
9898
const model = data
99+
100+
const customGetter = {
101+
102+
}
99103
}
100104
}
101105

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,21 @@ export class JobModel {
8585
mapCustomGetters(models: JobJsonResponse | JobJsonResponse[]): void {
8686
const data = models
8787

88-
const customGetter = {
89-
90-
}
91-
9288
if (Array.isArray(data)) {
9389
data.map((model: JobJsonResponse) => {
90+
const customGetter = {
91+
92+
}
93+
9494
return model
9595
})
9696
}
9797
else {
9898
const model = data
99+
100+
const customGetter = {
101+
102+
}
99103
}
100104
}
101105

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,21 @@ export class PaymentMethodModel {
9797
mapCustomGetters(models: PaymentMethodJsonResponse | PaymentMethodJsonResponse[]): void {
9898
const data = models
9999

100-
const customGetter = {
101-
102-
}
103-
104100
if (Array.isArray(data)) {
105101
data.map((model: PaymentMethodJsonResponse) => {
102+
const customGetter = {
103+
104+
}
105+
106106
return model
107107
})
108108
}
109109
else {
110110
const model = data
111+
112+
const customGetter = {
113+
114+
}
111115
}
112116
}
113117

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,21 @@ export class PostModel {
8787
mapCustomGetters(models: PostJsonResponse | PostJsonResponse[]): void {
8888
const data = models
8989

90-
const customGetter = {
91-
92-
}
93-
9490
if (Array.isArray(data)) {
9591
data.map((model: PostJsonResponse) => {
92+
const customGetter = {
93+
94+
}
95+
9696
return model
9797
})
9898
}
9999
else {
100100
const model = data
101+
102+
const customGetter = {
103+
104+
}
101105
}
102106
}
103107

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,21 @@ export class ProductModel {
8989
mapCustomGetters(models: ProductJsonResponse | ProductJsonResponse[]): void {
9090
const data = models
9191

92-
const customGetter = {
93-
94-
}
95-
9692
if (Array.isArray(data)) {
9793
data.map((model: ProductJsonResponse) => {
94+
const customGetter = {
95+
96+
}
97+
9898
return model
9999
})
100100
}
101101
else {
102102
const model = data
103+
104+
const customGetter = {
105+
106+
}
103107
}
104108
}
105109

0 commit comments

Comments
 (0)