Skip to content

Commit 1ea6bb9

Browse files
chore: wip
1 parent a698866 commit 1ea6bb9

21 files changed

+109
-118
lines changed

storage/framework/defaults/models/Content/Author.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@ export default {
4747

4848
attributes: {
4949
name: {
50-
required: true,
5150
order: 1,
5251
fillable: true,
5352
validation: {
54-
rule: schema.string().min(5).max(255),
53+
rule: schema.string().required().min(5).max(255),
5554
message: {
5655
min: 'Name must have a minimum of 3 characters',
5756
max: 'Name must have a maximum of 255 characters',
@@ -63,11 +62,10 @@ export default {
6362

6463
email: {
6564
unique: true,
66-
required: true,
6765
order: 2,
6866
fillable: true,
6967
validation: {
70-
rule: schema.string().email(),
68+
rule: schema.string().required().email(),
7169
message: {
7270
email: 'Email must be a valid email address',
7371
},

storage/framework/defaults/models/PaymentTransaction.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ export default {
1717
},
1818
attributes: {
1919
name: {
20-
required: true,
2120
fillable: true,
2221
validation: {
23-
rule: schema.string().max(255),
22+
rule: schema.string().required().max(255),
2423
message: {
2524
string: 'name must be a string',
2625
required: 'name is required',
@@ -42,10 +41,9 @@ export default {
4241
},
4342

4443
amount: {
45-
required: true,
4644
fillable: true,
4745
validation: {
48-
rule: schema.number(),
46+
rule: schema.number().required(),
4947
message: {
5048
number: 'amount must be a number',
5149
required: 'amount is required',
@@ -55,10 +53,9 @@ export default {
5553
},
5654

5755
type: {
58-
required: true,
5956
fillable: true,
6057
validation: {
61-
rule: schema.string().max(50),
58+
rule: schema.string().required().max(50),
6259
message: {
6360
string: 'type must be a string',
6461
max: 'type must have a maximum of 512 characters',

storage/framework/defaults/models/Subscription.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ export default {
1212
},
1313
attributes: {
1414
type: {
15-
required: true,
1615
fillable: true,
1716
validation: {
18-
rule: schema.string().max(512),
17+
rule: schema.string().required().max(512),
1918
message: {
2019
string: 'type must be a string',
2120
required: 'type is required',
@@ -39,11 +38,10 @@ export default {
3938
},
4039

4140
providerId: {
42-
required: true,
4341
unique: true,
4442
fillable: true,
4543
validation: {
46-
rule: schema.string().max(255),
44+
rule: schema.string().required().max(255),
4745
message: {
4846
string: 'provider_id must be a string',
4947
required: 'provider_id is required',
@@ -54,10 +52,9 @@ export default {
5452
},
5553

5654
providerStatus: {
57-
required: true,
5855
fillable: true,
5956
validation: {
60-
rule: schema.string(),
57+
rule: schema.string().required(),
6158
message: {
6259
string: 'provider_status must be a string',
6360
required: 'provider_status is required',
@@ -68,7 +65,7 @@ export default {
6865
unitPrice: {
6966
fillable: true,
7067
validation: {
71-
rule: schema.number(),
68+
rule: schema.number().required(),
7269
message: {
7370
string: 'unit_price must be a number',
7471
required: 'unit_price is required',
@@ -78,10 +75,9 @@ export default {
7875
},
7976

8077
providerType: {
81-
required: true,
8278
fillable: true,
8379
validation: {
84-
rule: schema.string(),
80+
rule: schema.string().max(255).required(),
8581
message: {
8682
string: 'provider_type must be a string',
8783
required: 'provider_type is required',

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,11 @@ export class AuthorModel extends BaseOrm<AuthorModel, AuthorsTable, AuthorJsonRe
162162
return this.attributes.public_passkey
163163
}
164164

165-
get name(): string | undefined {
165+
get name(): string {
166166
return this.attributes.name
167167
}
168168

169-
get email(): string | undefined {
169+
get email(): string {
170170
return this.attributes.email
171171
}
172172

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ export class ErrorModel extends BaseOrm<ErrorModel, ErrorsTable, ErrorJsonRespon
138138
return this.attributes.id
139139
}
140140

141-
get type(): string | undefined {
141+
get type(): string {
142142
return this.attributes.type
143143
}
144144

145-
get message(): string | undefined {
145+
get message(): string {
146146
return this.attributes.message
147147
}
148148

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,19 +138,19 @@ export class FailedJobModel extends BaseOrm<FailedJobModel, FailedJobsTable, Fai
138138
return this.attributes.id
139139
}
140140

141-
get connection(): string | undefined {
141+
get connection(): string {
142142
return this.attributes.connection
143143
}
144144

145-
get queue(): string | undefined {
145+
get queue(): string {
146146
return this.attributes.queue
147147
}
148148

149-
get payload(): string | undefined {
149+
get payload(): string {
150150
return this.attributes.payload
151151
}
152152

153-
get exception(): string | undefined {
153+
get exception(): string {
154154
return this.attributes.exception
155155
}
156156

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ export class JobModel extends BaseOrm<JobModel, JobsTable, JobJsonResponse> {
138138
return this.attributes.id
139139
}
140140

141-
get queue(): string | undefined {
141+
get queue(): string {
142142
return this.attributes.queue
143143
}
144144

145-
get payload(): string | undefined {
145+
get payload(): string {
146146
return this.attributes.payload
147147
}
148148

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,31 +138,31 @@ export class LogModel extends BaseOrm<LogModel, LogsTable, LogJsonResponse> {
138138
return this.attributes.id
139139
}
140140

141-
get timestamp(): number | undefined {
141+
get timestamp(): number {
142142
return this.attributes.timestamp
143143
}
144144

145-
get type(): string | string[] | undefined {
145+
get type(): string | string[] {
146146
return this.attributes.type
147147
}
148148

149-
get source(): string | string[] | undefined {
149+
get source(): string | string[] {
150150
return this.attributes.source
151151
}
152152

153-
get message(): string | undefined {
153+
get message(): string {
154154
return this.attributes.message
155155
}
156156

157-
get project(): string | undefined {
157+
get project(): string {
158158
return this.attributes.project
159159
}
160160

161-
get stacktrace(): string | undefined {
161+
get stacktrace(): string {
162162
return this.attributes.stacktrace
163163
}
164164

165-
get file(): string | undefined {
165+
get file(): string {
166166
return this.attributes.file
167167
}
168168

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,23 +158,23 @@ export class PaymentMethodModel extends BaseOrm<PaymentMethodModel, PaymentMetho
158158
return this.attributes.uuid
159159
}
160160

161-
get type(): string | undefined {
161+
get type(): string {
162162
return this.attributes.type
163163
}
164164

165-
get last_four(): number | undefined {
165+
get last_four(): number {
166166
return this.attributes.last_four
167167
}
168168

169-
get brand(): string | undefined {
169+
get brand(): string {
170170
return this.attributes.brand
171171
}
172172

173-
get exp_month(): number | undefined {
173+
get exp_month(): number {
174174
return this.attributes.exp_month
175175
}
176176

177-
get exp_year(): number | undefined {
177+
get exp_year(): number {
178178
return this.attributes.exp_year
179179
}
180180

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,19 @@ export class PaymentProductModel extends BaseOrm<PaymentProductModel, PaymentPro
143143
return this.attributes.uuid
144144
}
145145

146-
get name(): string | undefined {
146+
get name(): string {
147147
return this.attributes.name
148148
}
149149

150150
get description(): string | undefined {
151151
return this.attributes.description
152152
}
153153

154-
get key(): string | undefined {
154+
get key(): string {
155155
return this.attributes.key
156156
}
157157

158-
get unit_price(): number | undefined {
158+
get unit_price(): number {
159159
return this.attributes.unit_price
160160
}
161161

0 commit comments

Comments
 (0)