Skip to content

Commit cc587a8

Browse files
chore: wip
1 parent a8714e0 commit cc587a8

28 files changed

+180
-180
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ export async function generateModelString(
786786
for (const attribute of attributes) {
787787
const entity = mapEntity(attribute)
788788

789-
fieldString += ` ${snakeCase(attribute.field)}?: ${entity}\n `
789+
fieldString += ` ${snakeCase(attribute.field)}: ${entity}\n `
790790
// declareFields += `public ${snakeCase(attribute.field)}: ${entity} | undefined \n `
791791
getFields += `get ${snakeCase(attribute.field)}(): ${entity} | undefined {
792792
return this.attributes.${snakeCase(attribute.field)}

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ export interface PersonalAccessTokensTable {
1818
team?: TeamModel
1919
user_id?: number
2020
user?: UserModel
21-
name?: string
22-
token?: string
23-
plain_text_token?: string
24-
abilities?: string | string[]
25-
last_used_at?: Date | string
26-
expires_at?: Date | string
27-
revoked_at?: Date | string
28-
ip_address?: string
29-
device_name?: string
30-
is_single_use?: boolean
21+
name: string
22+
token: string
23+
plain_text_token: string
24+
abilities: string | string[]
25+
last_used_at: Date | string
26+
expires_at: Date | string
27+
revoked_at: Date | string
28+
ip_address: string
29+
device_name: string
30+
is_single_use: boolean
3131

3232
created_at?: Date
3333

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ export interface CouponsTable {
1717
orders?: OrderModel[] | undefined
1818
product_id?: number
1919
product?: ProductModel
20-
code?: string
21-
description?: string
22-
discount_type?: string
23-
discount_value?: number
24-
min_order_amount?: number
25-
max_discount_amount?: number
26-
free_product_id?: string
27-
is_active?: boolean
28-
usage_limit?: number
29-
usage_count?: number
30-
start_date?: string
31-
end_date?: string
32-
applicable_products?: string
33-
applicable_categories?: string
20+
code: string
21+
description: string
22+
discount_type: string
23+
discount_value: number
24+
min_order_amount: number
25+
max_discount_amount: number
26+
free_product_id: string
27+
is_active: boolean
28+
usage_limit: number
29+
usage_count: number
30+
start_date: string
31+
end_date: string
32+
applicable_products: string
33+
applicable_categories: string
3434
uuid?: string
3535

3636
created_at?: Date

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ export interface CustomersTable {
1717
orders?: OrderModel[] | undefined
1818
user_id?: number
1919
user?: UserModel
20-
name?: string
21-
email?: string
22-
phone?: string
23-
total_spent?: number
24-
last_order?: string
25-
status?: string | string[]
26-
avatar?: string
20+
name: string
21+
email: string
22+
phone: string
23+
total_spent: number
24+
last_order: string
25+
status: string | string[]
26+
avatar: string
2727
uuid?: string
2828

2929
created_at?: Date

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export interface DeploymentsTable {
1313
id: number
1414
user_id?: number
1515
user?: UserModel
16-
commit_sha?: string
17-
commit_message?: string
18-
branch?: string
19-
status?: string
20-
execution_time?: number
21-
deploy_script?: string
22-
terminal_output?: string
16+
commit_sha: string
17+
commit_message: string
18+
branch: string
19+
status: string
20+
execution_time: number
21+
deploy_script: string
22+
terminal_output: string
2323
uuid?: string
2424

2525
created_at?: Date

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import { DB, SubqueryBuilder } from '@stacksjs/orm'
77

88
export interface ErrorsTable {
99
id: number
10-
type?: string
11-
message?: string
12-
stack?: string
13-
status?: number
14-
additional_info?: string
10+
type: string
11+
message: string
12+
stack: string
13+
status: number
14+
additional_info: string
1515

1616
created_at?: Date
1717

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import { DB, SubqueryBuilder } from '@stacksjs/orm'
77

88
export interface FailedJobsTable {
99
id: number
10-
connection?: string
11-
queue?: string
12-
payload?: string
13-
exception?: string
14-
failed_at?: Date | string
10+
connection: string
11+
queue: string
12+
payload: string
13+
exception: string
14+
failed_at: Date | string
1515

1616
created_at?: Date
1717

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ export interface GiftCardsTable {
1717
orders?: OrderModel[] | undefined
1818
user_id?: number
1919
user?: UserModel
20-
code?: string
21-
initial_balance?: number
22-
current_balance?: number
23-
currency?: string
24-
status?: string
25-
purchaser_id?: string
26-
recipient_email?: string
27-
recipient_name?: string
28-
personal_message?: string
29-
is_digital?: boolean
30-
is_reloadable?: boolean
31-
is_active?: boolean
32-
expiry_date?: string
33-
last_used_date?: string
34-
template_id?: string
20+
code: string
21+
initial_balance: number
22+
current_balance: number
23+
currency: string
24+
status: string
25+
purchaser_id: string
26+
recipient_email: string
27+
recipient_name: string
28+
personal_message: string
29+
is_digital: boolean
30+
is_reloadable: boolean
31+
is_active: boolean
32+
expiry_date: string
33+
last_used_date: string
34+
template_id: string
3535
uuid?: string
3636

3737
created_at?: Date

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import { DB, SubqueryBuilder } from '@stacksjs/orm'
77

88
export interface JobsTable {
99
id: number
10-
queue?: string
11-
payload?: string
12-
attempts?: number
13-
available_at?: number
14-
reserved_at?: Date | string
10+
queue: string
11+
payload: string
12+
attempts: number
13+
available_at: number
14+
reserved_at: Date | string
1515

1616
created_at?: Date
1717

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import { DB, SubqueryBuilder } from '@stacksjs/orm'
99

1010
export interface LoyaltyPointsTable {
1111
id: number
12-
wallet_id?: string
13-
points?: number
14-
source?: string
15-
source_reference_id?: string
16-
description?: string
17-
expiry_date?: string
18-
is_used?: boolean
12+
wallet_id: string
13+
points: number
14+
source: string
15+
source_reference_id: string
16+
description: string
17+
expiry_date: string
18+
is_used: boolean
1919
uuid?: string
2020

2121
created_at?: Date

0 commit comments

Comments
 (0)