@happyvertical/smrt-manufacturing 0.53.5 → 0.53.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +18 -6
- package/README.md +69 -3
- package/agents/multilevel-and-runs.md +28 -0
- package/dist/collections/ProductionRunCollection.d.ts +15 -0
- package/dist/collections/ProductionRunCollection.d.ts.map +1 -0
- package/dist/collections/ProductionRunCompletionCollection.d.ts +14 -0
- package/dist/collections/ProductionRunCompletionCollection.d.ts.map +1 -0
- package/dist/collections/index.d.ts +2 -0
- package/dist/collections/index.d.ts.map +1 -1
- package/dist/index.d.ts +13 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +972 -81
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +630 -1
- package/dist/models/ProductionRun.d.ts +67 -0
- package/dist/models/ProductionRun.d.ts.map +1 -0
- package/dist/models/ProductionRunCompletion.d.ts +36 -0
- package/dist/models/ProductionRunCompletion.d.ts.map +1 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/operation-types.d.ts +9 -0
- package/dist/operation-types.d.ts.map +1 -1
- package/dist/production-run-types.d.ts +100 -0
- package/dist/production-run-types.d.ts.map +1 -0
- package/dist/quantity.d.ts +36 -0
- package/dist/quantity.d.ts.map +1 -0
- package/dist/services/AssemblyService.d.ts +7 -2
- package/dist/services/AssemblyService.d.ts.map +1 -1
- package/dist/services/BomService.d.ts +84 -5
- package/dist/services/BomService.d.ts.map +1 -1
- package/dist/services/ProductionRunService.d.ts +123 -0
- package/dist/services/ProductionRunService.d.ts.map +1 -0
- package/dist/services/ProductionService.d.ts +11 -0
- package/dist/services/ProductionService.d.ts.map +1 -1
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/structure-walk.d.ts +77 -0
- package/dist/services/structure-walk.d.ts.map +1 -0
- package/dist/smrt-knowledge.json +514 -7
- package/dist/svelte/components/ProductionRunList.svelte +213 -0
- package/dist/svelte/components/ProductionRunList.svelte.d.ts +18 -0
- package/dist/svelte/components/ProductionRunList.svelte.d.ts.map +1 -0
- package/dist/svelte/components/RequirementsTree.svelte +125 -0
- package/dist/svelte/components/RequirementsTree.svelte.d.ts +13 -0
- package/dist/svelte/components/RequirementsTree.svelte.d.ts.map +1 -0
- package/dist/svelte/components/RequirementsTreeLevel.svelte +120 -0
- package/dist/svelte/components/RequirementsTreeLevel.svelte.d.ts +12 -0
- package/dist/svelte/components/RequirementsTreeLevel.svelte.d.ts.map +1 -0
- package/dist/svelte/i18n.d.ts +32 -0
- package/dist/svelte/i18n.d.ts.map +1 -1
- package/dist/svelte/i18n.js +32 -0
- package/dist/svelte/index.d.ts +9 -4
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +9 -4
- package/dist/svelte/types.d.ts +87 -0
- package/dist/svelte/types.d.ts.map +1 -1
- package/dist/svelte/types.js +123 -0
- package/dist/tenant-scope.d.ts +25 -0
- package/dist/tenant-scope.d.ts.map +1 -0
- package/dist/types.d.ts +207 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +13 -1
- package/dist/types.js.map +1 -1
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +23 -1
- package/dist/ui.js.map +1 -1
- package/package.json +11 -10
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-manufacturing",
|
|
5
|
-
"packageVersion": "0.53.
|
|
5
|
+
"packageVersion": "0.53.6",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-manufacturing:BillOfMaterialsCollection": {
|
|
8
8
|
"name": "billofmaterialscollection",
|
|
@@ -458,6 +458,262 @@
|
|
|
458
458
|
},
|
|
459
459
|
"importPath": "@happyvertical/smrt-manufacturing"
|
|
460
460
|
},
|
|
461
|
+
"@happyvertical/smrt-manufacturing:ProductionRunCollection": {
|
|
462
|
+
"name": "productionruncollection",
|
|
463
|
+
"className": "ProductionRunCollection",
|
|
464
|
+
"qualifiedName": "@happyvertical/smrt-manufacturing:ProductionRunCollection",
|
|
465
|
+
"collection": "productionruns",
|
|
466
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/manufacturing/src/collections/ProductionRunCollection.ts",
|
|
467
|
+
"packageName": "@happyvertical/smrt-manufacturing",
|
|
468
|
+
"fields": {},
|
|
469
|
+
"methods": {
|
|
470
|
+
"findByBom": {
|
|
471
|
+
"name": "findByBom",
|
|
472
|
+
"async": true,
|
|
473
|
+
"parameters": [
|
|
474
|
+
{
|
|
475
|
+
"name": "bomId",
|
|
476
|
+
"type": "string",
|
|
477
|
+
"optional": false
|
|
478
|
+
}
|
|
479
|
+
],
|
|
480
|
+
"returnType": "Promise<ProductionRun[]>",
|
|
481
|
+
"isStatic": false,
|
|
482
|
+
"isPublic": true
|
|
483
|
+
},
|
|
484
|
+
"findByStatus": {
|
|
485
|
+
"name": "findByStatus",
|
|
486
|
+
"async": true,
|
|
487
|
+
"parameters": [
|
|
488
|
+
{
|
|
489
|
+
"name": "status",
|
|
490
|
+
"type": "ProductionRunStatus",
|
|
491
|
+
"optional": false
|
|
492
|
+
}
|
|
493
|
+
],
|
|
494
|
+
"returnType": "Promise<ProductionRun[]>",
|
|
495
|
+
"isStatic": false,
|
|
496
|
+
"isPublic": true
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
"decoratorConfig": {
|
|
500
|
+
"tableName": "manufacturing_production_runs"
|
|
501
|
+
},
|
|
502
|
+
"extends": "SmrtCollection",
|
|
503
|
+
"extendsTypeArg": "ProductionRun",
|
|
504
|
+
"exportName": "ProductionRunCollection",
|
|
505
|
+
"collectionExportName": "ProductionRunCollectionCollection",
|
|
506
|
+
"schema": {
|
|
507
|
+
"tableName": "manufacturing_production_runs",
|
|
508
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"manufacturing_production_runs\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"bom_id\" UUID NOT NULL,\n \"target_qty\" REAL,\n \"completed_qty\" REAL,\n \"status\" TEXT NOT NULL DEFAULT 'planned'\n);",
|
|
509
|
+
"columns": {
|
|
510
|
+
"id": {
|
|
511
|
+
"type": "UUID",
|
|
512
|
+
"primaryKey": true,
|
|
513
|
+
"referenceKind": "id",
|
|
514
|
+
"notNull": true
|
|
515
|
+
},
|
|
516
|
+
"slug": {
|
|
517
|
+
"type": "TEXT",
|
|
518
|
+
"notNull": true
|
|
519
|
+
},
|
|
520
|
+
"context": {
|
|
521
|
+
"type": "TEXT",
|
|
522
|
+
"notNull": true,
|
|
523
|
+
"default": ""
|
|
524
|
+
},
|
|
525
|
+
"created_at": {
|
|
526
|
+
"type": "TIMESTAMP",
|
|
527
|
+
"notNull": true,
|
|
528
|
+
"default": "current_timestamp"
|
|
529
|
+
},
|
|
530
|
+
"updated_at": {
|
|
531
|
+
"type": "TIMESTAMP",
|
|
532
|
+
"notNull": true,
|
|
533
|
+
"default": "current_timestamp"
|
|
534
|
+
},
|
|
535
|
+
"tenant_id": {
|
|
536
|
+
"type": "UUID",
|
|
537
|
+
"referenceKind": "tenantId",
|
|
538
|
+
"notNull": false,
|
|
539
|
+
"unique": false
|
|
540
|
+
},
|
|
541
|
+
"bom_id": {
|
|
542
|
+
"type": "UUID",
|
|
543
|
+
"referenceKind": "foreignKey",
|
|
544
|
+
"notNull": true,
|
|
545
|
+
"unique": false,
|
|
546
|
+
"foreignKey": {
|
|
547
|
+
"table": "manufacturing_boms",
|
|
548
|
+
"column": "id",
|
|
549
|
+
"onDelete": "RESTRICT",
|
|
550
|
+
"onUpdate": "CASCADE"
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
"target_qty": {
|
|
554
|
+
"type": "REAL",
|
|
555
|
+
"notNull": false,
|
|
556
|
+
"unique": false
|
|
557
|
+
},
|
|
558
|
+
"completed_qty": {
|
|
559
|
+
"type": "REAL",
|
|
560
|
+
"notNull": false,
|
|
561
|
+
"unique": false
|
|
562
|
+
},
|
|
563
|
+
"status": {
|
|
564
|
+
"type": "TEXT",
|
|
565
|
+
"notNull": true,
|
|
566
|
+
"unique": false,
|
|
567
|
+
"default": "planned"
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
"indexes": [
|
|
571
|
+
{
|
|
572
|
+
"name": "manufacturing_production_runs_slug_context_idx",
|
|
573
|
+
"columns": [
|
|
574
|
+
"tenant_id",
|
|
575
|
+
"slug",
|
|
576
|
+
"context"
|
|
577
|
+
],
|
|
578
|
+
"unique": true,
|
|
579
|
+
"nullsNotDistinct": true
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"name": "manufacturing_production_runs_tenant_id_created_at_idx",
|
|
583
|
+
"columns": [
|
|
584
|
+
"tenant_id",
|
|
585
|
+
"created_at"
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"name": "manufacturing_production_runs_bom_id_idx",
|
|
590
|
+
"columns": [
|
|
591
|
+
"bom_id"
|
|
592
|
+
]
|
|
593
|
+
}
|
|
594
|
+
],
|
|
595
|
+
"version": "2ca8147d"
|
|
596
|
+
},
|
|
597
|
+
"importPath": "@happyvertical/smrt-manufacturing"
|
|
598
|
+
},
|
|
599
|
+
"@happyvertical/smrt-manufacturing:ProductionRunCompletionCollection": {
|
|
600
|
+
"name": "productionruncompletioncollection",
|
|
601
|
+
"className": "ProductionRunCompletionCollection",
|
|
602
|
+
"qualifiedName": "@happyvertical/smrt-manufacturing:ProductionRunCompletionCollection",
|
|
603
|
+
"collection": "productionruncompletions",
|
|
604
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/manufacturing/src/collections/ProductionRunCompletionCollection.ts",
|
|
605
|
+
"packageName": "@happyvertical/smrt-manufacturing",
|
|
606
|
+
"fields": {},
|
|
607
|
+
"methods": {
|
|
608
|
+
"findByRun": {
|
|
609
|
+
"name": "findByRun",
|
|
610
|
+
"async": true,
|
|
611
|
+
"parameters": [
|
|
612
|
+
{
|
|
613
|
+
"name": "runId",
|
|
614
|
+
"type": "string",
|
|
615
|
+
"optional": false
|
|
616
|
+
}
|
|
617
|
+
],
|
|
618
|
+
"returnType": "Promise<ProductionRunCompletion[]>",
|
|
619
|
+
"isStatic": false,
|
|
620
|
+
"isPublic": true
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
"decoratorConfig": {
|
|
624
|
+
"tableName": "manufacturing_production_run_completions"
|
|
625
|
+
},
|
|
626
|
+
"extends": "SmrtCollection",
|
|
627
|
+
"extendsTypeArg": "ProductionRunCompletion",
|
|
628
|
+
"exportName": "ProductionRunCompletionCollection",
|
|
629
|
+
"collectionExportName": "ProductionRunCompletionCollectionCollection",
|
|
630
|
+
"schema": {
|
|
631
|
+
"tableName": "manufacturing_production_run_completions",
|
|
632
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"manufacturing_production_run_completions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"run_id\" UUID NOT NULL,\n \"qty\" REAL,\n \"completed_at\" TIMESTAMP\n);",
|
|
633
|
+
"columns": {
|
|
634
|
+
"id": {
|
|
635
|
+
"type": "UUID",
|
|
636
|
+
"primaryKey": true,
|
|
637
|
+
"referenceKind": "id",
|
|
638
|
+
"notNull": true
|
|
639
|
+
},
|
|
640
|
+
"slug": {
|
|
641
|
+
"type": "TEXT",
|
|
642
|
+
"notNull": true
|
|
643
|
+
},
|
|
644
|
+
"context": {
|
|
645
|
+
"type": "TEXT",
|
|
646
|
+
"notNull": true,
|
|
647
|
+
"default": ""
|
|
648
|
+
},
|
|
649
|
+
"created_at": {
|
|
650
|
+
"type": "TIMESTAMP",
|
|
651
|
+
"notNull": true,
|
|
652
|
+
"default": "current_timestamp"
|
|
653
|
+
},
|
|
654
|
+
"updated_at": {
|
|
655
|
+
"type": "TIMESTAMP",
|
|
656
|
+
"notNull": true,
|
|
657
|
+
"default": "current_timestamp"
|
|
658
|
+
},
|
|
659
|
+
"tenant_id": {
|
|
660
|
+
"type": "UUID",
|
|
661
|
+
"referenceKind": "tenantId",
|
|
662
|
+
"notNull": false,
|
|
663
|
+
"unique": false
|
|
664
|
+
},
|
|
665
|
+
"run_id": {
|
|
666
|
+
"type": "UUID",
|
|
667
|
+
"referenceKind": "foreignKey",
|
|
668
|
+
"notNull": true,
|
|
669
|
+
"unique": false,
|
|
670
|
+
"foreignKey": {
|
|
671
|
+
"table": "manufacturing_production_runs",
|
|
672
|
+
"column": "id",
|
|
673
|
+
"onDelete": "CASCADE",
|
|
674
|
+
"onUpdate": "CASCADE"
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
"qty": {
|
|
678
|
+
"type": "REAL",
|
|
679
|
+
"notNull": false,
|
|
680
|
+
"unique": false
|
|
681
|
+
},
|
|
682
|
+
"completed_at": {
|
|
683
|
+
"type": "TIMESTAMP",
|
|
684
|
+
"notNull": false,
|
|
685
|
+
"unique": false
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
"indexes": [
|
|
689
|
+
{
|
|
690
|
+
"name": "manufacturing_production_run_completions_slug_context_idx",
|
|
691
|
+
"columns": [
|
|
692
|
+
"tenant_id",
|
|
693
|
+
"slug",
|
|
694
|
+
"context"
|
|
695
|
+
],
|
|
696
|
+
"unique": true,
|
|
697
|
+
"nullsNotDistinct": true
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"name": "manufacturing_production_run_completions_tenant_ea7a0d0125_idx",
|
|
701
|
+
"columns": [
|
|
702
|
+
"tenant_id",
|
|
703
|
+
"created_at"
|
|
704
|
+
]
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"name": "manufacturing_production_run_completions_run_id_idx",
|
|
708
|
+
"columns": [
|
|
709
|
+
"run_id"
|
|
710
|
+
]
|
|
711
|
+
}
|
|
712
|
+
],
|
|
713
|
+
"version": "c940de6c"
|
|
714
|
+
},
|
|
715
|
+
"importPath": "@happyvertical/smrt-manufacturing"
|
|
716
|
+
},
|
|
461
717
|
"@happyvertical/smrt-manufacturing:RoutingStepCollection": {
|
|
462
718
|
"name": "routingstepcollection",
|
|
463
719
|
"className": "RoutingStepCollection",
|
|
@@ -1633,6 +1889,379 @@
|
|
|
1633
1889
|
},
|
|
1634
1890
|
"importPath": "@happyvertical/smrt-manufacturing"
|
|
1635
1891
|
},
|
|
1892
|
+
"@happyvertical/smrt-manufacturing:ProductionRun": {
|
|
1893
|
+
"name": "productionrun",
|
|
1894
|
+
"className": "ProductionRun",
|
|
1895
|
+
"qualifiedName": "@happyvertical/smrt-manufacturing:ProductionRun",
|
|
1896
|
+
"collection": "productionruns",
|
|
1897
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/manufacturing/src/models/ProductionRun.ts",
|
|
1898
|
+
"packageName": "@happyvertical/smrt-manufacturing",
|
|
1899
|
+
"fields": {
|
|
1900
|
+
"tenantId": {
|
|
1901
|
+
"type": "text",
|
|
1902
|
+
"required": false,
|
|
1903
|
+
"_meta": {
|
|
1904
|
+
"sqlType": "UUID",
|
|
1905
|
+
"nullable": true,
|
|
1906
|
+
"__tenancy": {
|
|
1907
|
+
"isTenantIdField": true,
|
|
1908
|
+
"autoFilter": true,
|
|
1909
|
+
"required": false,
|
|
1910
|
+
"autoPopulate": true,
|
|
1911
|
+
"nullable": true,
|
|
1912
|
+
"mode": "optional",
|
|
1913
|
+
"field": "tenantId",
|
|
1914
|
+
"allowSuperAdminBypass": false
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
},
|
|
1918
|
+
"bomId": {
|
|
1919
|
+
"type": "foreignKey",
|
|
1920
|
+
"required": true,
|
|
1921
|
+
"related": "BillOfMaterials",
|
|
1922
|
+
"_meta": {
|
|
1923
|
+
"required": true,
|
|
1924
|
+
"onDelete": "RESTRICT"
|
|
1925
|
+
}
|
|
1926
|
+
},
|
|
1927
|
+
"targetQty": {
|
|
1928
|
+
"type": "decimal",
|
|
1929
|
+
"required": false,
|
|
1930
|
+
"_meta": {}
|
|
1931
|
+
},
|
|
1932
|
+
"completedQty": {
|
|
1933
|
+
"type": "decimal",
|
|
1934
|
+
"required": false,
|
|
1935
|
+
"_meta": {}
|
|
1936
|
+
},
|
|
1937
|
+
"status": {
|
|
1938
|
+
"type": "text",
|
|
1939
|
+
"required": true,
|
|
1940
|
+
"default": "planned",
|
|
1941
|
+
"_meta": {
|
|
1942
|
+
"required": true
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
},
|
|
1946
|
+
"methods": {
|
|
1947
|
+
"remainingQty": {
|
|
1948
|
+
"name": "remainingQty",
|
|
1949
|
+
"async": false,
|
|
1950
|
+
"parameters": [],
|
|
1951
|
+
"returnType": "number",
|
|
1952
|
+
"isStatic": false,
|
|
1953
|
+
"isPublic": true
|
|
1954
|
+
}
|
|
1955
|
+
},
|
|
1956
|
+
"decoratorConfig": {
|
|
1957
|
+
"tableName": "manufacturing_production_runs",
|
|
1958
|
+
"api": {
|
|
1959
|
+
"include": [
|
|
1960
|
+
"list",
|
|
1961
|
+
"get"
|
|
1962
|
+
]
|
|
1963
|
+
},
|
|
1964
|
+
"mcp": {
|
|
1965
|
+
"include": [
|
|
1966
|
+
"list",
|
|
1967
|
+
"get"
|
|
1968
|
+
]
|
|
1969
|
+
},
|
|
1970
|
+
"cli": {
|
|
1971
|
+
"include": [
|
|
1972
|
+
"list",
|
|
1973
|
+
"get"
|
|
1974
|
+
]
|
|
1975
|
+
},
|
|
1976
|
+
"tenantScoped": {
|
|
1977
|
+
"mode": "optional"
|
|
1978
|
+
},
|
|
1979
|
+
"conflictColumns": [
|
|
1980
|
+
"tenant_id",
|
|
1981
|
+
"slug",
|
|
1982
|
+
"context"
|
|
1983
|
+
]
|
|
1984
|
+
},
|
|
1985
|
+
"extends": "SmrtObject",
|
|
1986
|
+
"exportName": "ProductionRun",
|
|
1987
|
+
"collectionExportName": "ProductionRunCollection",
|
|
1988
|
+
"validationRules": [
|
|
1989
|
+
{
|
|
1990
|
+
"field": "bomId",
|
|
1991
|
+
"rule": "required",
|
|
1992
|
+
"fieldType": "foreignKey"
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
"field": "status",
|
|
1996
|
+
"rule": "required",
|
|
1997
|
+
"fieldType": "text"
|
|
1998
|
+
}
|
|
1999
|
+
],
|
|
2000
|
+
"schema": {
|
|
2001
|
+
"tableName": "manufacturing_production_runs",
|
|
2002
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"manufacturing_production_runs\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"bom_id\" UUID NOT NULL,\n \"target_qty\" REAL,\n \"completed_qty\" REAL,\n \"status\" TEXT NOT NULL DEFAULT 'planned'\n);",
|
|
2003
|
+
"columns": {
|
|
2004
|
+
"id": {
|
|
2005
|
+
"type": "UUID",
|
|
2006
|
+
"primaryKey": true,
|
|
2007
|
+
"referenceKind": "id",
|
|
2008
|
+
"notNull": true
|
|
2009
|
+
},
|
|
2010
|
+
"slug": {
|
|
2011
|
+
"type": "TEXT",
|
|
2012
|
+
"notNull": true
|
|
2013
|
+
},
|
|
2014
|
+
"context": {
|
|
2015
|
+
"type": "TEXT",
|
|
2016
|
+
"notNull": true,
|
|
2017
|
+
"default": ""
|
|
2018
|
+
},
|
|
2019
|
+
"created_at": {
|
|
2020
|
+
"type": "TIMESTAMP",
|
|
2021
|
+
"notNull": true,
|
|
2022
|
+
"default": "current_timestamp"
|
|
2023
|
+
},
|
|
2024
|
+
"updated_at": {
|
|
2025
|
+
"type": "TIMESTAMP",
|
|
2026
|
+
"notNull": true,
|
|
2027
|
+
"default": "current_timestamp"
|
|
2028
|
+
},
|
|
2029
|
+
"tenant_id": {
|
|
2030
|
+
"type": "UUID",
|
|
2031
|
+
"referenceKind": "tenantId",
|
|
2032
|
+
"notNull": false,
|
|
2033
|
+
"unique": false
|
|
2034
|
+
},
|
|
2035
|
+
"bom_id": {
|
|
2036
|
+
"type": "UUID",
|
|
2037
|
+
"referenceKind": "foreignKey",
|
|
2038
|
+
"notNull": true,
|
|
2039
|
+
"unique": false,
|
|
2040
|
+
"foreignKey": {
|
|
2041
|
+
"table": "manufacturing_boms",
|
|
2042
|
+
"column": "id",
|
|
2043
|
+
"onDelete": "RESTRICT",
|
|
2044
|
+
"onUpdate": "CASCADE"
|
|
2045
|
+
}
|
|
2046
|
+
},
|
|
2047
|
+
"target_qty": {
|
|
2048
|
+
"type": "REAL",
|
|
2049
|
+
"notNull": false,
|
|
2050
|
+
"unique": false
|
|
2051
|
+
},
|
|
2052
|
+
"completed_qty": {
|
|
2053
|
+
"type": "REAL",
|
|
2054
|
+
"notNull": false,
|
|
2055
|
+
"unique": false
|
|
2056
|
+
},
|
|
2057
|
+
"status": {
|
|
2058
|
+
"type": "TEXT",
|
|
2059
|
+
"notNull": true,
|
|
2060
|
+
"unique": false,
|
|
2061
|
+
"default": "planned"
|
|
2062
|
+
}
|
|
2063
|
+
},
|
|
2064
|
+
"indexes": [
|
|
2065
|
+
{
|
|
2066
|
+
"name": "manufacturing_production_runs_slug_context_idx",
|
|
2067
|
+
"columns": [
|
|
2068
|
+
"tenant_id",
|
|
2069
|
+
"slug",
|
|
2070
|
+
"context"
|
|
2071
|
+
],
|
|
2072
|
+
"unique": true,
|
|
2073
|
+
"nullsNotDistinct": true
|
|
2074
|
+
},
|
|
2075
|
+
{
|
|
2076
|
+
"name": "manufacturing_production_runs_tenant_id_created_at_idx",
|
|
2077
|
+
"columns": [
|
|
2078
|
+
"tenant_id",
|
|
2079
|
+
"created_at"
|
|
2080
|
+
]
|
|
2081
|
+
},
|
|
2082
|
+
{
|
|
2083
|
+
"name": "manufacturing_production_runs_bom_id_idx",
|
|
2084
|
+
"columns": [
|
|
2085
|
+
"bom_id"
|
|
2086
|
+
]
|
|
2087
|
+
}
|
|
2088
|
+
],
|
|
2089
|
+
"version": "2ca8147d"
|
|
2090
|
+
},
|
|
2091
|
+
"importPath": "@happyvertical/smrt-manufacturing"
|
|
2092
|
+
},
|
|
2093
|
+
"@happyvertical/smrt-manufacturing:ProductionRunCompletion": {
|
|
2094
|
+
"name": "productionruncompletion",
|
|
2095
|
+
"className": "ProductionRunCompletion",
|
|
2096
|
+
"qualifiedName": "@happyvertical/smrt-manufacturing:ProductionRunCompletion",
|
|
2097
|
+
"collection": "productionruncompletions",
|
|
2098
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/manufacturing/src/models/ProductionRunCompletion.ts",
|
|
2099
|
+
"packageName": "@happyvertical/smrt-manufacturing",
|
|
2100
|
+
"fields": {
|
|
2101
|
+
"tenantId": {
|
|
2102
|
+
"type": "text",
|
|
2103
|
+
"required": false,
|
|
2104
|
+
"_meta": {
|
|
2105
|
+
"sqlType": "UUID",
|
|
2106
|
+
"nullable": true,
|
|
2107
|
+
"__tenancy": {
|
|
2108
|
+
"isTenantIdField": true,
|
|
2109
|
+
"autoFilter": true,
|
|
2110
|
+
"required": false,
|
|
2111
|
+
"autoPopulate": true,
|
|
2112
|
+
"nullable": true,
|
|
2113
|
+
"mode": "optional",
|
|
2114
|
+
"field": "tenantId",
|
|
2115
|
+
"allowSuperAdminBypass": false
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
},
|
|
2119
|
+
"runId": {
|
|
2120
|
+
"type": "foreignKey",
|
|
2121
|
+
"required": true,
|
|
2122
|
+
"related": "ProductionRun",
|
|
2123
|
+
"_meta": {
|
|
2124
|
+
"required": true,
|
|
2125
|
+
"onDelete": "CASCADE"
|
|
2126
|
+
}
|
|
2127
|
+
},
|
|
2128
|
+
"qty": {
|
|
2129
|
+
"type": "decimal",
|
|
2130
|
+
"required": false,
|
|
2131
|
+
"_meta": {}
|
|
2132
|
+
},
|
|
2133
|
+
"completedAt": {
|
|
2134
|
+
"type": "datetime",
|
|
2135
|
+
"required": false
|
|
2136
|
+
}
|
|
2137
|
+
},
|
|
2138
|
+
"methods": {},
|
|
2139
|
+
"decoratorConfig": {
|
|
2140
|
+
"tableName": "manufacturing_production_run_completions",
|
|
2141
|
+
"api": {
|
|
2142
|
+
"include": [
|
|
2143
|
+
"list",
|
|
2144
|
+
"get"
|
|
2145
|
+
]
|
|
2146
|
+
},
|
|
2147
|
+
"mcp": {
|
|
2148
|
+
"include": [
|
|
2149
|
+
"list",
|
|
2150
|
+
"get"
|
|
2151
|
+
]
|
|
2152
|
+
},
|
|
2153
|
+
"cli": {
|
|
2154
|
+
"include": [
|
|
2155
|
+
"list",
|
|
2156
|
+
"get"
|
|
2157
|
+
]
|
|
2158
|
+
},
|
|
2159
|
+
"tenantScoped": {
|
|
2160
|
+
"mode": "optional"
|
|
2161
|
+
},
|
|
2162
|
+
"conflictColumns": [
|
|
2163
|
+
"tenant_id",
|
|
2164
|
+
"slug",
|
|
2165
|
+
"context"
|
|
2166
|
+
]
|
|
2167
|
+
},
|
|
2168
|
+
"extends": "SmrtObject",
|
|
2169
|
+
"exportName": "ProductionRunCompletion",
|
|
2170
|
+
"collectionExportName": "ProductionRunCompletionCollection",
|
|
2171
|
+
"validationRules": [
|
|
2172
|
+
{
|
|
2173
|
+
"field": "runId",
|
|
2174
|
+
"rule": "required",
|
|
2175
|
+
"fieldType": "foreignKey"
|
|
2176
|
+
}
|
|
2177
|
+
],
|
|
2178
|
+
"schema": {
|
|
2179
|
+
"tableName": "manufacturing_production_run_completions",
|
|
2180
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"manufacturing_production_run_completions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"run_id\" UUID NOT NULL,\n \"qty\" REAL,\n \"completed_at\" TIMESTAMP\n);",
|
|
2181
|
+
"columns": {
|
|
2182
|
+
"id": {
|
|
2183
|
+
"type": "UUID",
|
|
2184
|
+
"primaryKey": true,
|
|
2185
|
+
"referenceKind": "id",
|
|
2186
|
+
"notNull": true
|
|
2187
|
+
},
|
|
2188
|
+
"slug": {
|
|
2189
|
+
"type": "TEXT",
|
|
2190
|
+
"notNull": true
|
|
2191
|
+
},
|
|
2192
|
+
"context": {
|
|
2193
|
+
"type": "TEXT",
|
|
2194
|
+
"notNull": true,
|
|
2195
|
+
"default": ""
|
|
2196
|
+
},
|
|
2197
|
+
"created_at": {
|
|
2198
|
+
"type": "TIMESTAMP",
|
|
2199
|
+
"notNull": true,
|
|
2200
|
+
"default": "current_timestamp"
|
|
2201
|
+
},
|
|
2202
|
+
"updated_at": {
|
|
2203
|
+
"type": "TIMESTAMP",
|
|
2204
|
+
"notNull": true,
|
|
2205
|
+
"default": "current_timestamp"
|
|
2206
|
+
},
|
|
2207
|
+
"tenant_id": {
|
|
2208
|
+
"type": "UUID",
|
|
2209
|
+
"referenceKind": "tenantId",
|
|
2210
|
+
"notNull": false,
|
|
2211
|
+
"unique": false
|
|
2212
|
+
},
|
|
2213
|
+
"run_id": {
|
|
2214
|
+
"type": "UUID",
|
|
2215
|
+
"referenceKind": "foreignKey",
|
|
2216
|
+
"notNull": true,
|
|
2217
|
+
"unique": false,
|
|
2218
|
+
"foreignKey": {
|
|
2219
|
+
"table": "manufacturing_production_runs",
|
|
2220
|
+
"column": "id",
|
|
2221
|
+
"onDelete": "CASCADE",
|
|
2222
|
+
"onUpdate": "CASCADE"
|
|
2223
|
+
}
|
|
2224
|
+
},
|
|
2225
|
+
"qty": {
|
|
2226
|
+
"type": "REAL",
|
|
2227
|
+
"notNull": false,
|
|
2228
|
+
"unique": false
|
|
2229
|
+
},
|
|
2230
|
+
"completed_at": {
|
|
2231
|
+
"type": "TIMESTAMP",
|
|
2232
|
+
"notNull": false,
|
|
2233
|
+
"unique": false
|
|
2234
|
+
}
|
|
2235
|
+
},
|
|
2236
|
+
"indexes": [
|
|
2237
|
+
{
|
|
2238
|
+
"name": "manufacturing_production_run_completions_slug_context_idx",
|
|
2239
|
+
"columns": [
|
|
2240
|
+
"tenant_id",
|
|
2241
|
+
"slug",
|
|
2242
|
+
"context"
|
|
2243
|
+
],
|
|
2244
|
+
"unique": true,
|
|
2245
|
+
"nullsNotDistinct": true
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
"name": "manufacturing_production_run_completions_tenant_ea7a0d0125_idx",
|
|
2249
|
+
"columns": [
|
|
2250
|
+
"tenant_id",
|
|
2251
|
+
"created_at"
|
|
2252
|
+
]
|
|
2253
|
+
},
|
|
2254
|
+
{
|
|
2255
|
+
"name": "manufacturing_production_run_completions_run_id_idx",
|
|
2256
|
+
"columns": [
|
|
2257
|
+
"run_id"
|
|
2258
|
+
]
|
|
2259
|
+
}
|
|
2260
|
+
],
|
|
2261
|
+
"version": "c940de6c"
|
|
2262
|
+
},
|
|
2263
|
+
"importPath": "@happyvertical/smrt-manufacturing"
|
|
2264
|
+
},
|
|
1636
2265
|
"@happyvertical/smrt-manufacturing:RoutingStep": {
|
|
1637
2266
|
"name": "routingstep",
|
|
1638
2267
|
"className": "RoutingStep",
|