File tree Expand file tree Collapse file tree 18 files changed +144
-0
lines changed Expand file tree Collapse file tree 18 files changed +144
-0
lines changed Original file line number Diff line number Diff line change @@ -1632,6 +1632,8 @@ export async function generateModelString(
1632
1632
),
1633
1633
) as New${ modelName }
1634
1634
1635
+ await this.mapCustomSetters(filteredValues)
1636
+
1635
1637
${ uuidQuery }
1636
1638
1637
1639
const result = await DB.instance.insertInto('${ tableName } ')
@@ -2222,6 +2224,8 @@ export async function generateModelString(
2222
2224
),
2223
2225
) as New${ modelName }
2224
2226
2227
+ await this.mapCustomSetters(filteredValues)
2228
+
2225
2229
await DB.instance.updateTable('${ tableName } ')
2226
2230
.set(filteredValues)
2227
2231
.where('id', '=', this.id)
@@ -2244,6 +2248,8 @@ export async function generateModelString(
2244
2248
if (this.id === undefined) {
2245
2249
this.updateFromQuery.set(${ formattedModelName } ).execute()
2246
2250
}
2251
+
2252
+ await this.mapCustomSetters(${ formattedModelName } )
2247
2253
2248
2254
await DB.instance.updateTable('${ tableName } ')
2249
2255
.set(${ formattedModelName } )
@@ -2274,6 +2280,8 @@ export async function generateModelString(
2274
2280
),
2275
2281
) as New${ modelName }
2276
2282
2283
+ await this.mapCustomSetters(filteredValues)
2284
+
2277
2285
if (this.id === undefined) {
2278
2286
await DB.instance.insertInto('${ tableName } ')
2279
2287
.values(filteredValues)
Original file line number Diff line number Diff line change @@ -840,6 +840,8 @@ export class AccessTokenModel {
840
840
) ,
841
841
) as NewAccessToken
842
842
843
+ await this . mapCustomSetters ( filteredValues )
844
+
843
845
const result = await DB . instance . insertInto ( 'personal_access_tokens' )
844
846
. values ( filteredValues )
845
847
. executeTakeFirst ( )
@@ -1447,6 +1449,8 @@ export class AccessTokenModel {
1447
1449
) ,
1448
1450
) as NewAccessToken
1449
1451
1452
+ await this . mapCustomSetters ( filteredValues )
1453
+
1450
1454
await DB . instance . updateTable ( 'personal_access_tokens' )
1451
1455
. set ( filteredValues )
1452
1456
. where ( 'id' , '=' , this . id )
@@ -1468,6 +1472,8 @@ export class AccessTokenModel {
1468
1472
this . updateFromQuery . set ( accesstoken ) . execute ( )
1469
1473
}
1470
1474
1475
+ await this . mapCustomSetters ( accesstoken )
1476
+
1471
1477
await DB . instance . updateTable ( 'personal_access_tokens' )
1472
1478
. set ( accesstoken )
1473
1479
. where ( 'id' , '=' , this . id )
@@ -1494,6 +1500,8 @@ export class AccessTokenModel {
1494
1500
) ,
1495
1501
) as NewAccessToken
1496
1502
1503
+ await this . mapCustomSetters ( filteredValues )
1504
+
1497
1505
if ( this . id === undefined ) {
1498
1506
await DB . instance . insertInto ( 'personal_access_tokens' )
1499
1507
. values ( filteredValues )
Original file line number Diff line number Diff line change @@ -863,6 +863,8 @@ export class ActivityModel {
863
863
) ,
864
864
) as NewActivity
865
865
866
+ await this . mapCustomSetters ( filteredValues )
867
+
866
868
const result = await DB . instance . insertInto ( 'activities' )
867
869
. values ( filteredValues )
868
870
. executeTakeFirst ( )
@@ -1497,6 +1499,8 @@ export class ActivityModel {
1497
1499
) ,
1498
1500
) as NewActivity
1499
1501
1502
+ await this . mapCustomSetters ( filteredValues )
1503
+
1500
1504
await DB . instance . updateTable ( 'activities' )
1501
1505
. set ( filteredValues )
1502
1506
. where ( 'id' , '=' , this . id )
@@ -1518,6 +1522,8 @@ export class ActivityModel {
1518
1522
this . updateFromQuery . set ( activity ) . execute ( )
1519
1523
}
1520
1524
1525
+ await this . mapCustomSetters ( activity )
1526
+
1521
1527
await DB . instance . updateTable ( 'activities' )
1522
1528
. set ( activity )
1523
1529
. where ( 'id' , '=' , this . id )
@@ -1544,6 +1550,8 @@ export class ActivityModel {
1544
1550
) ,
1545
1551
) as NewActivity
1546
1552
1553
+ await this . mapCustomSetters ( filteredValues )
1554
+
1547
1555
if ( this . id === undefined ) {
1548
1556
await DB . instance . insertInto ( 'activities' )
1549
1557
. values ( filteredValues )
Original file line number Diff line number Diff line change @@ -877,6 +877,8 @@ export class DeploymentModel {
877
877
) ,
878
878
) as NewDeployment
879
879
880
+ await this . mapCustomSetters ( filteredValues )
881
+
880
882
filteredValues . uuid = randomUUIDv7 ( )
881
883
882
884
const result = await DB . instance . insertInto ( 'deployments' )
@@ -1512,6 +1514,8 @@ export class DeploymentModel {
1512
1514
) ,
1513
1515
) as NewDeployment
1514
1516
1517
+ await this . mapCustomSetters ( filteredValues )
1518
+
1515
1519
await DB . instance . updateTable ( 'deployments' )
1516
1520
. set ( filteredValues )
1517
1521
. where ( 'id' , '=' , this . id )
@@ -1533,6 +1537,8 @@ export class DeploymentModel {
1533
1537
this . updateFromQuery . set ( deployment ) . execute ( )
1534
1538
}
1535
1539
1540
+ await this . mapCustomSetters ( deployment )
1541
+
1536
1542
await DB . instance . updateTable ( 'deployments' )
1537
1543
. set ( deployment )
1538
1544
. where ( 'id' , '=' , this . id )
@@ -1559,6 +1565,8 @@ export class DeploymentModel {
1559
1565
) ,
1560
1566
) as NewDeployment
1561
1567
1568
+ await this . mapCustomSetters ( filteredValues )
1569
+
1562
1570
if ( this . id === undefined ) {
1563
1571
await DB . instance . insertInto ( 'deployments' )
1564
1572
. values ( filteredValues )
Original file line number Diff line number Diff line change @@ -836,6 +836,8 @@ export class ErrorModel {
836
836
) ,
837
837
) as NewError
838
838
839
+ await this . mapCustomSetters ( filteredValues )
840
+
839
841
const result = await DB . instance . insertInto ( 'errors' )
840
842
. values ( filteredValues )
841
843
. executeTakeFirst ( )
@@ -1451,6 +1453,8 @@ export class ErrorModel {
1451
1453
) ,
1452
1454
) as NewError
1453
1455
1456
+ await this . mapCustomSetters ( filteredValues )
1457
+
1454
1458
await DB . instance . updateTable ( 'errors' )
1455
1459
. set ( filteredValues )
1456
1460
. where ( 'id' , '=' , this . id )
@@ -1472,6 +1476,8 @@ export class ErrorModel {
1472
1476
this . updateFromQuery . set ( error ) . execute ( )
1473
1477
}
1474
1478
1479
+ await this . mapCustomSetters ( error )
1480
+
1475
1481
await DB . instance . updateTable ( 'errors' )
1476
1482
. set ( error )
1477
1483
. where ( 'id' , '=' , this . id )
@@ -1498,6 +1504,8 @@ export class ErrorModel {
1498
1504
) ,
1499
1505
) as NewError
1500
1506
1507
+ await this . mapCustomSetters ( filteredValues )
1508
+
1501
1509
if ( this . id === undefined ) {
1502
1510
await DB . instance . insertInto ( 'errors' )
1503
1511
. values ( filteredValues )
Original file line number Diff line number Diff line change @@ -836,6 +836,8 @@ export class FailedJobModel {
836
836
) ,
837
837
) as NewFailedJob
838
838
839
+ await this . mapCustomSetters ( filteredValues )
840
+
839
841
const result = await DB . instance . insertInto ( 'failed_jobs' )
840
842
. values ( filteredValues )
841
843
. executeTakeFirst ( )
@@ -1451,6 +1453,8 @@ export class FailedJobModel {
1451
1453
) ,
1452
1454
) as NewFailedJob
1453
1455
1456
+ await this . mapCustomSetters ( filteredValues )
1457
+
1454
1458
await DB . instance . updateTable ( 'failed_jobs' )
1455
1459
. set ( filteredValues )
1456
1460
. where ( 'id' , '=' , this . id )
@@ -1472,6 +1476,8 @@ export class FailedJobModel {
1472
1476
this . updateFromQuery . set ( failedjob ) . execute ( )
1473
1477
}
1474
1478
1479
+ await this . mapCustomSetters ( failedjob )
1480
+
1475
1481
await DB . instance . updateTable ( 'failed_jobs' )
1476
1482
. set ( failedjob )
1477
1483
. where ( 'id' , '=' , this . id )
@@ -1498,6 +1504,8 @@ export class FailedJobModel {
1498
1504
) ,
1499
1505
) as NewFailedJob
1500
1506
1507
+ await this . mapCustomSetters ( filteredValues )
1508
+
1501
1509
if ( this . id === undefined ) {
1502
1510
await DB . instance . insertInto ( 'failed_jobs' )
1503
1511
. values ( filteredValues )
Original file line number Diff line number Diff line change @@ -836,6 +836,8 @@ export class JobModel {
836
836
) ,
837
837
) as NewJob
838
838
839
+ await this . mapCustomSetters ( filteredValues )
840
+
839
841
const result = await DB . instance . insertInto ( 'jobs' )
840
842
. values ( filteredValues )
841
843
. executeTakeFirst ( )
@@ -1451,6 +1453,8 @@ export class JobModel {
1451
1453
) ,
1452
1454
) as NewJob
1453
1455
1456
+ await this . mapCustomSetters ( filteredValues )
1457
+
1454
1458
await DB . instance . updateTable ( 'jobs' )
1455
1459
. set ( filteredValues )
1456
1460
. where ( 'id' , '=' , this . id )
@@ -1472,6 +1476,8 @@ export class JobModel {
1472
1476
this . updateFromQuery . set ( job ) . execute ( )
1473
1477
}
1474
1478
1479
+ await this . mapCustomSetters ( job )
1480
+
1475
1481
await DB . instance . updateTable ( 'jobs' )
1476
1482
. set ( job )
1477
1483
. where ( 'id' , '=' , this . id )
@@ -1498,6 +1504,8 @@ export class JobModel {
1498
1504
) ,
1499
1505
) as NewJob
1500
1506
1507
+ await this . mapCustomSetters ( filteredValues )
1508
+
1501
1509
if ( this . id === undefined ) {
1502
1510
await DB . instance . insertInto ( 'jobs' )
1503
1511
. values ( filteredValues )
Original file line number Diff line number Diff line change @@ -884,6 +884,8 @@ export class PaymentMethodModel {
884
884
) ,
885
885
) as NewPaymentMethod
886
886
887
+ await this . mapCustomSetters ( filteredValues )
888
+
887
889
filteredValues . uuid = randomUUIDv7 ( )
888
890
889
891
const result = await DB . instance . insertInto ( 'payment_methods' )
@@ -1519,6 +1521,8 @@ export class PaymentMethodModel {
1519
1521
) ,
1520
1522
) as NewPaymentMethod
1521
1523
1524
+ await this . mapCustomSetters ( filteredValues )
1525
+
1522
1526
await DB . instance . updateTable ( 'payment_methods' )
1523
1527
. set ( filteredValues )
1524
1528
. where ( 'id' , '=' , this . id )
@@ -1540,6 +1544,8 @@ export class PaymentMethodModel {
1540
1544
this . updateFromQuery . set ( paymentmethod ) . execute ( )
1541
1545
}
1542
1546
1547
+ await this . mapCustomSetters ( paymentmethod )
1548
+
1543
1549
await DB . instance . updateTable ( 'payment_methods' )
1544
1550
. set ( paymentmethod )
1545
1551
. where ( 'id' , '=' , this . id )
@@ -1566,6 +1572,8 @@ export class PaymentMethodModel {
1566
1572
) ,
1567
1573
) as NewPaymentMethod
1568
1574
1575
+ await this . mapCustomSetters ( filteredValues )
1576
+
1569
1577
if ( this . id === undefined ) {
1570
1578
await DB . instance . insertInto ( 'payment_methods' )
1571
1579
. values ( filteredValues )
Original file line number Diff line number Diff line change @@ -822,6 +822,8 @@ export class PostModel {
822
822
) ,
823
823
) as NewPost
824
824
825
+ await this . mapCustomSetters ( filteredValues )
826
+
825
827
const result = await DB . instance . insertInto ( 'posts' )
826
828
. values ( filteredValues )
827
829
. executeTakeFirst ( )
@@ -1413,6 +1415,8 @@ export class PostModel {
1413
1415
) ,
1414
1416
) as NewPost
1415
1417
1418
+ await this . mapCustomSetters ( filteredValues )
1419
+
1416
1420
await DB . instance . updateTable ( 'posts' )
1417
1421
. set ( filteredValues )
1418
1422
. where ( 'id' , '=' , this . id )
@@ -1434,6 +1438,8 @@ export class PostModel {
1434
1438
this . updateFromQuery . set ( post ) . execute ( )
1435
1439
}
1436
1440
1441
+ await this . mapCustomSetters ( post )
1442
+
1437
1443
await DB . instance . updateTable ( 'posts' )
1438
1444
. set ( post )
1439
1445
. where ( 'id' , '=' , this . id )
@@ -1460,6 +1466,8 @@ export class PostModel {
1460
1466
) ,
1461
1467
) as NewPost
1462
1468
1469
+ await this . mapCustomSetters ( filteredValues )
1470
+
1463
1471
if ( this . id === undefined ) {
1464
1472
await DB . instance . insertInto ( 'posts' )
1465
1473
. values ( filteredValues )
Original file line number Diff line number Diff line change @@ -864,6 +864,8 @@ export class ProductModel {
864
864
) ,
865
865
) as NewProduct
866
866
867
+ await this . mapCustomSetters ( filteredValues )
868
+
867
869
filteredValues . uuid = randomUUIDv7 ( )
868
870
869
871
const result = await DB . instance . insertInto ( 'products' )
@@ -1499,6 +1501,8 @@ export class ProductModel {
1499
1501
) ,
1500
1502
) as NewProduct
1501
1503
1504
+ await this . mapCustomSetters ( filteredValues )
1505
+
1502
1506
await DB . instance . updateTable ( 'products' )
1503
1507
. set ( filteredValues )
1504
1508
. where ( 'id' , '=' , this . id )
@@ -1520,6 +1524,8 @@ export class ProductModel {
1520
1524
this . updateFromQuery . set ( product ) . execute ( )
1521
1525
}
1522
1526
1527
+ await this . mapCustomSetters ( product )
1528
+
1523
1529
await DB . instance . updateTable ( 'products' )
1524
1530
. set ( product )
1525
1531
. where ( 'id' , '=' , this . id )
@@ -1546,6 +1552,8 @@ export class ProductModel {
1546
1552
) ,
1547
1553
) as NewProduct
1548
1554
1555
+ await this . mapCustomSetters ( filteredValues )
1556
+
1549
1557
if ( this . id === undefined ) {
1550
1558
await DB . instance . insertInto ( 'products' )
1551
1559
. values ( filteredValues )
You can’t perform that action at this time.
0 commit comments