diff --git a/.gitignore b/.gitignore index e59c294..42d183a 100644 --- a/.gitignore +++ b/.gitignore @@ -157,3 +157,4 @@ backend-0.1.3.zip BulkForecastTemplate BulkOrdersTemplate check.json +server/services/ocp/controller/materials/materialcheck.bak diff --git a/.includes b/.includes new file mode 100644 index 0000000..b0a0db7 --- /dev/null +++ b/.includes @@ -0,0 +1,8 @@ +database +dist +frontend/dist +CHANGELOG.md +drizzle.config.ts +package.json +package-lock.json +README.md \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index bb15ac3..8ae3449 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,104 @@ # All CHanges to LST can be found below. +## [2.27.0](https://git.tuffraid.net/cowch/lstV2/compare/v2.26.0...v2.27.0) (2025-09-10) + + +### 🌟 Enhancements + +* **eom:** lastSales, lastPurch added to be pulled with new template ([7cc3778](https://git.tuffraid.net/cowch/lstV2/commits/7cc3778506fc92392ca8431aee0edb203861e10d)) + + +### 🛠️ Code Refactor + +* **cosume:** changes to allow non logged in users to use this function ([271cdbd](https://git.tuffraid.net/cowch/lstV2/commits/271cdbdbfa2478ecf56e9b01a4474508acacda2e)) +* **mm query:** changes to the query to see pkg and materials properly and not duplicates ([57966ac](https://git.tuffraid.net/cowch/lstV2/commits/57966ac9de72543014451b7ccd75539296ccaa51)) +* **rfid:** changes to show all tags vs only 3 if there are more ([b677bc1](https://git.tuffraid.net/cowch/lstV2/commits/b677bc14981faff30c91f6ffe4602319dd3c6016)) +* **silo card:** changes to allow viewers to see and able to attach and detach ([796a8dc](https://git.tuffraid.net/cowch/lstV2/commits/796a8dccd2807890abdff7c8dacf8b2246eb265e)) +* **sql:** articles added in UOM ([cfed981](https://git.tuffraid.net/cowch/lstV2/commits/cfed981928a56389e09ef428c43ceabc1caec28e)) + + +### 🐛 Bug fixes + +* **article check:** corrected the query to not have a specfic plant in it ([79f1f8f](https://git.tuffraid.net/cowch/lstV2/commits/79f1f8f91ba33533de7f4a7cc91503cfd8dd4ce5)) +* **bookin:** corrected the bookin in error response ([1f8b8a7](https://git.tuffraid.net/cowch/lstV2/commits/1f8b8a7248c11c7e264c8c5ae7c042c5a0878c46)) +* **bookin:** corrections to only show the message on error vs the json ([b3ce767](https://git.tuffraid.net/cowch/lstV2/commits/b3ce767b323c990c0ccf35ad6c2c67136a27272e)) +* **db:** changes to the user so it deletes correctly ([932a72b](https://git.tuffraid.net/cowch/lstV2/commits/932a72ba884673471f0056e721cc3f2c8e34b4f3)) +* **eomservice:** changes to stop a crash incase the sql returned nothing due to start up ([6caa598](https://git.tuffraid.net/cowch/lstV2/commits/6caa5984e7a3e7b48b119c176835663ffec71151)) +* **frontend:** typos ([c6f6ef6](https://git.tuffraid.net/cowch/lstV2/commits/c6f6ef626295f452cdf26f6776b74cfb3b1a10f5)) +* **label query:** fixes to only pull in active layouts ([99ecf52](https://git.tuffraid.net/cowch/lstV2/commits/99ecf52218556e048ba9262e74f9b3d020dea31d)) +* **main material check:** corrections to properly ignore pkg during color checks ([6910550](https://git.tuffraid.net/cowch/lstV2/commits/6910550de769dce04b1045f96ab19cf7b8d1ef8c)) +* **material check:** split manual material out of the mm to properly catch it ([a53915a](https://git.tuffraid.net/cowch/lstV2/commits/a53915ad8cbec5bd8d6ba4643c460ad0162249e2)) +* **materials:** more fixes to try and please all plants to use this version and not call me ([00899a5](https://git.tuffraid.net/cowch/lstV2/commits/00899a5b778eab792b350a0b47589de1524d91c8)) +* **register:** changes to not give everyone system admin ([415d2e4](https://git.tuffraid.net/cowch/lstV2/commits/415d2e4a1d851cc46ac64ffc814a280a02293bbc)) + +## [2.26.0](https://git.tuffraid.net/cowch/lstV2/compare/v2.25.0...v2.26.0) (2025-08-28) + + +### 🛠️ Code Refactor + +* **labeling:** moved bookin fails inside bookin as it could be off ([df42319](https://git.tuffraid.net/cowch/lstV2/commits/df423192bfc5e2389872147e92b7d22e648a2927)) +* **labeling:** removed the wrong import ([788d636](https://git.tuffraid.net/cowch/lstV2/commits/788d6367a380a81722a76bd6adbe18831d88eeb5)) +* **materials:** changes for permissions on material consume ([3148aa7](https://git.tuffraid.net/cowch/lstV2/commits/3148aa79d73823499824cc0601fcabec97bb4f9d)) +* **materials:** changes to allow exact and eom transfers ([0a6ddea](https://git.tuffraid.net/cowch/lstV2/commits/0a6ddea8c0d2773aba00266df7e2839879d10cb1)) +* **notifcations:** changed hour to min in ti intergrations ([73d38ba](https://git.tuffraid.net/cowch/lstV2/commits/73d38ba3fe7ab4d5ca3a4a1e1c99fdd7bf5e92dc)) +* **tms intergration:** corrected how we added gl coding ([37f82a9](https://git.tuffraid.net/cowch/lstV2/commits/37f82a9710cf20e6d0d056893c9da43c70b9e619)) + + +### 🌟 Enhancements + +* **materials:** added in a bigger window on eom transfer lots ([53ed2c4](https://git.tuffraid.net/cowch/lstV2/commits/53ed2c4e6a0d3fafafbcb655b5d06cff6324363d)) +* **ocp:** zechetti 1 added in ([27586e9](https://git.tuffraid.net/cowch/lstV2/commits/27586e923a106f2b8dd804e9c8292edd5d009cf0)) +* **rfid:** new check to remove tags that have been at a line longer than 6 hours ([0ba338d](https://git.tuffraid.net/cowch/lstV2/commits/0ba338d48037f7def74196ca3f41de5807e2cb31)) +* **tms:** a clean up function was added to remove releases added as blockers older than 45d ([662a951](https://git.tuffraid.net/cowch/lstV2/commits/662a951b9871d5dfc21f01a76ba23be77b475757)) + + +### 📝 Testing Code + +* **forklifts:** forklift starting process ([8c296c5](https://git.tuffraid.net/cowch/lstV2/commits/8c296c5b783f42f85c30a955d6e9d540c50dcfbe)) + + +### 🐛 Bug fixes + +* **bookin:** corrected the error received from the book in fail ([369d160](https://git.tuffraid.net/cowch/lstV2/commits/369d16018c8be9fdb936afbc3749b3f9fcea58c8)) +* **dm:** corrected the remark section so its properly sent over ([68901a8](https://git.tuffraid.net/cowch/lstV2/commits/68901a857ae5161f024da9cdefc0a981a4907205)) +* **eom stats:** corrections to the eom inv stuff to be proper tiems ([468f933](https://git.tuffraid.net/cowch/lstV2/commits/468f933168cc40be0c1b159c31948a2c97600390)) +* **fake edi:** removed console log ([24a97af](https://git.tuffraid.net/cowch/lstV2/commits/24a97afe064d5c44872e24e6e3299ed5f2977a78)) +* **material check:** alt mm causing issues and utilizing an 80% to just be ok ([f4f3de4](https://git.tuffraid.net/cowch/lstV2/commits/f4f3de49cae277ffa158116d1802495b27fa8e75)) +* **ocp:** zechetti type correction to include the printer name ([4486fe2](https://git.tuffraid.net/cowch/lstV2/commits/4486fe24362b4811d7cff0467c7f2f85e0c9e3c4)) +* **produser:** changes to include DM ([8d6ead3](https://git.tuffraid.net/cowch/lstV2/commits/8d6ead3aa11aed95ffa3537fbe72cfa9bbceb380)) +* **transferlots:** missed adding this ([846ac47](https://git.tuffraid.net/cowch/lstV2/commits/846ac479b1bf211a7891ae362525ea14580ff0cc)) + +## [2.25.0](https://git.tuffraid.net/cowch/lstV2/compare/v2.24.1...v2.25.0) (2025-08-21) + + +### 🐛 Bug fixes + +* **dm page:** correction to the insturcitons ([a36552f](https://git.tuffraid.net/cowch/lstV2/commits/a36552fd9b9c77f8ecee8b36f45e613383841f95)) +* **dyco:** correction to disable the camera if ocme is off ([c7bb128](https://git.tuffraid.net/cowch/lstV2/commits/c7bb12822b13c0c1c929d2c8a9ab150cd0feeff2)) +* **gotransport:** error handling so we dont get spammed with errors ([2eb6fa7](https://git.tuffraid.net/cowch/lstV2/commits/2eb6fa77946d5f8572ffc5baa47da602482bce2b)) +* **https fixes:** made it so the settings can be grabbed via https ([803c963](https://git.tuffraid.net/cowch/lstV2/commits/803c963f964f26095b2aa6a7d0a60e03615d4c17)) +* **inv cards:** correction to properly display the names ([2288884](https://git.tuffraid.net/cowch/lstV2/commits/22888848291aa3df4ebbdd224656731fbb305fa7)) +* **inv query:** error in improper placed , in the query ([397f1da](https://git.tuffraid.net/cowch/lstV2/commits/397f1da595fd8a1e1c2a630a3650eb8715604c82)) +* **mainmaterial check:** if the machine dose not require mm to be staged properly ignore ([0d17fef](https://git.tuffraid.net/cowch/lstV2/commits/0d17fef1a1c75dd0f27988fd2e3527b508b915cb)) + + +### 🛠️ Code Refactor + +* **migration progress:** moved to start looking at the go backedn ([a0179a4](https://git.tuffraid.net/cowch/lstV2/commits/a0179a41bac93d2a7320802e9d70aa966ed79ae4)) +* **migrations:** not needed but we have it and needed to correct the settings ([2ff7b9b](https://git.tuffraid.net/cowch/lstV2/commits/2ff7b9baf9ca288f8a33bec3ab1a2ba331ace6b9)) +* **notifications:** refactored the cron job system so we can utilize outside the service ([103171c](https://git.tuffraid.net/cowch/lstV2/commits/103171c924a9de78b0a7600abb455fdd6f4bfea1)) +* **siloadjustment:** refactored to get the settings from the state vs direct from db ([8145dc8](https://git.tuffraid.net/cowch/lstV2/commits/8145dc800dced31860a926c80eca72cb39433b29)) + + +### 🌟 Enhancements + +* **dm:** changes to have a default time if nothing is passed in the excel ([9e5577e](https://git.tuffraid.net/cowch/lstV2/commits/9e5577e6bb4ff3b6c4004288e177fbab322a4b44)) +* **eom:** added in hostorical data and deletion for data over 45 days ([52345bc](https://git.tuffraid.net/cowch/lstV2/commits/52345bc94c9e8abc82150fb371a9ba0d0757f16a)) +* **migration start:** this starts the migration of all settings to look at the go backend vs this ([998e84f](https://git.tuffraid.net/cowch/lstV2/commits/998e84f5648148c9a94df7177a3d311e16bf4614)) +* **ocp:** materials contorls and transfer to next lot logic ([88f61c8](https://git.tuffraid.net/cowch/lstV2/commits/88f61c8eaa32a581094b04b5e18c654040dbeb92)) +* **prodrole:** added in planner role ([6ccf500](https://git.tuffraid.net/cowch/lstV2/commits/6ccf500e5eb82125f7bcd3d764282a4b8a750be9)) +* **psi:** psi querys added and av grab right now ([8d63f7f](https://git.tuffraid.net/cowch/lstV2/commits/8d63f7f6b0981d604b628ff2f710b8eb41d32837)) + ### [2.24.1](https://git.tuffraid.net/cowch/lstV2/compare/v2.24.0...v2.24.1) (2025-07-25) diff --git a/README.md b/README.md index c281894..a902c34 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +# THIS VERSION IS NO LONGER BEING UPDATED PLEASE GO TO THE NEW REPO LINK BELOW + +[NEW LST REPO](https://git.tuffraid.net/cowch/lst) + # lstV2 Logistics Support Tool V2 diff --git a/database/migrations/0070_brief_mephisto.sql b/database/migrations/0070_brief_mephisto.sql new file mode 100644 index 0000000..7a560b4 --- /dev/null +++ b/database/migrations/0070_brief_mephisto.sql @@ -0,0 +1,10 @@ +CREATE TABLE "labelRatio" ( + " ratio_id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" text DEFAULT 'labels', + "autoLabel" integer DEFAULT 0, + "manualLabel" integer DEFAULT 0, + "lastReset" timestamp DEFAULT now() +); +--> statement-breakpoint +ALTER TABLE "invHistoricalData" ADD COLUMN "lot_number" text;--> statement-breakpoint +CREATE UNIQUE INDEX "labelname" ON "labelRatio" USING btree ("name"); \ No newline at end of file diff --git a/database/migrations/0071_fantastic_old_lace.sql b/database/migrations/0071_fantastic_old_lace.sql new file mode 100644 index 0000000..f883d5d --- /dev/null +++ b/database/migrations/0071_fantastic_old_lace.sql @@ -0,0 +1,2 @@ +ALTER TABLE "invHistoricalData" ALTER COLUMN "upd_user" SET DEFAULT 'lst';--> statement-breakpoint +ALTER TABLE "invHistoricalData" ALTER COLUMN "upd_date" SET DEFAULT now(); \ No newline at end of file diff --git a/database/migrations/0072_round_black_knight.sql b/database/migrations/0072_round_black_knight.sql new file mode 100644 index 0000000..9c6aade --- /dev/null +++ b/database/migrations/0072_round_black_knight.sql @@ -0,0 +1,3 @@ +ALTER TABLE "userRoles" DROP CONSTRAINT "userRoles_user_id_users_user_id_fk"; +--> statement-breakpoint +ALTER TABLE "userRoles" ADD CONSTRAINT "userRoles_user_id_users_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("user_id") ON DELETE cascade ON UPDATE no action; \ No newline at end of file diff --git a/database/migrations/meta/0070_snapshot.json b/database/migrations/meta/0070_snapshot.json new file mode 100644 index 0000000..9c64ea2 --- /dev/null +++ b/database/migrations/meta/0070_snapshot.json @@ -0,0 +1,2250 @@ +{ + "id": "18eda0c0-b600-4f50-9662-d639796a0669", + "prevId": "169b8f50-692f-4474-b76b-3f4642dcdab8", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.apiHits": { + "name": "apiHits", + "schema": "", + "columns": { + "apiHit_id": { + "name": "apiHit_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "ip": { + "name": "ip", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "endpoint": { + "name": "endpoint", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "action": { + "name": "action", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastBody": { + "name": "lastBody", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "stats": { + "name": "stats", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "endpoint": { + "name": "endpoint", + "columns": [ + { + "expression": "endpoint", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "ip", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.commandLog": { + "name": "commandLog", + "schema": "", + "columns": { + "commandLog_id": { + "name": "commandLog_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "commandUsed": { + "name": "commandUsed", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "bodySent": { + "name": "bodySent", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "reasonUsed": { + "name": "reasonUsed", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.fifoIndex": { + "name": "fifoIndex", + "schema": "", + "columns": { + "fifoIndex_id": { + "name": "fifoIndex_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "lot": { + "name": "lot", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "av": { + "name": "av", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "runningNr": { + "name": "runningNr", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "prodDate": { + "name": "prodDate", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "fifoFollowed": { + "name": "fifoFollowed", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "fifo_runningNr": { + "name": "fifo_runningNr", + "columns": [ + { + "expression": "runningNr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.invHistoricalData": { + "name": "invHistoricalData", + "schema": "", + "columns": { + "inv_id": { + "name": "inv_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "histDate": { + "name": "histDate", + "type": "date", + "primaryKey": false, + "notNull": true + }, + "plantToken": { + "name": "plantToken", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "article": { + "name": "article", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "articleDescription": { + "name": "articleDescription", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "materialType": { + "name": "materialType", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "total_QTY": { + "name": "total_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "avaliable_QTY": { + "name": "avaliable_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "coa_QTY": { + "name": "coa_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "held_QTY": { + "name": "held_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lot_number": { + "name": "lot_number", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "consignment": { + "name": "consignment", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "upd_user": { + "name": "upd_user", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.logs": { + "name": "logs", + "schema": "", + "columns": { + "log_id": { + "name": "log_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "level": { + "name": "level", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'LST_Serivce'" + }, + "service": { + "name": "service", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'system'" + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "checked": { + "name": "checked", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.modules": { + "name": "modules", + "schema": "", + "columns": { + "module_id": { + "name": "module_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[\"view\",\"systemAdmin\"]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "module_name": { + "name": "module_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.notifications": { + "name": "notifications", + "schema": "", + "columns": { + "notify_id": { + "name": "notify_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "checkInterval": { + "name": "checkInterval", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'1'" + }, + "timeType": { + "name": "timeType", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'hour'" + }, + "emails": { + "name": "emails", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "lastRan": { + "name": "lastRan", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "notifiySettings": { + "name": "notifiySettings", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'::jsonb" + } + }, + "indexes": { + "notify_name": { + "name": "notify_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ocmeData": { + "name": "ocmeData", + "schema": "", + "columns": { + "ocme_id": { + "name": "ocme_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "sscc": { + "name": "sscc", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "runningNr": { + "name": "runningNr", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "completed": { + "name": "completed", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "lineNum": { + "name": "lineNum", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "pickedUp": { + "name": "pickedUp", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "areaFrom": { + "name": "areaFrom", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "ocme_runningNr": { + "name": "ocme_runningNr", + "columns": [ + { + "expression": "runningNr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ocmeCycleCounts": { + "name": "ocmeCycleCounts", + "schema": "", + "columns": { + "ocme_id": { + "name": "ocme_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "laneId": { + "name": "laneId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "warehouseName": { + "name": "warehouseName", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "laneName": { + "name": "laneName", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "good": { + "name": "good", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "cycleCount": { + "name": "cycleCount", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.manualPrinting": { + "name": "manualPrinting", + "schema": "", + "columns": { + "print_id": { + "name": "print_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "line": { + "name": "line", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "printReason": { + "name": "printReason", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "initials": { + "name": "initials", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "additionalComments": { + "name": "additionalComments", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.printerData": { + "name": "printerData", + "schema": "", + "columns": { + "printer_id": { + "name": "printer_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "humanReadableId": { + "name": "humanReadableId", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "ipAddress": { + "name": "ipAddress", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "port": { + "name": "port", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "statusText": { + "name": "statusText", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastTimePrinted": { + "name": "lastTimePrinted", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "assigned": { + "name": "assigned", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "remark": { + "name": "remark", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "printDelay": { + "name": "printDelay", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'90'" + }, + "monitorState": { + "name": "monitorState", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "processes": { + "name": "processes", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "humanReadableId": { + "name": "humanReadableId", + "columns": [ + { + "expression": "humanReadableId", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.prodlabels": { + "name": "prodlabels", + "schema": "", + "columns": { + "label_id": { + "name": "label_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "printerID": { + "name": "printerID", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "printerName": { + "name": "printerName", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "line": { + "name": "line", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "runningNr": { + "name": "runningNr", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'lst'" + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "runningNr": { + "name": "runningNr", + "columns": [ + { + "expression": "runningNr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.prodPermissions": { + "name": "prodPermissions", + "schema": "", + "columns": { + "prodPerm_id": { + "name": "prodPerm_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "rolesLegacy": { + "name": "rolesLegacy", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "prodPermName": { + "name": "prodPermName", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.qualityRequest": { + "name": "qualityRequest", + "schema": "", + "columns": { + "request_id": { + "name": "request_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "article": { + "name": "article", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "runningNr": { + "name": "runningNr", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lotNr": { + "name": "lotNr", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "warehouseAtRequest": { + "name": "warehouseAtRequest", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "locationAtRequest": { + "name": "locationAtRequest", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "warehouseMovedTo": { + "name": "warehouseMovedTo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "locationMovedTo": { + "name": "locationMovedTo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "durationToMove": { + "name": "durationToMove", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locationDropOff": { + "name": "locationDropOff", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "palletStatus": { + "name": "palletStatus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "palletStatusText": { + "name": "palletStatusText", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "palletRequest": { + "name": "palletRequest", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'LST'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_user": { + "name": "upd_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'LST'" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labelRatio": { + "name": "labelRatio", + "schema": "", + "columns": { + " ratio_id": { + "name": " ratio_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'labels'" + }, + "autoLabel": { + "name": "autoLabel", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "manualLabel": { + "name": "manualLabel", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lastReset": { + "name": "lastReset", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "labelname": { + "name": "labelname", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rfidReaders": { + "name": "rfidReaders", + "schema": "", + "columns": { + "rfidReader_id": { + "name": "rfidReader_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "reader": { + "name": "reader", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "readerIP": { + "name": "readerIP", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastHeartBeat": { + "name": "lastHeartBeat", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "lastTrigger": { + "name": "lastTrigger", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "lastTiggerGood": { + "name": "lastTiggerGood", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "lastTagScanned": { + "name": "lastTagScanned", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "goodReads": { + "name": "goodReads", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "badReads": { + "name": "badReads", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + } + }, + "indexes": { + "reader": { + "name": "reader", + "columns": [ + { + "expression": "reader", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rfidTags": { + "name": "rfidTags", + "schema": "", + "columns": { + "rfidTag_id": { + "name": "rfidTag_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "tagHex": { + "name": "tagHex", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastRead": { + "name": "lastRead", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "counts": { + "name": "counts", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "lastareaIn": { + "name": "lastareaIn", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "runningNumber": { + "name": "runningNumber", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "antenna": { + "name": "antenna", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tagStrength": { + "name": "tagStrength", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "tagHex": { + "name": "tagHex", + "columns": [ + { + "expression": "tagHex", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles": { + "name": "roles", + "schema": "", + "columns": { + "role_id": { + "name": "role_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "role_name": { + "name": "role_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.serverData": { + "name": "serverData", + "schema": "", + "columns": { + "server_id": { + "name": "server_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "sName": { + "name": "sName", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "serverDNS": { + "name": "serverDNS", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "plantToken": { + "name": "plantToken", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "idAddress": { + "name": "idAddress", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "greatPlainsPlantCode": { + "name": "greatPlainsPlantCode", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "streetAddress": { + "name": "streetAddress", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cityState": { + "name": "cityState", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "zipcode": { + "name": "zipcode", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "contactEmail": { + "name": "contactEmail", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "contactPhone": { + "name": "contactPhone", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "customerTiAcc": { + "name": "customerTiAcc", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lstServerPort": { + "name": "lstServerPort", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "serverLoc": { + "name": "serverLoc", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oldVersion": { + "name": "oldVersion", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastUpdated": { + "name": "lastUpdated", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "shippingHours": { + "name": "shippingHours", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'[{\"early\": \"06:30\", \"late\": \"23:00\"}]'" + }, + "tiPostTime": { + "name": "tiPostTime", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'[{\"from\": \"24\", \"to\": \"24\"}]'" + }, + "otherSettings": { + "name": "otherSettings", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[{\"specialInstructions\":\"something for ti\",\"active\":false}]'::jsonb" + }, + "isUpgrading": { + "name": "isUpgrading", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "plantToken": { + "name": "plantToken", + "columns": [ + { + "expression": "plantToken", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.settings": { + "name": "settings", + "schema": "", + "columns": { + "role_id": { + "name": "role_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "moduleName": { + "name": "moduleName", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[\"systemAdmin\"]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "name": { + "name": "name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.siloAdjustments": { + "name": "siloAdjustments", + "schema": "", + "columns": { + "siloAdjust_id": { + "name": "siloAdjust_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "level": { + "name": "level", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locationID": { + "name": "locationID", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "currentStockLevel": { + "name": "currentStockLevel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "newLevel": { + "name": "newLevel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "comment": { + "name": "comment", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "dateAdjusted": { + "name": "dateAdjusted", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "lastDateAdjusted": { + "name": "lastDateAdjusted", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "commentAddedBy": { + "name": "commentAddedBy", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "commentDate": { + "name": "commentDate", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "commentKey": { + "name": "commentKey", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'LST_Serivce'" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subModules": { + "name": "subModules", + "schema": "", + "columns": { + "submodule_id": { + "name": "submodule_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "moduleName": { + "name": "moduleName", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "link": { + "name": "link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[\"systemAdmin\"]'::jsonb" + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subSubModule": { + "name": "subSubModule", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "subModule_name": { + "name": "subModule_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.userRoles": { + "name": "userRoles", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role_id": { + "name": "role_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "module_id": { + "name": "module_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "user_module_unique": { + "name": "user_module_unique", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "module_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "userRoles_user_id_users_user_id_fk": { + "name": "userRoles_user_id_users_user_id_fk", + "tableFrom": "userRoles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "user_id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "userRoles_role_id_roles_role_id_fk": { + "name": "userRoles_role_id_roles_role_id_fk", + "tableFrom": "userRoles", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "role_id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "userRoles_module_id_modules_module_id_fk": { + "name": "userRoles_module_id_modules_module_id_fk", + "tableFrom": "userRoles", + "tableTo": "modules", + "columnsFrom": [ + "module_id" + ], + "columnsTo": [ + "module_id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "passwordToken": { + "name": "passwordToken", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "passwordTokenExpires": { + "name": "passwordTokenExpires", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "pingcode": { + "name": "pingcode", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "lastLogin": { + "name": "lastLogin", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "username": { + "name": "username", + "columns": [ + { + "expression": "username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/database/migrations/meta/0071_snapshot.json b/database/migrations/meta/0071_snapshot.json new file mode 100644 index 0000000..111fb14 --- /dev/null +++ b/database/migrations/meta/0071_snapshot.json @@ -0,0 +1,2252 @@ +{ + "id": "beb6fee0-80fe-42a1-8bdb-e7424f9401b7", + "prevId": "18eda0c0-b600-4f50-9662-d639796a0669", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.apiHits": { + "name": "apiHits", + "schema": "", + "columns": { + "apiHit_id": { + "name": "apiHit_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "ip": { + "name": "ip", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "endpoint": { + "name": "endpoint", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "action": { + "name": "action", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastBody": { + "name": "lastBody", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "stats": { + "name": "stats", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "endpoint": { + "name": "endpoint", + "columns": [ + { + "expression": "endpoint", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "ip", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.commandLog": { + "name": "commandLog", + "schema": "", + "columns": { + "commandLog_id": { + "name": "commandLog_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "commandUsed": { + "name": "commandUsed", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "bodySent": { + "name": "bodySent", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "reasonUsed": { + "name": "reasonUsed", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.fifoIndex": { + "name": "fifoIndex", + "schema": "", + "columns": { + "fifoIndex_id": { + "name": "fifoIndex_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "lot": { + "name": "lot", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "av": { + "name": "av", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "runningNr": { + "name": "runningNr", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "prodDate": { + "name": "prodDate", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "fifoFollowed": { + "name": "fifoFollowed", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "fifo_runningNr": { + "name": "fifo_runningNr", + "columns": [ + { + "expression": "runningNr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.invHistoricalData": { + "name": "invHistoricalData", + "schema": "", + "columns": { + "inv_id": { + "name": "inv_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "histDate": { + "name": "histDate", + "type": "date", + "primaryKey": false, + "notNull": true + }, + "plantToken": { + "name": "plantToken", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "article": { + "name": "article", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "articleDescription": { + "name": "articleDescription", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "materialType": { + "name": "materialType", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "total_QTY": { + "name": "total_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "avaliable_QTY": { + "name": "avaliable_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "coa_QTY": { + "name": "coa_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "held_QTY": { + "name": "held_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lot_number": { + "name": "lot_number", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "consignment": { + "name": "consignment", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "upd_user": { + "name": "upd_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'lst'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.logs": { + "name": "logs", + "schema": "", + "columns": { + "log_id": { + "name": "log_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "level": { + "name": "level", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'LST_Serivce'" + }, + "service": { + "name": "service", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'system'" + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "checked": { + "name": "checked", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.modules": { + "name": "modules", + "schema": "", + "columns": { + "module_id": { + "name": "module_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[\"view\",\"systemAdmin\"]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "module_name": { + "name": "module_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.notifications": { + "name": "notifications", + "schema": "", + "columns": { + "notify_id": { + "name": "notify_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "checkInterval": { + "name": "checkInterval", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'1'" + }, + "timeType": { + "name": "timeType", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'hour'" + }, + "emails": { + "name": "emails", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "lastRan": { + "name": "lastRan", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "notifiySettings": { + "name": "notifiySettings", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'::jsonb" + } + }, + "indexes": { + "notify_name": { + "name": "notify_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ocmeData": { + "name": "ocmeData", + "schema": "", + "columns": { + "ocme_id": { + "name": "ocme_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "sscc": { + "name": "sscc", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "runningNr": { + "name": "runningNr", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "completed": { + "name": "completed", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "lineNum": { + "name": "lineNum", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "pickedUp": { + "name": "pickedUp", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "areaFrom": { + "name": "areaFrom", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "ocme_runningNr": { + "name": "ocme_runningNr", + "columns": [ + { + "expression": "runningNr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ocmeCycleCounts": { + "name": "ocmeCycleCounts", + "schema": "", + "columns": { + "ocme_id": { + "name": "ocme_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "laneId": { + "name": "laneId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "warehouseName": { + "name": "warehouseName", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "laneName": { + "name": "laneName", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "good": { + "name": "good", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "cycleCount": { + "name": "cycleCount", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.manualPrinting": { + "name": "manualPrinting", + "schema": "", + "columns": { + "print_id": { + "name": "print_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "line": { + "name": "line", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "printReason": { + "name": "printReason", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "initials": { + "name": "initials", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "additionalComments": { + "name": "additionalComments", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.printerData": { + "name": "printerData", + "schema": "", + "columns": { + "printer_id": { + "name": "printer_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "humanReadableId": { + "name": "humanReadableId", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "ipAddress": { + "name": "ipAddress", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "port": { + "name": "port", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "statusText": { + "name": "statusText", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastTimePrinted": { + "name": "lastTimePrinted", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "assigned": { + "name": "assigned", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "remark": { + "name": "remark", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "printDelay": { + "name": "printDelay", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'90'" + }, + "monitorState": { + "name": "monitorState", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "processes": { + "name": "processes", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "humanReadableId": { + "name": "humanReadableId", + "columns": [ + { + "expression": "humanReadableId", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.prodlabels": { + "name": "prodlabels", + "schema": "", + "columns": { + "label_id": { + "name": "label_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "printerID": { + "name": "printerID", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "printerName": { + "name": "printerName", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "line": { + "name": "line", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "runningNr": { + "name": "runningNr", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'lst'" + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "runningNr": { + "name": "runningNr", + "columns": [ + { + "expression": "runningNr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.prodPermissions": { + "name": "prodPermissions", + "schema": "", + "columns": { + "prodPerm_id": { + "name": "prodPerm_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "rolesLegacy": { + "name": "rolesLegacy", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "prodPermName": { + "name": "prodPermName", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.qualityRequest": { + "name": "qualityRequest", + "schema": "", + "columns": { + "request_id": { + "name": "request_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "article": { + "name": "article", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "runningNr": { + "name": "runningNr", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lotNr": { + "name": "lotNr", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "warehouseAtRequest": { + "name": "warehouseAtRequest", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "locationAtRequest": { + "name": "locationAtRequest", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "warehouseMovedTo": { + "name": "warehouseMovedTo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "locationMovedTo": { + "name": "locationMovedTo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "durationToMove": { + "name": "durationToMove", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locationDropOff": { + "name": "locationDropOff", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "palletStatus": { + "name": "palletStatus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "palletStatusText": { + "name": "palletStatusText", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "palletRequest": { + "name": "palletRequest", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'LST'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_user": { + "name": "upd_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'LST'" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labelRatio": { + "name": "labelRatio", + "schema": "", + "columns": { + " ratio_id": { + "name": " ratio_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'labels'" + }, + "autoLabel": { + "name": "autoLabel", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "manualLabel": { + "name": "manualLabel", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lastReset": { + "name": "lastReset", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "labelname": { + "name": "labelname", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rfidReaders": { + "name": "rfidReaders", + "schema": "", + "columns": { + "rfidReader_id": { + "name": "rfidReader_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "reader": { + "name": "reader", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "readerIP": { + "name": "readerIP", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastHeartBeat": { + "name": "lastHeartBeat", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "lastTrigger": { + "name": "lastTrigger", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "lastTiggerGood": { + "name": "lastTiggerGood", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "lastTagScanned": { + "name": "lastTagScanned", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "goodReads": { + "name": "goodReads", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "badReads": { + "name": "badReads", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + } + }, + "indexes": { + "reader": { + "name": "reader", + "columns": [ + { + "expression": "reader", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rfidTags": { + "name": "rfidTags", + "schema": "", + "columns": { + "rfidTag_id": { + "name": "rfidTag_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "tagHex": { + "name": "tagHex", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastRead": { + "name": "lastRead", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "counts": { + "name": "counts", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "lastareaIn": { + "name": "lastareaIn", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "runningNumber": { + "name": "runningNumber", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "antenna": { + "name": "antenna", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tagStrength": { + "name": "tagStrength", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "tagHex": { + "name": "tagHex", + "columns": [ + { + "expression": "tagHex", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles": { + "name": "roles", + "schema": "", + "columns": { + "role_id": { + "name": "role_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "role_name": { + "name": "role_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.serverData": { + "name": "serverData", + "schema": "", + "columns": { + "server_id": { + "name": "server_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "sName": { + "name": "sName", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "serverDNS": { + "name": "serverDNS", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "plantToken": { + "name": "plantToken", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "idAddress": { + "name": "idAddress", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "greatPlainsPlantCode": { + "name": "greatPlainsPlantCode", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "streetAddress": { + "name": "streetAddress", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cityState": { + "name": "cityState", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "zipcode": { + "name": "zipcode", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "contactEmail": { + "name": "contactEmail", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "contactPhone": { + "name": "contactPhone", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "customerTiAcc": { + "name": "customerTiAcc", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lstServerPort": { + "name": "lstServerPort", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "serverLoc": { + "name": "serverLoc", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oldVersion": { + "name": "oldVersion", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastUpdated": { + "name": "lastUpdated", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "shippingHours": { + "name": "shippingHours", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'[{\"early\": \"06:30\", \"late\": \"23:00\"}]'" + }, + "tiPostTime": { + "name": "tiPostTime", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'[{\"from\": \"24\", \"to\": \"24\"}]'" + }, + "otherSettings": { + "name": "otherSettings", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[{\"specialInstructions\":\"something for ti\",\"active\":false}]'::jsonb" + }, + "isUpgrading": { + "name": "isUpgrading", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "plantToken": { + "name": "plantToken", + "columns": [ + { + "expression": "plantToken", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.settings": { + "name": "settings", + "schema": "", + "columns": { + "role_id": { + "name": "role_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "moduleName": { + "name": "moduleName", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[\"systemAdmin\"]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "name": { + "name": "name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.siloAdjustments": { + "name": "siloAdjustments", + "schema": "", + "columns": { + "siloAdjust_id": { + "name": "siloAdjust_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "level": { + "name": "level", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locationID": { + "name": "locationID", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "currentStockLevel": { + "name": "currentStockLevel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "newLevel": { + "name": "newLevel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "comment": { + "name": "comment", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "dateAdjusted": { + "name": "dateAdjusted", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "lastDateAdjusted": { + "name": "lastDateAdjusted", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "commentAddedBy": { + "name": "commentAddedBy", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "commentDate": { + "name": "commentDate", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "commentKey": { + "name": "commentKey", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'LST_Serivce'" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subModules": { + "name": "subModules", + "schema": "", + "columns": { + "submodule_id": { + "name": "submodule_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "moduleName": { + "name": "moduleName", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "link": { + "name": "link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[\"systemAdmin\"]'::jsonb" + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subSubModule": { + "name": "subSubModule", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "subModule_name": { + "name": "subModule_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.userRoles": { + "name": "userRoles", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role_id": { + "name": "role_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "module_id": { + "name": "module_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "user_module_unique": { + "name": "user_module_unique", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "module_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "userRoles_user_id_users_user_id_fk": { + "name": "userRoles_user_id_users_user_id_fk", + "tableFrom": "userRoles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "user_id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "userRoles_role_id_roles_role_id_fk": { + "name": "userRoles_role_id_roles_role_id_fk", + "tableFrom": "userRoles", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "role_id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "userRoles_module_id_modules_module_id_fk": { + "name": "userRoles_module_id_modules_module_id_fk", + "tableFrom": "userRoles", + "tableTo": "modules", + "columnsFrom": [ + "module_id" + ], + "columnsTo": [ + "module_id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "passwordToken": { + "name": "passwordToken", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "passwordTokenExpires": { + "name": "passwordTokenExpires", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "pingcode": { + "name": "pingcode", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "lastLogin": { + "name": "lastLogin", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "username": { + "name": "username", + "columns": [ + { + "expression": "username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/database/migrations/meta/0072_snapshot.json b/database/migrations/meta/0072_snapshot.json new file mode 100644 index 0000000..6209025 --- /dev/null +++ b/database/migrations/meta/0072_snapshot.json @@ -0,0 +1,2252 @@ +{ + "id": "e4bfefb5-7c21-4933-9900-7753416a7d40", + "prevId": "beb6fee0-80fe-42a1-8bdb-e7424f9401b7", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.apiHits": { + "name": "apiHits", + "schema": "", + "columns": { + "apiHit_id": { + "name": "apiHit_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "ip": { + "name": "ip", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "endpoint": { + "name": "endpoint", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "action": { + "name": "action", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastBody": { + "name": "lastBody", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "stats": { + "name": "stats", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "endpoint": { + "name": "endpoint", + "columns": [ + { + "expression": "endpoint", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "ip", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.commandLog": { + "name": "commandLog", + "schema": "", + "columns": { + "commandLog_id": { + "name": "commandLog_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "commandUsed": { + "name": "commandUsed", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "bodySent": { + "name": "bodySent", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "reasonUsed": { + "name": "reasonUsed", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.fifoIndex": { + "name": "fifoIndex", + "schema": "", + "columns": { + "fifoIndex_id": { + "name": "fifoIndex_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "lot": { + "name": "lot", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "av": { + "name": "av", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "runningNr": { + "name": "runningNr", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "prodDate": { + "name": "prodDate", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "fifoFollowed": { + "name": "fifoFollowed", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "fifo_runningNr": { + "name": "fifo_runningNr", + "columns": [ + { + "expression": "runningNr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.invHistoricalData": { + "name": "invHistoricalData", + "schema": "", + "columns": { + "inv_id": { + "name": "inv_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "histDate": { + "name": "histDate", + "type": "date", + "primaryKey": false, + "notNull": true + }, + "plantToken": { + "name": "plantToken", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "article": { + "name": "article", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "articleDescription": { + "name": "articleDescription", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "materialType": { + "name": "materialType", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "total_QTY": { + "name": "total_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "avaliable_QTY": { + "name": "avaliable_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "coa_QTY": { + "name": "coa_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "held_QTY": { + "name": "held_QTY", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lot_number": { + "name": "lot_number", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "consignment": { + "name": "consignment", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "upd_user": { + "name": "upd_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'lst'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.logs": { + "name": "logs", + "schema": "", + "columns": { + "log_id": { + "name": "log_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "level": { + "name": "level", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'LST_Serivce'" + }, + "service": { + "name": "service", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'system'" + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "checked": { + "name": "checked", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.modules": { + "name": "modules", + "schema": "", + "columns": { + "module_id": { + "name": "module_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[\"view\",\"systemAdmin\"]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "module_name": { + "name": "module_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.notifications": { + "name": "notifications", + "schema": "", + "columns": { + "notify_id": { + "name": "notify_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "checkInterval": { + "name": "checkInterval", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'1'" + }, + "timeType": { + "name": "timeType", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'hour'" + }, + "emails": { + "name": "emails", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "lastRan": { + "name": "lastRan", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "notifiySettings": { + "name": "notifiySettings", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'::jsonb" + } + }, + "indexes": { + "notify_name": { + "name": "notify_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ocmeData": { + "name": "ocmeData", + "schema": "", + "columns": { + "ocme_id": { + "name": "ocme_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "sscc": { + "name": "sscc", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "runningNr": { + "name": "runningNr", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "completed": { + "name": "completed", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "lineNum": { + "name": "lineNum", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "pickedUp": { + "name": "pickedUp", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "areaFrom": { + "name": "areaFrom", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "ocme_runningNr": { + "name": "ocme_runningNr", + "columns": [ + { + "expression": "runningNr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ocmeCycleCounts": { + "name": "ocmeCycleCounts", + "schema": "", + "columns": { + "ocme_id": { + "name": "ocme_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "laneId": { + "name": "laneId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "warehouseName": { + "name": "warehouseName", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "laneName": { + "name": "laneName", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "good": { + "name": "good", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "cycleCount": { + "name": "cycleCount", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.manualPrinting": { + "name": "manualPrinting", + "schema": "", + "columns": { + "print_id": { + "name": "print_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "line": { + "name": "line", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "printReason": { + "name": "printReason", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "initials": { + "name": "initials", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "additionalComments": { + "name": "additionalComments", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.printerData": { + "name": "printerData", + "schema": "", + "columns": { + "printer_id": { + "name": "printer_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "humanReadableId": { + "name": "humanReadableId", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "ipAddress": { + "name": "ipAddress", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "port": { + "name": "port", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "statusText": { + "name": "statusText", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastTimePrinted": { + "name": "lastTimePrinted", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "assigned": { + "name": "assigned", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "remark": { + "name": "remark", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "printDelay": { + "name": "printDelay", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'90'" + }, + "monitorState": { + "name": "monitorState", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "processes": { + "name": "processes", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "humanReadableId": { + "name": "humanReadableId", + "columns": [ + { + "expression": "humanReadableId", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.prodlabels": { + "name": "prodlabels", + "schema": "", + "columns": { + "label_id": { + "name": "label_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "printerID": { + "name": "printerID", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "printerName": { + "name": "printerName", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "line": { + "name": "line", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "runningNr": { + "name": "runningNr", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'lst'" + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "runningNr": { + "name": "runningNr", + "columns": [ + { + "expression": "runningNr", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.prodPermissions": { + "name": "prodPermissions", + "schema": "", + "columns": { + "prodPerm_id": { + "name": "prodPerm_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "rolesLegacy": { + "name": "rolesLegacy", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "prodPermName": { + "name": "prodPermName", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.qualityRequest": { + "name": "qualityRequest", + "schema": "", + "columns": { + "request_id": { + "name": "request_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "article": { + "name": "article", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "runningNr": { + "name": "runningNr", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lotNr": { + "name": "lotNr", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "warehouseAtRequest": { + "name": "warehouseAtRequest", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "locationAtRequest": { + "name": "locationAtRequest", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "warehouseMovedTo": { + "name": "warehouseMovedTo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "locationMovedTo": { + "name": "locationMovedTo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "durationToMove": { + "name": "durationToMove", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locationDropOff": { + "name": "locationDropOff", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "palletStatus": { + "name": "palletStatus", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "palletStatusText": { + "name": "palletStatusText", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "palletRequest": { + "name": "palletRequest", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "add_date": { + "name": "add_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'LST'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_user": { + "name": "upd_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'LST'" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labelRatio": { + "name": "labelRatio", + "schema": "", + "columns": { + " ratio_id": { + "name": " ratio_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'labels'" + }, + "autoLabel": { + "name": "autoLabel", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "manualLabel": { + "name": "manualLabel", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lastReset": { + "name": "lastReset", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "labelname": { + "name": "labelname", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rfidReaders": { + "name": "rfidReaders", + "schema": "", + "columns": { + "rfidReader_id": { + "name": "rfidReader_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "reader": { + "name": "reader", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "readerIP": { + "name": "readerIP", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastHeartBeat": { + "name": "lastHeartBeat", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "lastTrigger": { + "name": "lastTrigger", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "lastTiggerGood": { + "name": "lastTiggerGood", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "lastTagScanned": { + "name": "lastTagScanned", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "goodReads": { + "name": "goodReads", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "badReads": { + "name": "badReads", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + } + }, + "indexes": { + "reader": { + "name": "reader", + "columns": [ + { + "expression": "reader", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rfidTags": { + "name": "rfidTags", + "schema": "", + "columns": { + "rfidTag_id": { + "name": "rfidTag_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "tagHex": { + "name": "tagHex", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastRead": { + "name": "lastRead", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "counts": { + "name": "counts", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "lastareaIn": { + "name": "lastareaIn", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "runningNumber": { + "name": "runningNumber", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "antenna": { + "name": "antenna", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tagStrength": { + "name": "tagStrength", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "tagHex": { + "name": "tagHex", + "columns": [ + { + "expression": "tagHex", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles": { + "name": "roles", + "schema": "", + "columns": { + "role_id": { + "name": "role_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "role_name": { + "name": "role_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.serverData": { + "name": "serverData", + "schema": "", + "columns": { + "server_id": { + "name": "server_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "sName": { + "name": "sName", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "serverDNS": { + "name": "serverDNS", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "plantToken": { + "name": "plantToken", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "idAddress": { + "name": "idAddress", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "greatPlainsPlantCode": { + "name": "greatPlainsPlantCode", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "streetAddress": { + "name": "streetAddress", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cityState": { + "name": "cityState", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "zipcode": { + "name": "zipcode", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "contactEmail": { + "name": "contactEmail", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "contactPhone": { + "name": "contactPhone", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "customerTiAcc": { + "name": "customerTiAcc", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lstServerPort": { + "name": "lstServerPort", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "serverLoc": { + "name": "serverLoc", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oldVersion": { + "name": "oldVersion", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lastUpdated": { + "name": "lastUpdated", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "shippingHours": { + "name": "shippingHours", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'[{\"early\": \"06:30\", \"late\": \"23:00\"}]'" + }, + "tiPostTime": { + "name": "tiPostTime", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'[{\"from\": \"24\", \"to\": \"24\"}]'" + }, + "otherSettings": { + "name": "otherSettings", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[{\"specialInstructions\":\"something for ti\",\"active\":false}]'::jsonb" + }, + "isUpgrading": { + "name": "isUpgrading", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "plantToken": { + "name": "plantToken", + "columns": [ + { + "expression": "plantToken", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.settings": { + "name": "settings", + "schema": "", + "columns": { + "role_id": { + "name": "role_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "moduleName": { + "name": "moduleName", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[\"systemAdmin\"]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "name": { + "name": "name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.siloAdjustments": { + "name": "siloAdjustments", + "schema": "", + "columns": { + "siloAdjust_id": { + "name": "siloAdjust_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "level": { + "name": "level", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locationID": { + "name": "locationID", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "currentStockLevel": { + "name": "currentStockLevel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "newLevel": { + "name": "newLevel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "comment": { + "name": "comment", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "dateAdjusted": { + "name": "dateAdjusted", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "lastDateAdjusted": { + "name": "lastDateAdjusted", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "commentAddedBy": { + "name": "commentAddedBy", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "commentDate": { + "name": "commentDate", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "commentKey": { + "name": "commentKey", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "add_user": { + "name": "add_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'LST_Serivce'" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subModules": { + "name": "subModules", + "schema": "", + "columns": { + "submodule_id": { + "name": "submodule_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "moduleName": { + "name": "moduleName", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "link": { + "name": "link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles": { + "name": "roles", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[\"systemAdmin\"]'::jsonb" + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subSubModule": { + "name": "subSubModule", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "subModule_name": { + "name": "subModule_name", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.userRoles": { + "name": "userRoles", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role_id": { + "name": "role_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "module_id": { + "name": "module_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "user_module_unique": { + "name": "user_module_unique", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "module_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "userRoles_user_id_users_user_id_fk": { + "name": "userRoles_user_id_users_user_id_fk", + "tableFrom": "userRoles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "user_id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "userRoles_role_id_roles_role_id_fk": { + "name": "userRoles_role_id_roles_role_id_fk", + "tableFrom": "userRoles", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "role_id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "userRoles_module_id_modules_module_id_fk": { + "name": "userRoles_module_id_modules_module_id_fk", + "tableFrom": "userRoles", + "tableTo": "modules", + "columnsFrom": [ + "module_id" + ], + "columnsTo": [ + "module_id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "passwordToken": { + "name": "passwordToken", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "passwordTokenExpires": { + "name": "passwordTokenExpires", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "pingcode": { + "name": "pingcode", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "lastLogin": { + "name": "lastLogin", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "add_User": { + "name": "add_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "add_Date": { + "name": "add_Date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "upd_User": { + "name": "upd_User", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'LST_System'" + }, + "upd_date": { + "name": "upd_date", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "username": { + "name": "username", + "columns": [ + { + "expression": "username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/database/migrations/meta/_journal.json b/database/migrations/meta/_journal.json index 4f25c33..cc94f56 100644 --- a/database/migrations/meta/_journal.json +++ b/database/migrations/meta/_journal.json @@ -491,6 +491,27 @@ "when": 1752195894698, "tag": "0069_chemical_maximus", "breakpoints": true + }, + { + "idx": 70, + "version": "7", + "when": 1754767718941, + "tag": "0070_brief_mephisto", + "breakpoints": true + }, + { + "idx": 71, + "version": "7", + "when": 1754768521841, + "tag": "0071_fantastic_old_lace", + "breakpoints": true + }, + { + "idx": 72, + "version": "7", + "when": 1757167736042, + "tag": "0072_round_black_knight", + "breakpoints": true } ] } \ No newline at end of file diff --git a/database/schema/forkliftHours.ts b/database/schema/forkliftHours.ts new file mode 100644 index 0000000..e69de29 diff --git a/database/schema/forkliftLeases.ts b/database/schema/forkliftLeases.ts new file mode 100644 index 0000000..e69de29 diff --git a/database/schema/forklifts.ts b/database/schema/forklifts.ts new file mode 100644 index 0000000..e69de29 diff --git a/database/schema/historicalINV.ts b/database/schema/historicalINV.ts index c88a1ae..b9d357b 100644 --- a/database/schema/historicalINV.ts +++ b/database/schema/historicalINV.ts @@ -12,7 +12,7 @@ export const invHistoricalData = pgTable( "invHistoricalData", { inv_id: uuid("inv_id").defaultRandom().primaryKey(), - histDate: date("histDate").notNull(), // what month are we running in should just be the first of current month + histDate: date("histDate").notNull(), // this date should always be yesterday when we post it. plantToken: text("plantToken"), article: text("article").notNull(), articleDescription: text("articleDescription").notNull(), @@ -21,10 +21,11 @@ export const invHistoricalData = pgTable( avaliable_QTY: text("avaliable_QTY"), coa_QTY: text("coa_QTY"), held_QTY: text("held_QTY"), + lot_Number: text("lot_number"), consignment: text("consignment"), location: text("location"), - upd_user: text("upd_user"), - upd_date: timestamp("upd_date"), + upd_user: text("upd_user").default("lst"), + upd_date: timestamp("upd_date").defaultNow(), } // (table) => [ // // uniqueIndex('emailUniqueIndex').on(sql`lower(${table.email})`), diff --git a/database/schema/userRoles.ts b/database/schema/userRoles.ts index ef0002c..6649c4d 100644 --- a/database/schema/userRoles.ts +++ b/database/schema/userRoles.ts @@ -27,7 +27,7 @@ export const userRoles = pgTable( { user_id: uuid("user_id") .notNull() - .references(() => users.user_id), + .references(() => users.user_id, { onDelete: "cascade" }), role_id: uuid("role_id") .notNull() .references(() => roles.role_id), diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 31e15ac..bd9a808 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -21,6 +21,7 @@ "@radix-ui/react-select": "^2.2.5", "@radix-ui/react-separator": "^1.1.7", "@radix-ui/react-slot": "^1.2.3", + "@radix-ui/react-switch": "^1.2.6", "@radix-ui/react-tabs": "^1.1.12", "@radix-ui/react-tooltip": "^1.2.7", "@react-pdf/renderer": "^4.3.0", @@ -2072,6 +2073,41 @@ } } }, + "node_modules/@radix-ui/react-switch": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.2.6.tgz", + "integrity": "sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-use-previous": "1.1.1", + "@radix-ui/react-use-size": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-switch/node_modules/@radix-ui/primitive": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.3.tgz", + "integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==", + "license": "MIT" + }, "node_modules/@radix-ui/react-tabs": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.12.tgz", @@ -5316,18 +5352,6 @@ "node": ">= 4" } }, - "node_modules/immer": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/immer/-/immer-10.1.1.tgz", - "integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==", - "license": "MIT", - "optional": true, - "peer": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/immer" - } - }, "node_modules/import-fresh": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", diff --git a/frontend/package.json b/frontend/package.json index cae6a08..7376d8b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -25,6 +25,7 @@ "@radix-ui/react-select": "^2.2.5", "@radix-ui/react-separator": "^1.1.7", "@radix-ui/react-slot": "^1.2.3", + "@radix-ui/react-switch": "^1.2.6", "@radix-ui/react-tabs": "^1.1.12", "@radix-ui/react-tooltip": "^1.2.7", "@react-pdf/renderer": "^4.3.0", diff --git a/frontend/src/components/eom/EomPage.tsx b/frontend/src/components/eom/EomPage.tsx index 144ccb1..8acb92d 100644 --- a/frontend/src/components/eom/EomPage.tsx +++ b/frontend/src/components/eom/EomPage.tsx @@ -1,131 +1,9 @@ -import {useSessionStore} from "@/lib/store/sessionStore"; -import {LstCard} from "../extendedUI/LstCard"; -import {Tabs, TabsContent, TabsList, TabsTrigger} from "../ui/tabs"; -import {useModuleStore} from "@/lib/store/useModuleStore"; -import {Table, TableBody, TableCell, TableHead, TableHeader, TableRow} from "../ui/table"; -import {Skeleton} from "../ui/skeleton"; - -import {Link, useRouter} from "@tanstack/react-router"; -import {Popover, PopoverContent, PopoverTrigger} from "../ui/popover"; -import {Button} from "../ui/button"; -import {cn} from "@/lib/utils"; -import {CalendarIcon} from "lucide-react"; -import {format, startOfMonth} from "date-fns"; -import {Calendar} from "../ui/calendar"; -import {useState} from "react"; -import {toast} from "sonner"; -import KFP from "./KFP"; +import MaterialCheck from "./materialCheck/MaterialCheck"; export default function EomPage() { - const {modules} = useModuleStore(); - const {user} = useSessionStore(); - const router = useRouter(); - const [date, setDate] = useState(); - - if (!user) { - router.navigate({to: "/"}); - } - const eomMod = modules.filter((m) => m.name === "eom"); - // the users current role for eom is? - const role: any = user?.roles.filter((r) => r.module_id === eomMod[0].module_id) || ""; - - const tabs = [ - {key: "kfp", label: "Key Figures", roles: ["admin", "systemAdmin"], content: }, - {key: "fg", label: "Finished Goods", roles: ["admin", "systemAdmin"], content: }, - {key: "mm", label: "Main Material", roles: ["admin", "systemAdmin"], content: }, - {key: "mb", label: "Master Batch", roles: ["admin", "systemAdmin"], content: }, - {key: "ab", label: "Additive", roles: ["admin", "systemAdmin"], content: }, - {key: "pp", label: "Purchased Preforms", roles: ["admin", "systemAdmin"], content: }, - {key: "pre", label: "Preforms", roles: ["admin", "systemAdmin"], content: }, - {key: "pkg", label: "Packaging", roles: ["admin", "systemAdmin"], content: }, - {key: "ui", label: "Undefined Items", roles: ["admin"], content: }, - ]; return (
-
- - - - - - - - -
- -
-
- - - - {tabs.map((tab) => { - if (tab.roles.includes(role[0].role)) - return {tab.label}; - })} - - {tabs.map((tab) => { - if (tab.roles.includes(role[0].role)) - return {tab.content}; - })} - +
); } - -function DummyContent() { - return ( - - - - - Av - Description - Material Type - Waste - Loss / Gain $$ - - - - - {Array(10) - .fill(0) - .map((_, i) => ( - - - - {i} - - - - - - - - - - - - - - - {/* - - */} - - ))} - -
-
- ); -} diff --git a/frontend/src/components/eom/materialCheck/MaterialCheck.tsx b/frontend/src/components/eom/materialCheck/MaterialCheck.tsx new file mode 100644 index 0000000..bb3b9fc --- /dev/null +++ b/frontend/src/components/eom/materialCheck/MaterialCheck.tsx @@ -0,0 +1,3 @@ +export default function MaterialCheck() { + return
MaterialCheck
; +} diff --git a/frontend/src/components/eom/materialsData/MaterialData.tsx b/frontend/src/components/eom/materialsData/MaterialData.tsx new file mode 100644 index 0000000..4023908 --- /dev/null +++ b/frontend/src/components/eom/materialsData/MaterialData.tsx @@ -0,0 +1,211 @@ +import { LstCard } from "@/components/extendedUI/LstCard"; +import { Button } from "@/components/ui/button"; +import { Calendar } from "@/components/ui/calendar"; +import { Popover, PopoverTrigger } from "@/components/ui/popover"; +import { Skeleton } from "@/components/ui/skeleton"; +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/components/ui/table"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { useSessionStore } from "@/lib/store/sessionStore"; +import { useModuleStore } from "@/lib/store/useModuleStore"; +import { cn } from "@/lib/utils"; +import { PopoverContent } from "@radix-ui/react-popover"; +import { Link, useRouter } from "@tanstack/react-router"; +import { startOfMonth } from "date-fns"; +import { format } from "date-fns-tz"; +import { CalendarIcon } from "lucide-react"; +import { useState } from "react"; +import { toast } from "sonner"; +import KFP from "../KFP"; + +export default function MaterialData() { + const { modules } = useModuleStore(); + const { user } = useSessionStore(); + const router = useRouter(); + const [date, setDate] = useState(); + + if (!user) { + router.navigate({ to: "/" }); + } + const eomMod = modules.filter((m) => m.name === "eom"); + // the users current role for eom is? + const role: any = + user?.roles.filter((r) => r.module_id === eomMod[0].module_id) || ""; + + const tabs = [ + { + key: "kfp", + label: "Key Figures", + roles: ["admin", "systemAdmin"], + content: , + }, + { + key: "fg", + label: "Finished Goods", + roles: ["admin", "systemAdmin"], + content: , + }, + { + key: "mm", + label: "Main Material", + roles: ["admin", "systemAdmin"], + content: , + }, + { + key: "mb", + label: "Master Batch", + roles: ["admin", "systemAdmin"], + content: , + }, + { + key: "ab", + label: "Additive", + roles: ["admin", "systemAdmin"], + content: , + }, + { + key: "pp", + label: "Purchased Preforms", + roles: ["admin", "systemAdmin"], + content: , + }, + { + key: "pre", + label: "Preforms", + roles: ["admin", "systemAdmin"], + content: , + }, + { + key: "pkg", + label: "Packaging", + roles: ["admin", "systemAdmin"], + content: , + }, + { + key: "ui", + label: "Undefined Items", + roles: ["admin"], + content: , + }, + ]; + return ( +
+
+ + + + + + + + +
+ +
+
+ + + + {tabs.map((tab) => { + if (tab.roles.includes(role[0].role)) + return ( + + {tab.label} + + ); + })} + + {tabs.map((tab) => { + if (tab.roles.includes(role[0].role)) + return ( + + {tab.content} + + ); + })} + +
+ ); +} + +function DummyContent() { + return ( + + + + + Av + Description + Material Type + Waste + Loss / Gain $$ + + + + + {Array(10) + .fill(0) + .map((_, i) => ( + + + + {i} + + + + + + + + + + + + + + + {/* + + */} + + ))} + +
+
+ ); +} diff --git a/frontend/src/components/logistics/barcodeGenerator/CommonCommands.tsx b/frontend/src/components/logistics/barcodeGenerator/CommonCommands.tsx index 139405f..cdd2a06 100644 --- a/frontend/src/components/logistics/barcodeGenerator/CommonCommands.tsx +++ b/frontend/src/components/logistics/barcodeGenerator/CommonCommands.tsx @@ -6,7 +6,10 @@ import Barcode from "react-barcode"; import { BarcodePDFExport } from "./BarcodeExport"; import { BulkBarcodePDFExport } from "./BulkExport"; -const commoncmd = [{ name: "Relocate", commandId: 33 }]; +const commoncmd = [ + { name: "Relocate", commandId: 33 }, + //-{ name: "Stock in", commandId: 22 }, +]; export default function CommonCommands() { const [checked, setChecked] = useState([]); diff --git a/frontend/src/components/logistics/dm/dmPage.tsx b/frontend/src/components/logistics/dm/dmPage.tsx index b37df66..1bee0c3 100644 --- a/frontend/src/components/logistics/dm/dmPage.tsx +++ b/frontend/src/components/logistics/dm/dmPage.tsx @@ -26,7 +26,7 @@ export default function DmPage() {
  • Download the standard template if you have not yet done - so, top right click standard, then template. + so, Above click Standard Order Template.
  • Add in the orders like you see in the example below. @@ -37,8 +37,8 @@ export default function DmPage() { customerReleaseNumber. Quatity and dates can change.
  • - Once you have all the orders enters click the upload - button on the top right + Once you have all the orders entered, click Standard + Order Import
diff --git a/frontend/src/components/logistics/materialHelper/consumption/ConsumeMaterial.tsx b/frontend/src/components/logistics/materialHelper/consumption/ConsumeMaterial.tsx index b788e5e..3c7a5da 100644 --- a/frontend/src/components/logistics/materialHelper/consumption/ConsumeMaterial.tsx +++ b/frontend/src/components/logistics/materialHelper/consumption/ConsumeMaterial.tsx @@ -1,26 +1,30 @@ -import {LstCard} from "@/components/extendedUI/LstCard"; -import {Button} from "@/components/ui/button"; -import {CardHeader} from "@/components/ui/card"; -import {Input} from "@/components/ui/input"; -import {Label} from "@/components/ui/label"; -import {useSessionStore} from "@/lib/store/sessionStore"; -import axios from "axios"; -import {useState} from "react"; +import { LstCard } from "@/components/extendedUI/LstCard"; +import { Button } from "@/components/ui/button"; +import { CardHeader } from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; -import {useForm} from "react-hook-form"; -import {toast} from "sonner"; +import axios from "axios"; +import { useState } from "react"; + +import { useForm } from "react-hook-form"; +import { toast } from "sonner"; export default function ConsumeMaterial() { - const {register: register1, handleSubmit: handleSubmit1, reset} = useForm(); + const { + register: register1, + handleSubmit: handleSubmit1, + reset, + } = useForm(); const [submitting, setSubmitting] = useState(false); - const {token} = useSessionStore(); const handleConsume = async (data: any) => { setSubmitting(true); try { - const result = await axios.post(`/api/logistics/consume`, data, { - headers: {Authorization: `Bearer ${token}`}, - }); + // const result = await axios.post(`/api/logistics/consume`, data, { + // headers: {Authorization: `Bearer ${token}`}, + // }); + const result = await axios.post(`/api/logistics/consume`, data); if (result.data.success) { toast.success(result.data.message); setSubmitting(false); @@ -33,12 +37,14 @@ export default function ConsumeMaterial() { toast.error(result.data.message); } } catch (error: any) { - //console.log(error); + console.log(error); setSubmitting(false); if (error.status === 401) { toast.error("Unauthorized to do this task."); } else { - toast.error("Unexpected error if this continues please constact an admin."); + toast.error( + "Unexpected error if this continues please constact an admin." + ); } } }; @@ -53,7 +59,9 @@ export default function ConsumeMaterial() {
- +
- +
-
@@ -81,12 +96,19 @@ export default function ConsumeMaterial() {
    -
  1. 1. Enter the running number of the material you would like to consume
  2. -
  3. 2. Enter the lot number you will be consuming to
  4. +
  5. + 1. Enter the running number of the + material you would like to consume +
  6. +
  7. + 2. Enter the lot number you will be + consuming to +
  8. 3. Press consume material

- *This process is only for barcoded material, if it is set to auto consume you will + *This process is only for barcoded material, + if it is set to auto consume you will encounter and error.

diff --git a/frontend/src/components/logistics/materialHelper/consumption/TransferToNextLot.tsx b/frontend/src/components/logistics/materialHelper/consumption/TransferToNextLot.tsx new file mode 100644 index 0000000..8d0a4b1 --- /dev/null +++ b/frontend/src/components/logistics/materialHelper/consumption/TransferToNextLot.tsx @@ -0,0 +1,478 @@ +import { LstCard } from "@/components/extendedUI/LstCard"; +import { Button } from "@/components/ui/button"; +import { CardContent, CardHeader } from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; +import { Switch } from "@/components/ui/switch"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { useAppForm } from "@/utils/formStuff"; +import axios from "axios"; +import { useState } from "react"; +import { toast } from "sonner"; +import { Info } from "lucide-react"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/components/ui/tooltip"; +import { useSettingStore } from "@/lib/store/useSettings"; + +export default function TransferToNextLot() { + const [gaylordFilled, setGaylordFilled] = useState([0]); + const [actualAmount, setActualAmount] = useState(0); + const [tab, setTab] = useState("esitmate"); + const [typeSwitch, setTypeSwitch] = useState(false); + const { settings } = useSettingStore(); + + const server = settings.filter((n: any) => n.name === "dbServer"); + const form = useAppForm({ + defaultValues: { + runningNumber: "", + lotNumber: "", + originalAmount: "", + amount: "", + }, + onSubmit: async ({ value }) => { + //console.log(transferData); + //toast.success("603468: qty: 361, was transfered to lot:24897"); + try { + const res = await axios.post("/api/ocp/materiallottransfer", { + runningNumber: Number(value.runningNumber), + lotNumber: Number(value.lotNumber), + originalAmount: Number(value.originalAmount), + level: Number( + gaylordFilled.length === 1 + ? 0.25 + : gaylordFilled.length === 2 + ? 0.5 + : gaylordFilled.length === 3 + ? 0.75 + : gaylordFilled.length === 4 && 0.95 + ), + amount: actualAmount, + type: typeSwitch ? "eom" : "lot", + }); + + if (res.data.success) { + toast.success(`${res.data.message}`); + form.reset(); + setGaylordFilled([0]); + setActualAmount(0); + } + //console.log(res.data); + + if (!res.data.success) { + toast.error(res.data.message); + } + } catch (error) { + if (error) { + console.log(error); + //toast.error(error) + } + } + }, + }); + return ( +
+ + +

+ Material Transfer to Next lot +

+
+
+
+
+
+ + + + + Estimate Amount + + + Actual Amount + + + + +
+ + + + +
+
+ +
+
+ + +

+ Enter the total amount of + the cage/gaylord +

+
+ + + setActualAmount( + Number( + e.target.value + ) + ) + } + /> + +
+
+
+
+
+
+ +
{ + e.preventDefault(); + form.handleSubmit(); + }} + > +
+ ( + + )} + /> +
+
+ ( + + )} + /> + {tab !== "actual" && ( +
+ ( + + )} + /> +
+ )} +
+
+
+ + + {typeSwitch ? ( +
+ + "EOM + Transfer" + + + + + + +

+ Click + the + toggle + if + you + will + be + transfering + at + EOM, + NOTE: + This + will + trigger + the + delayed + transfer. +

+
+
+
+ ) : ( +
+ + "Lot + Transfer" + + + + + + +

+ Click + the + toggle + if + you + will + be + transfering + at + EOM, + NOTE: + This + will + trigger + the + delayed + transfer. +

+
+
+
+ )} +
+
+ + + + Transfer To Lot + + +
+
+
+
+
+
+
+ + +

+ Moving material to the next lot. +

+
+ {tab !== "actual" ? ( +
+
    +
  1. + 1. Grab the gaylord running + number from the gaylord at the + line/next to the tschritter +
  2. +
  3. + 2. Grab the next lot number you + are going to be running (or the + one that state no Main material + prepared) +
  4. +
  5. + 3. Enter the total gaylord + weight (this is how much the + gaylord weighed when it came in + from the supplier.) +
  6. +
  7. + 4. *Click the level of the + gaylord (this is just an + estimate to move to the next + lot.) +
  8. +
  9. + 5. type in running number on the + gaylord. +
  10. +
  11. + 6. Type in the new lot number. +
  12. +
  13. 7. Press "Transfer To Lot"
  14. +
+

+

+ * to reduce the time needed to get + the lot going we will use an + estimate of how full the gaylord is. +

+

+ NOTE: This is not the return + process, this process will just get + the gaylord to the next lot. +

+
+ {settings.length > 0 && ( +

+ For more in depth instructions + please{" "} + + CLICK HERE + +

+ )} +
+ ) : ( +
+
    +
  1. + 1. Grab the gaylord running + number from the gaylord at the + line/next to the tschritter +
  2. +
  3. + 2. Grab the next lot number you + are going to be running (or the + one that state no Main material + prepared) +
  4. +
  5. + 3. Take the gaylord to the scale + and weight it +
  6. +
  7. + 4. Enter the weight of the + gaylord minus the tar weight. +
  8. +
  9. + 5. type in running number on the + gaylord. +
  10. +
  11. + 6. Type in the new lot number. +
  12. +
  13. 7. Press "Transfer To Lot"
  14. +
+

+ +

+ NOTE: This is not the return + process, this process will just get + the gaylord to the next lot. +

+
+ {settings.length > 0 && ( +

+ For more in depth instructions + please{" "} + + CLICK HERE + +

+ )} +
+ )} +
+
+
+
+
+
+ ); +} diff --git a/frontend/src/components/logistics/siloAdjustments/AttachSilo.tsx b/frontend/src/components/logistics/siloAdjustments/AttachSilo.tsx index 564a7e3..63dd35a 100644 --- a/frontend/src/components/logistics/siloAdjustments/AttachSilo.tsx +++ b/frontend/src/components/logistics/siloAdjustments/AttachSilo.tsx @@ -40,7 +40,6 @@ export function AttachSilo(props: any) { machineId: "", }, onSubmit: async ({ value }) => { - console.log(value); try { const res = await axios.post( "/api/logistics/attachsilo", diff --git a/frontend/src/components/logistics/siloAdjustments/DetachSilo.tsx b/frontend/src/components/logistics/siloAdjustments/DetachSilo.tsx index a1c1a01..586c34e 100644 --- a/frontend/src/components/logistics/siloAdjustments/DetachSilo.tsx +++ b/frontend/src/components/logistics/siloAdjustments/DetachSilo.tsx @@ -48,6 +48,7 @@ export function DetachSilo(props: any) { ); if (res.status === 200) { + console.log(res.data.data); toast.success(res.data.message); refetch(); diff --git a/frontend/src/components/logistics/siloAdjustments/SiloCard.tsx b/frontend/src/components/logistics/siloAdjustments/SiloCard.tsx index 67b4b63..1b788f1 100644 --- a/frontend/src/components/logistics/siloAdjustments/SiloCard.tsx +++ b/frontend/src/components/logistics/siloAdjustments/SiloCard.tsx @@ -21,13 +21,28 @@ import { toast } from "sonner"; import ChartData from "./ChartData"; import { AttachSilo } from "./AttachSilo"; import { DetachSilo } from "./DetachSilo"; +import { useSessionStore } from "@/lib/store/sessionStore"; +import { useModuleStore } from "@/lib/store/useModuleStore"; +import { useGetUserRoles } from "@/lib/store/useGetRoles"; export default function SiloCard(data: any) { const token = localStorage.getItem("auth_token"); const [submitting, setSubmitting] = useState(false); const { refetch } = useQuery(getStockSilo()); + const { user } = useSessionStore(); + const { userRoles } = useGetUserRoles(); + const { modules } = useModuleStore(); const silo = data.silo; + // roles that can do the silo adjustments + const roles = ["systemAdmin", "technician", "admin", "manager"]; + + const module = modules.filter((n) => n.name === "logistics"); + + const accessRoles = userRoles.filter( + (n) => n.module_id === module[0]?.module_id + ) as any; + const form = useForm({ defaultValues: { newLevel: "", @@ -46,7 +61,7 @@ export default function SiloCard(data: any) { dataToSubmit, { headers: { Authorization: `Bearer ${token}` } } ); - console.log(res.data); + //console.log(res.data); if (res.data.success) { toast.success(res.data.message); @@ -70,6 +85,8 @@ export default function SiloCard(data: any) { } }, }); + + console.log(accessRoles); return (
@@ -109,82 +126,98 @@ export default function SiloCard(data: any) {
) : ( -
{ - e.preventDefault(); - e.stopPropagation(); - }} - > - - value.length > 1 - ? undefined - : "You must enter a value greate than 1", - }} - children={(field) => { - return ( -
-
- -
- -
-
-
- - field.handleChange( - e.target.value - ) - } - /> - -
+ <> + {user && + roles.includes(accessRoles[0]?.role) && ( + { + e.preventDefault(); + e.stopPropagation(); + }} + > + + value.length > 1 + ? undefined + : "You must enter a value greate than 1", + }} + children={(field) => { + return ( +
+
+ +
+ +
+
+
+ + field.handleChange( + e + .target + .value + ) + } + /> + +
- {field.state.meta.errors - .length ? ( - - {field.state.meta.errors.join( - "," - )} - - ) : null} -
- ); - }} - /> - + {field.state.meta + .errors + .length ? ( + + {field.state.meta.errors.join( + "," + )} + + ) : null} +
+ ); + }} + /> + + )} + )}
diff --git a/frontend/src/components/production/ocp/ManualPrinting/ManualPrintForm.tsx b/frontend/src/components/production/ocp/ManualPrinting/ManualPrintForm.tsx index 5c58361..7578728 100644 --- a/frontend/src/components/production/ocp/ManualPrinting/ManualPrintForm.tsx +++ b/frontend/src/components/production/ocp/ManualPrinting/ManualPrintForm.tsx @@ -243,7 +243,8 @@ export default function ManualPrintForm() {