Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

feat: jobs rls

Brad Barbinf07af9a268d3
diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.ts
index 03800390a8..28937c3ef7 100644
--- a/packages/database/src/swagger-docs-schema.ts
+++ b/packages/database/src/swagger-docs-schema.ts
@@ -3363,6 +3363,12 @@ export default {
{
$ref: "#/parameters/rowFilter.methodMaterial.methodOperationId",
},
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.scrapQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.productionQuantity",
+ },
{
$ref: "#/parameters/select",
},
@@ -3473,6 +3479,12 @@ export default {
{
$ref: "#/parameters/rowFilter.methodMaterial.methodOperationId",
},
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.scrapQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.productionQuantity",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -3537,6 +3549,12 @@ export default {
{
$ref: "#/parameters/rowFilter.methodMaterial.methodOperationId",
},
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.scrapQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.productionQuantity",
+ },
{
$ref: "#/parameters/body.methodMaterial",
},
@@ -3873,6 +3891,12 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteMaterial.quoteOperationId",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteMaterial.scrapQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteMaterial.productionQuantity",
+ },
{
$ref: "#/parameters/select",
},
@@ -3992,6 +4016,12 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteMaterial.quoteOperationId",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteMaterial.scrapQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteMaterial.productionQuantity",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -4065,6 +4095,12 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteMaterial.quoteOperationId",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteMaterial.scrapQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.quoteMaterial.productionQuantity",
+ },
{
$ref: "#/parameters/body.quoteMaterial",
},
@@ -4371,6 +4407,307 @@ export default {
tags: ["salesOrderLines"],
},
},
+ "/jobOperation": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.jobId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.order",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.processId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.workCenterId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.description",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.setupTime",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.setupUnit",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.laborTime",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.laborUnit",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.machineTime",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.machineUnit",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.operationOrder",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.quotingRate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.laborRate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.overheadRate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.workInstruction",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/order",
+ },
+ {
+ $ref: "#/parameters/range",
+ },
+ {
+ $ref: "#/parameters/rangeUnit",
+ },
+ {
+ $ref: "#/parameters/offset",
+ },
+ {
+ $ref: "#/parameters/limit",
+ },
+ {
+ $ref: "#/parameters/preferCount",
+ },
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/jobOperation",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ summary: "Stores information about operations performed in jobs",
+ tags: ["jobOperation"],
+ },
+ post: {
+ parameters: [
+ {
+ $ref: "#/parameters/body.jobOperation",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/preferPost",
+ },
+ ],
+ responses: {
+ "201": {
+ description: "Created",
+ },
+ },
+ summary: "Stores information about operations performed in jobs",
+ tags: ["jobOperation"],
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.jobId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.order",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.processId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.workCenterId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.description",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.setupTime",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.setupUnit",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.laborTime",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.laborUnit",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.machineTime",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.machineUnit",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.operationOrder",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.quotingRate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.laborRate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.overheadRate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.workInstruction",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ summary: "Stores information about operations performed in jobs",
+ tags: ["jobOperation"],
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.jobId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.order",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.processId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.workCenterId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.description",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.setupTime",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.setupUnit",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.laborTime",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.laborUnit",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.machineTime",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.machineUnit",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.operationOrder",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.quotingRate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.laborRate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.overheadRate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobOperation.workInstruction",
+ },
+ {
+ $ref: "#/parameters/body.jobOperation",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ summary: "Stores information about operations performed in jobs",
+ tags: ["jobOperation"],
+ },
+ },
"/journalLine": {
get: {
parameters: [
@@ -4737,29 +5074,32 @@ export default {
tags: ["purchaseOrderLines"],
},
},
- "/quoteOperationWorkInstruction": {
+ "/materialForm": {
get: {
parameters: [
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.quoteOperationId",
+ $ref: "#/parameters/rowFilter.materialForm.id",
},
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.content",
+ $ref: "#/parameters/rowFilter.materialForm.name",
},
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.companyId",
+ $ref: "#/parameters/rowFilter.materialForm.companyId",
},
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.createdAt",
+ $ref: "#/parameters/rowFilter.materialForm.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.materialForm.createdBy",
},
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.createdBy",
+ $ref: "#/parameters/rowFilter.materialForm.createdAt",
},
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.updatedAt",
+ $ref: "#/parameters/rowFilter.materialForm.updatedBy",
},
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.updatedBy",
+ $ref: "#/parameters/rowFilter.materialForm.updatedAt",
},
{
$ref: "#/parameters/select",
@@ -4788,7 +5128,7 @@ export default {
description: "OK",
schema: {
items: {
- $ref: "#/definitions/quoteOperationWorkInstruction",
+ $ref: "#/definitions/materialForm",
},
type: "array",
},
@@ -4797,12 +5137,12 @@ export default {
description: "Partial Content",
},
},
- tags: ["quoteOperationWorkInstruction"],
+ tags: ["materialForm"],
},
post: {
parameters: [
{
- $ref: "#/parameters/body.quoteOperationWorkInstruction",
+ $ref: "#/parameters/body.materialForm",
},
{
$ref: "#/parameters/select",
@@ -4816,67 +5156,33 @@ export default {
description: "Created",
},
},
- tags: ["quoteOperationWorkInstruction"],
+ tags: ["materialForm"],
},
delete: {
parameters: [
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.quoteOperationId",
- },
- {
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.content",
- },
- {
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.updatedBy",
- },
- {
- $ref: "#/parameters/preferReturn",
- },
- ],
- responses: {
- "204": {
- description: "No Content",
- },
- },
- tags: ["quoteOperationWorkInstruction"],
- },
- patch: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.quoteOperationId",
+ $ref: "#/parameters/rowFilter.materialForm.id",
},
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.content",
+ $ref: "#/parameters/rowFilter.materialForm.name",
},
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.companyId",
+ $ref: "#/parameters/rowFilter.materialForm.companyId",
},
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.createdAt",
+ $ref: "#/parameters/rowFilter.materialForm.customFields",
},
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.createdBy",
+ $ref: "#/parameters/rowFilter.materialForm.createdBy",
},
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.updatedAt",
+ $ref: "#/parameters/rowFilter.materialForm.createdAt",
},
{
- $ref: "#/parameters/rowFilter.quoteOperationWorkInstruction.updatedBy",
+ $ref: "#/parameters/rowFilter.materialForm.updatedBy",
},
{
- $ref: "#/parameters/body.quoteOperationWorkInstruction",
+ $ref: "#/parameters/rowFilter.materialForm.updatedAt",
},
{
$ref: "#/parameters/preferReturn",
@@ -4887,131 +5193,9 @@ export default {
description: "No Content",
},
},
- tags: ["quoteOperationWorkInstruction"],
+ tags: ["materialForm"],
},
- },
- "/materialForm": {
- get: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.materialForm.id",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.name",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.customFields",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.updatedBy",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.updatedAt",
- },
- {
- $ref: "#/parameters/select",
- },
- {
- $ref: "#/parameters/order",
- },
- {
- $ref: "#/parameters/range",
- },
- {
- $ref: "#/parameters/rangeUnit",
- },
- {
- $ref: "#/parameters/offset",
- },
- {
- $ref: "#/parameters/limit",
- },
- {
- $ref: "#/parameters/preferCount",
- },
- ],
- responses: {
- "200": {
- description: "OK",
- schema: {
- items: {
- $ref: "#/definitions/materialForm",
- },
- type: "array",
- },
- },
- "206": {
- description: "Partial Content",
- },
- },
- tags: ["materialForm"],
- },
- post: {
- parameters: [
- {
- $ref: "#/parameters/body.materialForm",
- },
- {
- $ref: "#/parameters/select",
- },
- {
- $ref: "#/parameters/preferPost",
- },
- ],
- responses: {
- "201": {
- description: "Created",
- },
- },
- tags: ["materialForm"],
- },
- delete: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.materialForm.id",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.name",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.customFields",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.updatedBy",
- },
- {
- $ref: "#/parameters/rowFilter.materialForm.updatedAt",
- },
- {
- $ref: "#/parameters/preferReturn",
- },
- ],
- responses: {
- "204": {
- description: "No Content",
- },
- },
- tags: ["materialForm"],
- },
- patch: {
+ patch: {
parameters: [
{
$ref: "#/parameters/rowFilter.materialForm.id",
@@ -5295,159 +5479,6 @@ export default {
tags: ["item"],
},
},
- "/methodOperationWorkInstruction": {
- get: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.methodOperationId",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.content",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.updatedBy",
- },
- {
- $ref: "#/parameters/select",
- },
- {
- $ref: "#/parameters/order",
- },
- {
- $ref: "#/parameters/range",
- },
- {
- $ref: "#/parameters/rangeUnit",
- },
- {
- $ref: "#/parameters/offset",
- },
- {
- $ref: "#/parameters/limit",
- },
- {
- $ref: "#/parameters/preferCount",
- },
- ],
- responses: {
- "200": {
- description: "OK",
- schema: {
- items: {
- $ref: "#/definitions/methodOperationWorkInstruction",
- },
- type: "array",
- },
- },
- "206": {
- description: "Partial Content",
- },
- },
- tags: ["methodOperationWorkInstruction"],
- },
- post: {
- parameters: [
- {
- $ref: "#/parameters/body.methodOperationWorkInstruction",
- },
- {
- $ref: "#/parameters/select",
- },
- {
- $ref: "#/parameters/preferPost",
- },
- ],
- responses: {
- "201": {
- description: "Created",
- },
- },
- tags: ["methodOperationWorkInstruction"],
- },
- delete: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.methodOperationId",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.content",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.updatedBy",
- },
- {
- $ref: "#/parameters/preferReturn",
- },
- ],
- responses: {
- "204": {
- description: "No Content",
- },
- },
- tags: ["methodOperationWorkInstruction"],
- },
- patch: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.methodOperationId",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.content",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.companyId",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.createdAt",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.createdBy",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.updatedAt",
- },
- {
- $ref: "#/parameters/rowFilter.methodOperationWorkInstruction.updatedBy",
- },
- {
- $ref: "#/parameters/body.methodOperationWorkInstruction",
- },
- {
- $ref: "#/parameters/preferReturn",
- },
- ],
- responses: {
- "204": {
- description: "No Content",
- },
- },
- tags: ["methodOperationWorkInstruction"],
- },
- },
"/receipt": {
get: {
parameters: [
@@ -9516,17 +9547,273 @@ export default {
tags: ["userDefaults"],
},
},
- "/purchaseOrderSuppliers": {
+ "/jobMaterial": {
get: {
parameters: [
{
- $ref: "#/parameters/rowFilter.purchaseOrderSuppliers.id",
+ $ref: "#/parameters/rowFilter.jobMaterial.id",
},
{
- $ref: "#/parameters/rowFilter.purchaseOrderSuppliers.name",
+ $ref: "#/parameters/rowFilter.jobMaterial.jobId",
},
{
- $ref: "#/parameters/rowFilter.purchaseOrderSuppliers.companyId",
+ $ref: "#/parameters/rowFilter.jobMaterial.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.itemReadableId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.itemType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.methodType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.order",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.description",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.unitOfMeasureCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.unitCost",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.jobOperationId",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/order",
+ },
+ {
+ $ref: "#/parameters/range",
+ },
+ {
+ $ref: "#/parameters/rangeUnit",
+ },
+ {
+ $ref: "#/parameters/offset",
+ },
+ {
+ $ref: "#/parameters/limit",
+ },
+ {
+ $ref: "#/parameters/preferCount",
+ },
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/jobMaterial",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ summary: "Stores information about materials used in jobs",
+ tags: ["jobMaterial"],
+ },
+ post: {
+ parameters: [
+ {
+ $ref: "#/parameters/body.jobMaterial",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/preferPost",
+ },
+ ],
+ responses: {
+ "201": {
+ description: "Created",
+ },
+ },
+ summary: "Stores information about materials used in jobs",
+ tags: ["jobMaterial"],
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.jobId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.itemReadableId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.itemType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.methodType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.order",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.description",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.unitOfMeasureCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.unitCost",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.jobOperationId",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ summary: "Stores information about materials used in jobs",
+ tags: ["jobMaterial"],
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.jobId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.itemReadableId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.itemType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.methodType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.order",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.description",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.unitOfMeasureCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.unitCost",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.jobOperationId",
+ },
+ {
+ $ref: "#/parameters/body.jobMaterial",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ summary: "Stores information about materials used in jobs",
+ tags: ["jobMaterial"],
+ },
+ },
+ "/purchaseOrderSuppliers": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.purchaseOrderSuppliers.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.purchaseOrderSuppliers.name",
+ },
+ {
+ $ref: "#/parameters/rowFilter.purchaseOrderSuppliers.companyId",
},
{
$ref: "#/parameters/select",
@@ -11193,176 +11480,518 @@ export default {
tags: ["itemUnitSalePrice"],
},
},
- "/purchaseOrderFavorite": {
+ "/job": {
get: {
parameters: [
{
- $ref: "#/parameters/rowFilter.purchaseOrderFavorite.purchaseOrderId",
- },
- {
- $ref: "#/parameters/rowFilter.purchaseOrderFavorite.userId",
- },
- {
- $ref: "#/parameters/select",
- },
- {
- $ref: "#/parameters/order",
- },
- {
- $ref: "#/parameters/range",
- },
- {
- $ref: "#/parameters/rangeUnit",
- },
- {
- $ref: "#/parameters/offset",
- },
- {
- $ref: "#/parameters/limit",
- },
- {
- $ref: "#/parameters/preferCount",
- },
- ],
- responses: {
- "200": {
- description: "OK",
- schema: {
- items: {
- $ref: "#/definitions/purchaseOrderFavorite",
- },
- type: "array",
- },
- },
- "206": {
- description: "Partial Content",
- },
- },
- tags: ["purchaseOrderFavorite"],
- },
- post: {
- parameters: [
- {
- $ref: "#/parameters/body.purchaseOrderFavorite",
+ $ref: "#/parameters/rowFilter.job.id",
},
{
- $ref: "#/parameters/select",
+ $ref: "#/parameters/rowFilter.job.jobId",
},
{
- $ref: "#/parameters/preferPost",
- },
- ],
- responses: {
- "201": {
- description: "Created",
+ $ref: "#/parameters/rowFilter.job.itemId",
},
- },
- tags: ["purchaseOrderFavorite"],
- },
- delete: {
- parameters: [
{
- $ref: "#/parameters/rowFilter.purchaseOrderFavorite.purchaseOrderId",
+ $ref: "#/parameters/rowFilter.job.unitOfMeasureCode",
},
{
- $ref: "#/parameters/rowFilter.purchaseOrderFavorite.userId",
+ $ref: "#/parameters/rowFilter.job.customerId",
},
{
- $ref: "#/parameters/preferReturn",
+ $ref: "#/parameters/rowFilter.job.locationId",
},
- ],
- responses: {
- "204": {
- description: "No Content",
- },
- },
- tags: ["purchaseOrderFavorite"],
- },
- patch: {
- parameters: [
{
- $ref: "#/parameters/rowFilter.purchaseOrderFavorite.purchaseOrderId",
+ $ref: "#/parameters/rowFilter.job.status",
},
{
- $ref: "#/parameters/rowFilter.purchaseOrderFavorite.userId",
+ $ref: "#/parameters/rowFilter.job.dueDate",
},
{
- $ref: "#/parameters/body.purchaseOrderFavorite",
+ $ref: "#/parameters/rowFilter.job.deadlineType",
},
{
- $ref: "#/parameters/preferReturn",
- },
- ],
- responses: {
- "204": {
- description: "No Content",
- },
- },
- tags: ["purchaseOrderFavorite"],
- },
- },
- "/consumables": {
- get: {
- parameters: [
- {
- $ref: "#/parameters/rowFilter.consumables.name",
+ $ref: "#/parameters/rowFilter.job.quantity",
},
{
- $ref: "#/parameters/rowFilter.consumables.description",
- },
- {
- $ref: "#/parameters/rowFilter.consumables.itemTrackingType",
+ $ref: "#/parameters/rowFilter.job.scrapQuantity",
},
{
- $ref: "#/parameters/rowFilter.consumables.unitOfMeasureCode",
+ $ref: "#/parameters/rowFilter.job.productionQuantity",
},
{
- $ref: "#/parameters/rowFilter.consumables.active",
+ $ref: "#/parameters/rowFilter.job.quantityComplete",
},
{
- $ref: "#/parameters/rowFilter.consumables.replenishmentSystem",
+ $ref: "#/parameters/rowFilter.job.quantityShipped",
},
{
- $ref: "#/parameters/rowFilter.consumables.defaultMethodType",
+ $ref: "#/parameters/rowFilter.job.quantityReceivedToInventory",
},
{
- $ref: "#/parameters/rowFilter.consumables.assignee",
+ $ref: "#/parameters/rowFilter.job.salesOrderId",
},
{
- $ref: "#/parameters/rowFilter.consumables.id",
+ $ref: "#/parameters/rowFilter.job.salesOrderLineId",
},
{
- $ref: "#/parameters/rowFilter.consumables.itemId",
+ $ref: "#/parameters/rowFilter.job.quoteId",
},
{
- $ref: "#/parameters/rowFilter.consumables.approved",
+ $ref: "#/parameters/rowFilter.job.quoteLineId",
},
{
- $ref: "#/parameters/rowFilter.consumables.approvedBy",
+ $ref: "#/parameters/rowFilter.job.modelUploadId",
},
{
- $ref: "#/parameters/rowFilter.consumables.customFields",
+ $ref: "#/parameters/rowFilter.job.notes",
},
{
- $ref: "#/parameters/rowFilter.consumables.companyId",
+ $ref: "#/parameters/rowFilter.job.assignee",
},
{
- $ref: "#/parameters/rowFilter.consumables.createdBy",
+ $ref: "#/parameters/rowFilter.job.customFields",
},
{
- $ref: "#/parameters/rowFilter.consumables.createdAt",
+ $ref: "#/parameters/rowFilter.job.companyId",
},
{
- $ref: "#/parameters/rowFilter.consumables.updatedBy",
+ $ref: "#/parameters/rowFilter.job.createdAt",
},
{
- $ref: "#/parameters/rowFilter.consumables.updatedAt",
+ $ref: "#/parameters/rowFilter.job.createdBy",
},
{
- $ref: "#/parameters/rowFilter.consumables.supplierIds",
+ $ref: "#/parameters/rowFilter.job.updatedAt",
},
{
- $ref: "#/parameters/rowFilter.consumables.unitOfMeasure",
+ $ref: "#/parameters/rowFilter.job.updatedBy",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/order",
+ },
+ {
+ $ref: "#/parameters/range",
+ },
+ {
+ $ref: "#/parameters/rangeUnit",
+ },
+ {
+ $ref: "#/parameters/offset",
+ },
+ {
+ $ref: "#/parameters/limit",
+ },
+ {
+ $ref: "#/parameters/preferCount",
+ },
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/job",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ tags: ["job"],
+ },
+ post: {
+ parameters: [
+ {
+ $ref: "#/parameters/body.job",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/preferPost",
+ },
+ ],
+ responses: {
+ "201": {
+ description: "Created",
+ },
+ },
+ tags: ["job"],
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.job.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.jobId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.unitOfMeasureCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.customerId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.locationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.status",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.dueDate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.deadlineType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.scrapQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.productionQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.quantityComplete",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.quantityShipped",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.quantityReceivedToInventory",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.salesOrderId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.salesOrderLineId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.quoteId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.quoteLineId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.modelUploadId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.notes",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.assignee",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.updatedBy",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["job"],
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.job.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.jobId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.unitOfMeasureCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.customerId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.locationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.status",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.dueDate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.deadlineType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.scrapQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.productionQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.quantityComplete",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.quantityShipped",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.quantityReceivedToInventory",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.salesOrderId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.salesOrderLineId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.quoteId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.quoteLineId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.modelUploadId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.notes",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.assignee",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.job.updatedBy",
+ },
+ {
+ $ref: "#/parameters/body.job",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["job"],
+ },
+ },
+ "/purchaseOrderFavorite": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.purchaseOrderFavorite.purchaseOrderId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.purchaseOrderFavorite.userId",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/order",
+ },
+ {
+ $ref: "#/parameters/range",
+ },
+ {
+ $ref: "#/parameters/rangeUnit",
+ },
+ {
+ $ref: "#/parameters/offset",
+ },
+ {
+ $ref: "#/parameters/limit",
+ },
+ {
+ $ref: "#/parameters/preferCount",
+ },
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/purchaseOrderFavorite",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ tags: ["purchaseOrderFavorite"],
+ },
+ post: {
+ parameters: [
+ {
+ $ref: "#/parameters/body.purchaseOrderFavorite",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/preferPost",
+ },
+ ],
+ responses: {
+ "201": {
+ description: "Created",
+ },
+ },
+ tags: ["purchaseOrderFavorite"],
+ },
+ delete: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.purchaseOrderFavorite.purchaseOrderId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.purchaseOrderFavorite.userId",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["purchaseOrderFavorite"],
+ },
+ patch: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.purchaseOrderFavorite.purchaseOrderId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.purchaseOrderFavorite.userId",
+ },
+ {
+ $ref: "#/parameters/body.purchaseOrderFavorite",
+ },
+ {
+ $ref: "#/parameters/preferReturn",
+ },
+ ],
+ responses: {
+ "204": {
+ description: "No Content",
+ },
+ },
+ tags: ["purchaseOrderFavorite"],
+ },
+ },
+ "/consumables": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.consumables.name",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.description",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.itemTrackingType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.unitOfMeasureCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.active",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.replenishmentSystem",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.defaultMethodType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.assignee",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.approved",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.approvedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.supplierIds",
+ },
+ {
+ $ref: "#/parameters/rowFilter.consumables.unitOfMeasure",
},
{
$ref: "#/parameters/select",
@@ -13950,6 +14579,9 @@ export default {
{
$ref: "#/parameters/rowFilter.methodOperation.operationSupplierProcessId",
},
+ {
+ $ref: "#/parameters/rowFilter.methodOperation.workInstruction",
+ },
{
$ref: "#/parameters/select",
},
@@ -14072,6 +14704,9 @@ export default {
{
$ref: "#/parameters/rowFilter.methodOperation.operationSupplierProcessId",
},
+ {
+ $ref: "#/parameters/rowFilter.methodOperation.workInstruction",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -14148,6 +14783,9 @@ export default {
{
$ref: "#/parameters/rowFilter.methodOperation.operationSupplierProcessId",
},
+ {
+ $ref: "#/parameters/rowFilter.methodOperation.workInstruction",
+ },
{
$ref: "#/parameters/body.methodOperation",
},
@@ -15993,6 +16631,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteOperationsWithMakeMethods.operationSupplierProcessId",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteOperationsWithMakeMethods.workInstruction",
+ },
{
$ref: "#/parameters/select",
},
@@ -17790,6 +18431,177 @@ export default {
tags: ["salesOrderStatusHistory"],
},
},
+ "/jobs": {
+ get: {
+ parameters: [
+ {
+ $ref: "#/parameters/rowFilter.jobs.id",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.jobId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.itemId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.unitOfMeasureCode",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.customerId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.locationId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.status",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.dueDate",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.deadlineType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.quantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.scrapQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.productionQuantity",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.quantityComplete",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.quantityShipped",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.quantityReceivedToInventory",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.salesOrderId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.salesOrderLineId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.quoteId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.quoteLineId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.modelUploadId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.notes",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.assignee",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.customFields",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.companyId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.createdAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.createdBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.updatedAt",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.updatedBy",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.name",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.itemReadableId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.itemType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.description",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.itemTrackingType",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.active",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.replenishmentSystem",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.modelId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.autodeskUrn",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.modelPath",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.thumbnailPath",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.modelName",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.modelSize",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.salesOrderReadableId",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobs.quoteReadableId",
+ },
+ {
+ $ref: "#/parameters/select",
+ },
+ {
+ $ref: "#/parameters/order",
+ },
+ {
+ $ref: "#/parameters/range",
+ },
+ {
+ $ref: "#/parameters/rangeUnit",
+ },
+ {
+ $ref: "#/parameters/offset",
+ },
+ {
+ $ref: "#/parameters/limit",
+ },
+ {
+ $ref: "#/parameters/preferCount",
+ },
+ ],
+ responses: {
+ "200": {
+ description: "OK",
+ schema: {
+ items: {
+ $ref: "#/definitions/jobs",
+ },
+ type: "array",
+ },
+ },
+ "206": {
+ description: "Partial Content",
+ },
+ },
+ tags: ["jobs"],
+ },
+ },
"/customField": {
get: {
parameters: [
@@ -23196,6 +24008,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteOperation.operationSupplierProcessId",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteOperation.workInstruction",
+ },
{
$ref: "#/parameters/select",
},
@@ -23345,6 +24160,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteOperation.operationSupplierProcessId",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteOperation.workInstruction",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -23448,6 +24266,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteOperation.operationSupplierProcessId",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteOperation.workInstruction",
+ },
{
$ref: "#/parameters/body.quoteOperation",
},
@@ -26208,6 +27029,9 @@ export default {
{
$ref: "#/parameters/rowFilter.itemReplenishment.customFields",
},
+ {
+ $ref: "#/parameters/rowFilter.itemReplenishment.scrapPercentage",
+ },
{
$ref: "#/parameters/select",
},
@@ -26312,6 +27136,9 @@ export default {
{
$ref: "#/parameters/rowFilter.itemReplenishment.customFields",
},
+ {
+ $ref: "#/parameters/rowFilter.itemReplenishment.scrapPercentage",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -26370,6 +27197,9 @@ export default {
{
$ref: "#/parameters/rowFilter.itemReplenishment.customFields",
},
+ {
+ $ref: "#/parameters/rowFilter.itemReplenishment.scrapPercentage",
+ },
{
$ref: "#/parameters/body.itemReplenishment",
},
@@ -33863,18 +34693,16 @@ export default {
"Documents",
"Invoicing",
"Inventory",
- "Jobs",
+ "Items",
"Messaging",
"Parts",
+ "People",
+ "Production",
"Purchasing",
"Resources",
- "People",
"Sales",
"Settings",
- "Scheduling",
- "Timecards",
"Users",
- "Items",
],
format: "public.module",
type: "string",
@@ -34534,6 +35362,7 @@ export default {
"createdBy",
"itemReadableId",
"order",
+ "scrapQuantity",
],
properties: {
id: {
@@ -34624,6 +35453,15 @@ export default {
format: "text",
type: "string",
},
+ scrapQuantity: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ productionQuantity: {
+ format: "numeric",
+ type: "number",
+ },
},
type: "object",
},
@@ -34792,6 +35630,7 @@ export default {
"createdAt",
"createdBy",
"quoteMakeMethodId",
+ "scrapQuantity",
],
properties: {
id: {
@@ -34898,6 +35737,15 @@ export default {
format: "text",
type: "string",
},
+ scrapQuantity: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ productionQuantity: {
+ format: "numeric",
+ type: "number",
+ },
},
type: "object",
},
@@ -35119,6 +35967,188 @@ export default {
},
type: "object",
},
+ jobOperation: {
+ description: "Stores information about operations performed in jobs",
+ required: [
+ "id",
+ "jobId",
+ "order",
+ "processId",
+ "setupTime",
+ "setupUnit",
+ "laborTime",
+ "laborUnit",
+ "machineTime",
+ "machineUnit",
+ "operationOrder",
+ "quotingRate",
+ "laborRate",
+ "overheadRate",
+ "companyId",
+ "createdAt",
+ "createdBy",
+ "workInstruction",
+ ],
+ properties: {
+ id: {
+ default: "public.xid()",
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string",
+ },
+ jobId: {
+ description:
+ "Note:\nThis is a Foreign Key to `job.id`.<fk table='job' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ order: {
+ default: 1,
+ format: "double precision",
+ type: "number",
+ },
+ processId: {
+ description:
+ "Note:\nThis is a Foreign Key to `process.id`.<fk table='process' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ workCenterId: {
+ description:
+ "Note:\nThis is a Foreign Key to `workCenter.id`.<fk table='workCenter' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ description: {
+ format: "text",
+ type: "string",
+ },
+ setupTime: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ setupUnit: {
+ default: "Total Hours",
+ enum: [
+ "Hours/Piece",
+ "Hours/100 Pieces",
+ "Hours/1000 Pieces",
+ "Minutes/Piece",
+ "Minutes/100 Pieces",
+ "Minutes/1000 Pieces",
+ "Pieces/Hour",
+ "Pieces/Minute",
+ "Seconds/Piece",
+ "Total Hours",
+ "Total Minutes",
+ ],
+ format: "public.factor",
+ type: "string",
+ },
+ laborTime: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ laborUnit: {
+ default: "Hours/Piece",
+ enum: [
+ "Hours/Piece",
+ "Hours/100 Pieces",
+ "Hours/1000 Pieces",
+ "Minutes/Piece",
+ "Minutes/100 Pieces",
+ "Minutes/1000 Pieces",
+ "Pieces/Hour",
+ "Pieces/Minute",
+ "Seconds/Piece",
+ "Total Hours",
+ "Total Minutes",
+ ],
+ format: "public.factor",
+ type: "string",
+ },
+ machineTime: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ machineUnit: {
+ default: "Hours/Piece",
+ enum: [
+ "Hours/Piece",
+ "Hours/100 Pieces",
+ "Hours/1000 Pieces",
+ "Minutes/Piece",
+ "Minutes/100 Pieces",
+ "Minutes/1000 Pieces",
+ "Pieces/Hour",
+ "Pieces/Minute",
+ "Seconds/Piece",
+ "Total Hours",
+ "Total Minutes",
+ ],
+ format: "public.factor",
+ type: "string",
+ },
+ operationOrder: {
+ default: "After Previous",
+ enum: ["After Previous", "With Previous"],
+ format: 'public."methodOperationOrder"',
+ type: "string",
+ },
+ quotingRate: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ laborRate: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ overheadRate: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ companyId: {
+ description:
+ "Note:\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ createdAt: {
+ default: "now()",
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ createdBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ updatedAt: {
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ updatedBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ customFields: {
+ format: "jsonb",
+ },
+ workInstruction: {
+ format: "json",
+ },
+ },
+ type: "object",
+ },
journalLine: {
required: [
"id",
@@ -35366,45 +36396,6 @@ export default {
},
type: "object",
},
- quoteOperationWorkInstruction: {
- required: ["quoteOperationId", "companyId", "createdAt", "createdBy"],
- properties: {
- quoteOperationId: {
- description: "Note:\nThis is a Primary Key.<pk/>",
- format: "text",
- type: "string",
- },
- content: {
- format: "json",
- },
- companyId: {
- format: "text",
- type: "string",
- },
- createdAt: {
- default: "now()",
- format: "timestamp with time zone",
- type: "string",
- },
- createdBy: {
- description:
- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
- format: "text",
- type: "string",
- },
- updatedAt: {
- format: "timestamp with time zone",
- type: "string",
- },
- updatedBy: {
- description:
- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
- format: "text",
- type: "string",
- },
- },
- type: "object",
- },
materialForm: {
required: ["id", "name", "createdBy", "createdAt"],
properties: {
@@ -35560,45 +36551,6 @@ export default {
},
type: "object",
},
- methodOperationWorkInstruction: {
- required: ["methodOperationId", "companyId", "createdAt", "createdBy"],
- properties: {
- methodOperationId: {
- description: "Note:\nThis is a Primary Key.<pk/>",
- format: "text",
- type: "string",
- },
- content: {
- format: "json",
- },
- companyId: {
- format: "text",
- type: "string",
- },
- createdAt: {
- default: "now()",
- format: "timestamp with time zone",
- type: "string",
- },
- createdBy: {
- description:
- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
- format: "text",
- type: "string",
- },
- updatedAt: {
- format: "timestamp with time zone",
- type: "string",
- },
- updatedBy: {
- description:
- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
- format: "text",
- type: "string",
- },
- },
- type: "object",
- },
receipt: {
required: [
"id",
@@ -36080,18 +37032,16 @@ export default {
"Documents",
"Invoicing",
"Inventory",
- "Jobs",
+ "Items",
"Messaging",
"Parts",
+ "People",
+ "Production",
"Purchasing",
"Resources",
- "People",
"Sales",
"Settings",
- "Scheduling",
- "Timecards",
"Users",
- "Items",
],
format: "public.module",
type: "string",
@@ -36360,18 +37310,16 @@ export default {
"Documents",
"Invoicing",
"Inventory",
- "Jobs",
+ "Items",
"Messaging",
"Parts",
+ "People",
+ "Production",
"Purchasing",
"Resources",
- "People",
"Sales",
"Settings",
- "Scheduling",
- "Timecards",
"Users",
- "Items",
],
format: "public.module",
type: "string",
@@ -37315,6 +38263,119 @@ export default {
},
type: "object",
},
+ jobMaterial: {
+ description: "Stores information about materials used in jobs",
+ required: [
+ "id",
+ "jobId",
+ "itemId",
+ "itemReadableId",
+ "itemType",
+ "methodType",
+ "order",
+ "description",
+ "quantity",
+ "unitCost",
+ "companyId",
+ "createdAt",
+ "createdBy",
+ ],
+ properties: {
+ id: {
+ default: "public.xid()",
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string",
+ },
+ jobId: {
+ description:
+ "Note:\nThis is a Foreign Key to `job.id`.<fk table='job' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ itemId: {
+ description:
+ "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ itemReadableId: {
+ format: "text",
+ type: "string",
+ },
+ itemType: {
+ default: "Part",
+ format: "text",
+ type: "string",
+ },
+ methodType: {
+ default: "Make",
+ enum: ["Buy", "Make", "Pick"],
+ format: 'public."methodType"',
+ type: "string",
+ },
+ order: {
+ default: 1,
+ format: "double precision",
+ type: "number",
+ },
+ description: {
+ format: "text",
+ type: "string",
+ },
+ quantity: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ unitOfMeasureCode: {
+ format: "text",
+ type: "string",
+ },
+ unitCost: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ companyId: {
+ description:
+ "Note:\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ createdAt: {
+ default: "now()",
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ createdBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ updatedAt: {
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ updatedBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ customFields: {
+ format: "jsonb",
+ },
+ jobOperationId: {
+ description:
+ "Note:\nThis is a Foreign Key to `jobOperation.id`.<fk table='jobOperation' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ },
+ type: "object",
+ },
purchaseOrderSuppliers: {
properties: {
id: {
@@ -38097,6 +39158,179 @@ export default {
},
type: "object",
},
+ job: {
+ required: [
+ "id",
+ "jobId",
+ "itemId",
+ "unitOfMeasureCode",
+ "locationId",
+ "status",
+ "deadlineType",
+ "quantity",
+ "scrapQuantity",
+ "quantityComplete",
+ "quantityShipped",
+ "quantityReceivedToInventory",
+ "companyId",
+ "createdAt",
+ "createdBy",
+ ],
+ properties: {
+ id: {
+ default: "public.xid()",
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string",
+ },
+ jobId: {
+ format: "text",
+ type: "string",
+ },
+ itemId: {
+ description:
+ "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ unitOfMeasureCode: {
+ format: "text",
+ type: "string",
+ },
+ customerId: {
+ description:
+ "Note:\nThis is a Foreign Key to `customer.id`.<fk table='customer' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ locationId: {
+ description:
+ "Note:\nThis is a Foreign Key to `location.id`.<fk table='location' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ status: {
+ default: "Draft",
+ enum: [
+ "Draft",
+ "Ready",
+ "In Progress",
+ "Paused",
+ "Completed",
+ "Cancelled",
+ ],
+ format: 'public."jobStatus"',
+ type: "string",
+ },
+ dueDate: {
+ format: "date",
+ type: "string",
+ },
+ deadlineType: {
+ default: "No Deadline",
+ enum: ["No Deadline", "ASAP", "Soft Deadline", "Hard Deadline"],
+ format: 'public."deadlineType"',
+ type: "string",
+ },
+ quantity: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ scrapQuantity: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ productionQuantity: {
+ format: "numeric",
+ type: "number",
+ },
+ quantityComplete: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ quantityShipped: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ quantityReceivedToInventory: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
+ salesOrderId: {
+ description:
+ "Note:\nThis is a Foreign Key to `salesOrder.id`.<fk table='salesOrder' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ salesOrderLineId: {
+ description:
+ "Note:\nThis is a Foreign Key to `salesOrderLine.id`.<fk table='salesOrderLine' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ quoteId: {
+ description:
+ "Note:\nThis is a Foreign Key to `quote.id`.<fk table='quote' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ quoteLineId: {
+ description:
+ "Note:\nThis is a Foreign Key to `quoteLine.id`.<fk table='quoteLine' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ modelUploadId: {
+ format: "text",
+ type: "string",
+ },
+ notes: {
+ format: "jsonb",
+ },
+ assignee: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ customFields: {
+ format: "jsonb",
+ },
+ companyId: {
+ description:
+ "Note:\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ createdAt: {
+ default: "now()",
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ createdBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ updatedAt: {
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ updatedBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ },
+ type: "object",
+ },
purchaseOrderFavorite: {
required: ["purchaseOrderId", "userId"],
properties: {
@@ -39317,18 +40551,16 @@ export default {
"Documents",
"Invoicing",
"Inventory",
- "Jobs",
+ "Items",
"Messaging",
"Parts",
+ "People",
+ "Production",
"Purchasing",
"Resources",
- "People",
"Sales",
"Settings",
- "Scheduling",
- "Timecards",
"Users",
- "Items",
],
format: "public.module",
type: "string",
@@ -39431,6 +40663,7 @@ export default {
"machineTime",
"machineUnit",
"operationType",
+ "workInstruction",
],
properties: {
id: {
@@ -39583,6 +40816,9 @@ export default {
format: "text",
type: "string",
},
+ workInstruction: {
+ format: "json",
+ },
},
type: "object",
},
@@ -40447,6 +41683,9 @@ export default {
format: "text",
type: "string",
},
+ workInstruction: {
+ format: "json",
+ },
},
type: "object",
},
@@ -41046,6 +42285,224 @@ export default {
},
type: "object",
},
+ jobs: {
+ properties: {
+ id: {
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string",
+ },
+ jobId: {
+ format: "text",
+ type: "string",
+ },
+ itemId: {
+ description:
+ "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ unitOfMeasureCode: {
+ format: "text",
+ type: "string",
+ },
+ customerId: {
+ description:
+ "Note:\nThis is a Foreign Key to `customer.id`.<fk table='customer' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ locationId: {
+ description:
+ "Note:\nThis is a Foreign Key to `location.id`.<fk table='location' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ status: {
+ enum: [
+ "Draft",
+ "Ready",
+ "In Progress",
+ "Paused",
+ "Completed",
+ "Cancelled",
+ ],
+ format: 'public."jobStatus"',
+ type: "string",
+ },
+ dueDate: {
+ format: "date",
+ type: "string",
+ },
+ deadlineType: {
+ enum: ["No Deadline", "ASAP", "Soft Deadline", "Hard Deadline"],
+ format: 'public."deadlineType"',
+ type: "string",
+ },
+ quantity: {
+ format: "numeric",
+ type: "number",
+ },
+ scrapQuantity: {
+ format: "numeric",
+ type: "number",
+ },
+ productionQuantity: {
+ format: "numeric",
+ type: "number",
+ },
+ quantityComplete: {
+ format: "numeric",
+ type: "number",
+ },
+ quantityShipped: {
+ format: "numeric",
+ type: "number",
+ },
+ quantityReceivedToInventory: {
+ format: "numeric",
+ type: "number",
+ },
+ salesOrderId: {
+ description:
+ "Note:\nThis is a Foreign Key to `salesOrder.id`.<fk table='salesOrder' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ salesOrderLineId: {
+ description:
+ "Note:\nThis is a Foreign Key to `salesOrderLine.id`.<fk table='salesOrderLine' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ quoteId: {
+ description:
+ "Note:\nThis is a Foreign Key to `quote.id`.<fk table='quote' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ quoteLineId: {
+ description:
+ "Note:\nThis is a Foreign Key to `quoteLine.id`.<fk table='quoteLine' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ modelUploadId: {
+ format: "text",
+ type: "string",
+ },
+ notes: {
+ format: "jsonb",
+ },
+ assignee: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ customFields: {
+ format: "jsonb",
+ },
+ companyId: {
+ description:
+ "Note:\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ createdAt: {
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ createdBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ updatedAt: {
+ format: "timestamp with time zone",
+ type: "string",
+ },
+ updatedBy: {
+ description:
+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",
+ format: "text",
+ type: "string",
+ },
+ name: {
+ format: "text",
+ type: "string",
+ },
+ itemReadableId: {
+ format: "text",
+ type: "string",
+ },
+ itemType: {
+ enum: [
+ "Part",
+ "Material",
+ "Tool",
+ "Service",
+ "Consumable",
+ "Fixture",
+ ],
+ format: 'public."itemType"',
+ type: "string",
+ },
+ description: {
+ format: "text",
+ type: "string",
+ },
+ itemTrackingType: {
+ enum: ["Inventory", "Non-Inventory"],
+ format: 'public."itemTrackingType"',
+ type: "string",
+ },
+ active: {
+ format: "boolean",
+ type: "boolean",
+ },
+ replenishmentSystem: {
+ enum: ["Buy", "Make", "Buy and Make"],
+ format: 'public."itemReplenishmentSystem"',
+ type: "string",
+ },
+ modelId: {
+ description: "Note:\nThis is a Primary Key.<pk/>",
+ format: "text",
+ type: "string",
+ },
+ autodeskUrn: {
+ format: "text",
+ type: "string",
+ },
+ modelPath: {
+ format: "text",
+ type: "string",
+ },
+ thumbnailPath: {
+ format: "text",
+ type: "string",
+ },
+ modelName: {
+ format: "text",
+ type: "string",
+ },
+ modelSize: {
+ format: "bigint",
+ type: "integer",
+ },
+ salesOrderReadableId: {
+ format: "text",
+ type: "string",
+ },
+ quoteReadableId: {
+ format: "text",
+ type: "string",
+ },
+ },
+ type: "object",
+ },
customField: {
required: [
"id",
@@ -43443,6 +44900,7 @@ export default {
"operationMinimumCost",
"operationLeadTime",
"operationUnitCost",
+ "workInstruction",
],
properties: {
id: {
@@ -43641,6 +45099,9 @@ export default {
format: "text",
type: "string",
},
+ workInstruction: {
+ format: "json",
+ },
},
type: "object",
},
@@ -44721,6 +46182,7 @@ export default {
"companyId",
"createdBy",
"createdAt",
+ "scrapPercentage",
],
properties: {
itemId: {
@@ -44798,6 +46260,11 @@ export default {
customFields: {
format: "jsonb",
},
+ scrapPercentage: {
+ default: 0,
+ format: "numeric",
+ type: "number",
+ },
},
type: "object",
},
@@ -49161,6 +50628,20 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.methodMaterial.scrapQuantity": {
+ name: "scrapQuantity",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.methodMaterial.productionQuantity": {
+ name: "productionQuantity",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
"body.processes": {
name: "processes",
description: "processes",
@@ -49482,6 +50963,20 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.quoteMaterial.scrapQuantity": {
+ name: "scrapQuantity",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.quoteMaterial.productionQuantity": {
+ name: "productionQuantity",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
"body.contractorAbility": {
name: "contractorAbility",
description: "contractorAbility",
@@ -49815,6 +51310,176 @@ export default {
in: "query",
type: "string",
},
+ "body.jobOperation": {
+ name: "jobOperation",
+ description: "jobOperation",
+ required: false,
+ in: "body",
+ schema: {
+ $ref: "#/definitions/jobOperation",
+ },
+ },
+ "rowFilter.jobOperation.id": {
+ name: "id",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.jobId": {
+ name: "jobId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.order": {
+ name: "order",
+ required: false,
+ format: "double precision",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.processId": {
+ name: "processId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.workCenterId": {
+ name: "workCenterId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.description": {
+ name: "description",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.setupTime": {
+ name: "setupTime",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.setupUnit": {
+ name: "setupUnit",
+ required: false,
+ format: "public.factor",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.laborTime": {
+ name: "laborTime",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.laborUnit": {
+ name: "laborUnit",
+ required: false,
+ format: "public.factor",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.machineTime": {
+ name: "machineTime",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.machineUnit": {
+ name: "machineUnit",
+ required: false,
+ format: "public.factor",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.operationOrder": {
+ name: "operationOrder",
+ required: false,
+ format: 'public."methodOperationOrder"',
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.quotingRate": {
+ name: "quotingRate",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.laborRate": {
+ name: "laborRate",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.overheadRate": {
+ name: "overheadRate",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.companyId": {
+ name: "companyId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.createdAt": {
+ name: "createdAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.createdBy": {
+ name: "createdBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.updatedAt": {
+ name: "updatedAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.updatedBy": {
+ name: "updatedBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.customFields": {
+ name: "customFields",
+ required: false,
+ format: "jsonb",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobOperation.workInstruction": {
+ name: "workInstruction",
+ required: false,
+ format: "json",
+ in: "query",
+ type: "string",
+ },
"body.journalLine": {
name: "journalLine",
description: "journalLine",
@@ -50169,64 +51834,6 @@ export default {
in: "query",
type: "string",
},
- "body.quoteOperationWorkInstruction": {
- name: "quoteOperationWorkInstruction",
- description: "quoteOperationWorkInstruction",
- required: false,
- in: "body",
- schema: {
- $ref: "#/definitions/quoteOperationWorkInstruction",
- },
- },
- "rowFilter.quoteOperationWorkInstruction.quoteOperationId": {
- name: "quoteOperationId",
- required: false,
- format: "text",
- in: "query",
- type: "string",
- },
- "rowFilter.quoteOperationWorkInstruction.content": {
- name: "content",
- required: false,
- format: "json",
- in: "query",
- type: "string",
- },
- "rowFilter.quoteOperationWorkInstruction.companyId": {
- name: "companyId",
- required: false,
- format: "text",
- in: "query",
- type: "string",
- },
- "rowFilter.quoteOperationWorkInstruction.createdAt": {
- name: "createdAt",
- required: false,
- format: "timestamp with time zone",
- in: "query",
- type: "string",
- },
- "rowFilter.quoteOperationWorkInstruction.createdBy": {
- name: "createdBy",
- required: false,
- format: "text",
- in: "query",
- type: "string",
- },
- "rowFilter.quoteOperationWorkInstruction.updatedAt": {
- name: "updatedAt",
- required: false,
- format: "timestamp with time zone",
- in: "query",
- type: "string",
- },
- "rowFilter.quoteOperationWorkInstruction.updatedBy": {
- name: "updatedBy",
- required: false,
- format: "text",
- in: "query",
- type: "string",
- },
"body.materialForm": {
name: "materialForm",
description: "materialForm",
@@ -50420,64 +52027,6 @@ export default {
in: "query",
type: "string",
},
- "body.methodOperationWorkInstruction": {
- name: "methodOperationWorkInstruction",
- description: "methodOperationWorkInstruction",
- required: false,
- in: "body",
- schema: {
- $ref: "#/definitions/methodOperationWorkInstruction",
- },
- },
- "rowFilter.methodOperationWorkInstruction.methodOperationId": {
- name: "methodOperationId",
- required: false,
- format: "text",
- in: "query",
- type: "string",
- },
- "rowFilter.methodOperationWorkInstruction.content": {
- name: "content",
- required: false,
- format: "json",
- in: "query",
- type: "string",
- },
- "rowFilter.methodOperationWorkInstruction.companyId": {
- name: "companyId",
- required: false,
- format: "text",
- in: "query",
- type: "string",
- },
- "rowFilter.methodOperationWorkInstruction.createdAt": {
- name: "createdAt",
- required: false,
- format: "timestamp with time zone",
- in: "query",
- type: "string",
- },
- "rowFilter.methodOperationWorkInstruction.createdBy": {
- name: "createdBy",
- required: false,
- format: "text",
- in: "query",
- type: "string",
- },
- "rowFilter.methodOperationWorkInstruction.updatedAt": {
- name: "updatedAt",
- required: false,
- format: "timestamp with time zone",
- in: "query",
- type: "string",
- },
- "rowFilter.methodOperationWorkInstruction.updatedBy": {
- name: "updatedBy",
- required: false,
- format: "text",
- in: "query",
- type: "string",
- },
"body.receipt": {
name: "receipt",
description: "receipt",
@@ -52700,6 +54249,141 @@ export default {
in: "query",
type: "string",
},
+ "body.jobMaterial": {
+ name: "jobMaterial",
+ description: "jobMaterial",
+ required: false,
+ in: "body",
+ schema: {
+ $ref: "#/definitions/jobMaterial",
+ },
+ },
+ "rowFilter.jobMaterial.id": {
+ name: "id",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.jobId": {
+ name: "jobId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.itemId": {
+ name: "itemId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.itemReadableId": {
+ name: "itemReadableId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.itemType": {
+ name: "itemType",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.methodType": {
+ name: "methodType",
+ required: false,
+ format: 'public."methodType"',
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.order": {
+ name: "order",
+ required: false,
+ format: "double precision",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.description": {
+ name: "description",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.quantity": {
+ name: "quantity",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.unitOfMeasureCode": {
+ name: "unitOfMeasureCode",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.unitCost": {
+ name: "unitCost",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.companyId": {
+ name: "companyId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.createdAt": {
+ name: "createdAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.createdBy": {
+ name: "createdBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.updatedAt": {
+ name: "updatedAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.updatedBy": {
+ name: "updatedBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.customFields": {
+ name: "customFields",
+ required: false,
+ format: "jsonb",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterial.jobOperationId": {
+ name: "jobOperationId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
"body.purchaseOrderSuppliers": {
name: "purchaseOrderSuppliers",
description: "purchaseOrderSuppliers",
@@ -53693,6 +55377,211 @@ export default {
in: "query",
type: "string",
},
+ "body.job": {
+ name: "job",
+ description: "job",
+ required: false,
+ in: "body",
+ schema: {
+ $ref: "#/definitions/job",
+ },
+ },
+ "rowFilter.job.id": {
+ name: "id",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.jobId": {
+ name: "jobId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.itemId": {
+ name: "itemId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.unitOfMeasureCode": {
+ name: "unitOfMeasureCode",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.customerId": {
+ name: "customerId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.locationId": {
+ name: "locationId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.status": {
+ name: "status",
+ required: false,
+ format: 'public."jobStatus"',
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.dueDate": {
+ name: "dueDate",
+ required: false,
+ format: "date",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.deadlineType": {
+ name: "deadlineType",
+ required: false,
+ format: 'public."deadlineType"',
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.quantity": {
+ name: "quantity",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.scrapQuantity": {
+ name: "scrapQuantity",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.productionQuantity": {
+ name: "productionQuantity",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.quantityComplete": {
+ name: "quantityComplete",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.quantityShipped": {
+ name: "quantityShipped",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.quantityReceivedToInventory": {
+ name: "quantityReceivedToInventory",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.salesOrderId": {
+ name: "salesOrderId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.salesOrderLineId": {
+ name: "salesOrderLineId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.quoteId": {
+ name: "quoteId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.quoteLineId": {
+ name: "quoteLineId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.modelUploadId": {
+ name: "modelUploadId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.notes": {
+ name: "notes",
+ required: false,
+ format: "jsonb",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.assignee": {
+ name: "assignee",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.customFields": {
+ name: "customFields",
+ required: false,
+ format: "jsonb",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.companyId": {
+ name: "companyId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.createdAt": {
+ name: "createdAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.createdBy": {
+ name: "createdBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.updatedAt": {
+ name: "updatedAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.job.updatedBy": {
+ name: "updatedBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
"body.purchaseOrderFavorite": {
name: "purchaseOrderFavorite",
description: "purchaseOrderFavorite",
@@ -55689,6 +57578,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.methodOperation.workInstruction": {
+ name: "workInstruction",
+ required: false,
+ format: "json",
+ in: "query",
+ type: "string",
+ },
"body.salesOrderPayment": {
name: "salesOrderPayment",
description: "salesOrderPayment",
@@ -56794,6 +58690,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.quoteOperationsWithMakeMethods.workInstruction": {
+ name: "workInstruction",
+ required: false,
+ format: "json",
+ in: "query",
+ type: "string",
+ },
"body.oauthToken": {
name: "oauthToken",
description: "oauthToken",
@@ -57579,6 +59482,316 @@ export default {
in: "query",
type: "string",
},
+ "body.jobs": {
+ name: "jobs",
+ description: "jobs",
+ required: false,
+ in: "body",
+ schema: {
+ $ref: "#/definitions/jobs",
+ },
+ },
+ "rowFilter.jobs.id": {
+ name: "id",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.jobId": {
+ name: "jobId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.itemId": {
+ name: "itemId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.unitOfMeasureCode": {
+ name: "unitOfMeasureCode",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.customerId": {
+ name: "customerId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.locationId": {
+ name: "locationId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.status": {
+ name: "status",
+ required: false,
+ format: 'public."jobStatus"',
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.dueDate": {
+ name: "dueDate",
+ required: false,
+ format: "date",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.deadlineType": {
+ name: "deadlineType",
+ required: false,
+ format: 'public."deadlineType"',
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.quantity": {
+ name: "quantity",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.scrapQuantity": {
+ name: "scrapQuantity",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.productionQuantity": {
+ name: "productionQuantity",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.quantityComplete": {
+ name: "quantityComplete",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.quantityShipped": {
+ name: "quantityShipped",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.quantityReceivedToInventory": {
+ name: "quantityReceivedToInventory",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.salesOrderId": {
+ name: "salesOrderId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.salesOrderLineId": {
+ name: "salesOrderLineId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.quoteId": {
+ name: "quoteId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.quoteLineId": {
+ name: "quoteLineId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.modelUploadId": {
+ name: "modelUploadId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.notes": {
+ name: "notes",
+ required: false,
+ format: "jsonb",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.assignee": {
+ name: "assignee",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.customFields": {
+ name: "customFields",
+ required: false,
+ format: "jsonb",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.companyId": {
+ name: "companyId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.createdAt": {
+ name: "createdAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.createdBy": {
+ name: "createdBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.updatedAt": {
+ name: "updatedAt",
+ required: false,
+ format: "timestamp with time zone",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.updatedBy": {
+ name: "updatedBy",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.name": {
+ name: "name",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.itemReadableId": {
+ name: "itemReadableId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.itemType": {
+ name: "itemType",
+ required: false,
+ format: 'public."itemType"',
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.description": {
+ name: "description",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.itemTrackingType": {
+ name: "itemTrackingType",
+ required: false,
+ format: 'public."itemTrackingType"',
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.active": {
+ name: "active",
+ required: false,
+ format: "boolean",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.replenishmentSystem": {
+ name: "replenishmentSystem",
+ required: false,
+ format: 'public."itemReplenishmentSystem"',
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.modelId": {
+ name: "modelId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.autodeskUrn": {
+ name: "autodeskUrn",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.modelPath": {
+ name: "modelPath",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.thumbnailPath": {
+ name: "thumbnailPath",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.modelName": {
+ name: "modelName",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.modelSize": {
+ name: "modelSize",
+ required: false,
+ format: "bigint",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.salesOrderReadableId": {
+ name: "salesOrderReadableId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobs.quoteReadableId": {
+ name: "quoteReadableId",
+ required: false,
+ format: "text",
+ in: "query",
+ type: "string",
+ },
"body.customField": {
name: "customField",
description: "customField",
@@ -60995,6 +63208,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.quoteOperation.workInstruction": {
+ name: "workInstruction",
+ required: false,
+ format: "json",
+ in: "query",
+ type: "string",
+ },
"body.salesRfq": {
name: "salesRfq",
description: "salesRfq",
@@ -62529,6 +64749,13 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.itemReplenishment.scrapPercentage": {
+ name: "scrapPercentage",
+ required: false,
+ format: "numeric",
+ in: "query",
+ type: "string",
+ },
"body.documentLabel": {
name: "documentLabel",
description: "documentLabel",
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index 3fc96f4992..b5e9ac6807 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -5075,7 +5075,7 @@ export type Database = {
}
Relationships: [
{
- foreignKeyName: "employeeTypePermission_employeeTypeId_fkey"
+ foreignKeyName: "employeeTypePermission_new_employeeTypeId_fkey"
columns: ["employeeTypeId"]
isOneToOne: false
referencedRelation: "employeeType"
@@ -6482,6 +6482,7 @@ export type Database = {
purchasingLeadTime: number
purchasingUnitOfMeasureCode: string | null
requiresConfiguration: boolean
+ scrapPercentage: number
updatedAt: string | null
updatedBy: string | null
}
@@ -6499,6 +6500,7 @@ export type Database = {
purchasingLeadTime?: number
purchasingUnitOfMeasureCode?: string | null
requiresConfiguration?: boolean
+ scrapPercentage?: number
updatedAt?: string | null
updatedBy?: string | null
}
@@ -6516,6 +6518,7 @@ export type Database = {
purchasingLeadTime?: number
purchasingUnitOfMeasureCode?: string | null
requiresConfiguration?: boolean
+ scrapPercentage?: number
updatedAt?: string | null
updatedBy?: string | null
}
@@ -6851,584 +6854,366 @@ export type Database = {
},
]
}
- journal: {
+ job: {
Row: {
- accountingPeriodId: string | null
+ assignee: string | null
companyId: string
createdAt: string
+ createdBy: string
+ customerId: string | null
customFields: Json | null
- description: string | null
- id: number
- postingDate: string
+ deadlineType: Database["public"]["Enums"]["deadlineType"]
+ dueDate: string | null
+ id: string
+ itemId: string
+ jobId: string
+ locationId: string
+ modelUploadId: string | null
+ notes: Json | null
+ productionQuantity: number | null
+ quantity: number
+ quantityComplete: number
+ quantityReceivedToInventory: number
+ quantityShipped: number
+ quoteId: string | null
+ quoteLineId: string | null
+ salesOrderId: string | null
+ salesOrderLineId: string | null
+ scrapQuantity: number
+ status: Database["public"]["Enums"]["jobStatus"]
+ unitOfMeasureCode: string
+ updatedAt: string | null
+ updatedBy: string | null
}
Insert: {
- accountingPeriodId?: string | null
+ assignee?: string | null
companyId: string
createdAt?: string
+ createdBy: string
+ customerId?: string | null
customFields?: Json | null
- description?: string | null
- id?: number
- postingDate?: string
+ deadlineType?: Database["public"]["Enums"]["deadlineType"]
+ dueDate?: string | null
+ id?: string
+ itemId: string
+ jobId: string
+ locationId: string
+ modelUploadId?: string | null
+ notes?: Json | null
+ productionQuantity?: number | null
+ quantity?: number
+ quantityComplete?: number
+ quantityReceivedToInventory?: number
+ quantityShipped?: number
+ quoteId?: string | null
+ quoteLineId?: string | null
+ salesOrderId?: string | null
+ salesOrderLineId?: string | null
+ scrapQuantity?: number
+ status?: Database["public"]["Enums"]["jobStatus"]
+ unitOfMeasureCode: string
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Update: {
- accountingPeriodId?: string | null
+ assignee?: string | null
companyId?: string
createdAt?: string
+ createdBy?: string
+ customerId?: string | null
customFields?: Json | null
- description?: string | null
- id?: number
- postingDate?: string
+ deadlineType?: Database["public"]["Enums"]["deadlineType"]
+ dueDate?: string | null
+ id?: string
+ itemId?: string
+ jobId?: string
+ locationId?: string
+ modelUploadId?: string | null
+ notes?: Json | null
+ productionQuantity?: number | null
+ quantity?: number
+ quantityComplete?: number
+ quantityReceivedToInventory?: number
+ quantityShipped?: number
+ quoteId?: string | null
+ quoteLineId?: string | null
+ salesOrderId?: string | null
+ salesOrderLineId?: string | null
+ scrapQuantity?: number
+ status?: Database["public"]["Enums"]["jobStatus"]
+ unitOfMeasureCode?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "journal_accountPeriodId_fkey"
- columns: ["accountingPeriodId"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "accountingPeriod"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "journal_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "journal_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "journal_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "journal_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- ]
- }
- journalLine: {
- Row: {
- accountNumber: string
- accrual: boolean
- amount: number
- companyId: string
- createdAt: string
- customFields: Json | null
- description: string | null
- documentId: string | null
- documentLineReference: string | null
- documentType:
- | Database["public"]["Enums"]["journalLineDocumentType"]
- | null
- externalDocumentId: string | null
- id: string
- journalId: number
- journalLineReference: string
- quantity: number
- }
- Insert: {
- accountNumber: string
- accrual?: boolean
- amount: number
- companyId: string
- createdAt?: string
- customFields?: Json | null
- description?: string | null
- documentId?: string | null
- documentLineReference?: string | null
- documentType?:
- | Database["public"]["Enums"]["journalLineDocumentType"]
- | null
- externalDocumentId?: string | null
- id?: string
- journalId: number
- journalLineReference: string
- quantity?: number
- }
- Update: {
- accountNumber?: string
- accrual?: boolean
- amount?: number
- companyId?: string
- createdAt?: string
- customFields?: Json | null
- description?: string | null
- documentId?: string | null
- documentLineReference?: string | null
- documentType?:
- | Database["public"]["Enums"]["journalLineDocumentType"]
- | null
- externalDocumentId?: string | null
- id?: string
- journalId?: number
- journalLineReference?: string
- quantity?: number
- }
- Relationships: [
- {
- foreignKeyName: "journalLine_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "journalLine_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "journalLine_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "journalLine_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "journalLine_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "journalLine_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
- ]
- }
- location: {
- Row: {
- addressLine1: string
- addressLine2: string | null
- city: string
- companyId: string
- countryCode: string | null
- createdAt: string
- createdBy: string
- customFields: Json | null
- id: string
- latitude: number | null
- longitude: number | null
- name: string
- postalCode: string
- state: string
- timezone: string
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- addressLine1: string
- addressLine2?: string | null
- city: string
- companyId: string
- countryCode?: string | null
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- id?: string
- latitude?: number | null
- longitude?: number | null
- name: string
- postalCode: string
- state: string
- timezone: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- addressLine1?: string
- addressLine2?: string | null
- city?: string
- companyId?: string
- countryCode?: string | null
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- id?: string
- latitude?: number | null
- longitude?: number | null
- name?: string
- postalCode?: string
- state?: string
- timezone?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
{
- foreignKeyName: "location_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "location_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "location_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "location_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- ]
- }
- makeMethod: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- id: string
- itemId: string
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- id?: string
- itemId: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- id?: string
- itemId?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "method_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "method_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "method_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "method_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "method_createdBy_fkey"
+ foreignKeyName: "job_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "method_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "customer"
referencedColumns: ["id"]
},
{
- foreignKeyName: "method_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "customers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "method_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "salesOrderCustomers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "method_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "method_itemId_fkey"
+ foreignKeyName: "job_itemId_fkey"
columns: ["itemId"]
isOneToOne: false
referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "method_itemId_fkey"
+ foreignKeyName: "job_itemId_fkey"
columns: ["itemId"]
isOneToOne: false
referencedRelation: "itemQuantities"
referencedColumns: ["itemId"]
},
- ]
- }
- material: {
- Row: {
- approved: boolean
- approvedBy: string | null
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- dimensions: string | null
- finish: string | null
- grade: string | null
- id: string
- itemId: string | null
- materialFormId: string
- materialSubstanceId: string
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- approved?: boolean
- approvedBy?: string | null
- companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- dimensions?: string | null
- finish?: string | null
- grade?: string | null
- id: string
- itemId?: string | null
- materialFormId: string
- materialSubstanceId: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- approved?: boolean
- approvedBy?: string | null
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- dimensions?: string | null
- finish?: string | null
- grade?: string | null
- id?: string
- itemId?: string | null
- materialFormId?: string
- materialSubstanceId?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "material_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "material_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
{
- foreignKeyName: "material_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "material_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "material_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "material_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_quoteId_fkey"
+ columns: ["quoteId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "material_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_quoteId_fkey"
+ columns: ["quoteId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "quoteCustomerDetails"
+ referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "material_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_quoteId_fkey"
+ columns: ["quoteId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_quoteLineId_fkey"
+ columns: ["quoteLineId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "quoteLine"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_quoteLineId_fkey"
+ columns: ["quoteLineId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "quoteLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "salesOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "salesOrderLocations"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "material_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "job_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "item"
+ referencedRelation: "salesOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "job_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedRelation: "salesOrderLine"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "material_materialFormId_fkey"
- columns: ["materialFormId"]
+ foreignKeyName: "job_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
isOneToOne: false
- referencedRelation: "materialForm"
+ referencedRelation: "salesOrderLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_materialSubstanceId_fkey"
- columns: ["materialSubstanceId"]
+ foreignKeyName: "job_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
isOneToOne: false
- referencedRelation: "materialSubstance"
- referencedColumns: ["id"]
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "material_updatedBy_fkey"
+ foreignKeyName: "job_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_updatedBy_fkey"
+ foreignKeyName: "job_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_updatedBy_fkey"
+ foreignKeyName: "job_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_updatedBy_fkey"
+ foreignKeyName: "job_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_updatedBy_fkey"
+ foreignKeyName: "job_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -7436,131 +7221,203 @@ export type Database = {
},
]
}
- materialForm: {
+ jobMaterial: {
Row: {
- companyId: string | null
+ companyId: string
createdAt: string
createdBy: string
customFields: Json | null
+ description: string
id: string
- name: string
+ itemId: string
+ itemReadableId: string
+ itemType: string
+ jobId: string
+ jobOperationId: string | null
+ methodType: Database["public"]["Enums"]["methodType"]
+ order: number
+ quantity: number
+ unitCost: number
+ unitOfMeasureCode: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- companyId?: string | null
+ companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
+ description: string
id?: string
- name: string
+ itemId: string
+ itemReadableId: string
+ itemType?: string
+ jobId: string
+ jobOperationId?: string | null
+ methodType?: Database["public"]["Enums"]["methodType"]
+ order?: number
+ quantity?: number
+ unitCost?: number
+ unitOfMeasureCode?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- companyId?: string | null
+ companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
+ description?: string
id?: string
- name?: string
+ itemId?: string
+ itemReadableId?: string
+ itemType?: string
+ jobId?: string
+ jobOperationId?: string | null
+ methodType?: Database["public"]["Enums"]["methodType"]
+ order?: number
+ quantity?: number
+ unitCost?: number
+ unitOfMeasureCode?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "materialForm_companyId_fkey"
+ foreignKeyName: "jobMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_companyId_fkey"
+ foreignKeyName: "jobMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_companyId_fkey"
+ foreignKeyName: "jobMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "materialForm_companyId_fkey"
+ foreignKeyName: "jobMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "materialForm_createdBy_fkey"
+ foreignKeyName: "jobMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_createdBy_fkey"
+ foreignKeyName: "jobMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_createdBy_fkey"
+ foreignKeyName: "jobMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_createdBy_fkey"
+ foreignKeyName: "jobMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_createdBy_fkey"
+ foreignKeyName: "jobMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "materialForm_updatedBy_fkey"
+ foreignKeyName: "jobMaterial_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobMaterial_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "jobMaterial_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "job"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobMaterial_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "jobs"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobMaterial_jobOperationId_fkey"
+ columns: ["jobOperationId"]
+ isOneToOne: false
+ referencedRelation: "jobOperation"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobMaterial_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "jobMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_updatedBy_fkey"
+ foreignKeyName: "jobMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_updatedBy_fkey"
+ foreignKeyName: "jobMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_updatedBy_fkey"
+ foreignKeyName: "jobMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_updatedBy_fkey"
+ foreignKeyName: "jobMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -7568,226 +7425,491 @@ export type Database = {
},
]
}
- materialSubstance: {
+ jobOperation: {
Row: {
- companyId: string | null
+ companyId: string
createdAt: string
createdBy: string
customFields: Json | null
+ description: string | null
id: string
- name: string
+ jobId: string
+ laborRate: number
+ laborTime: number
+ laborUnit: Database["public"]["Enums"]["factor"]
+ machineTime: number
+ machineUnit: Database["public"]["Enums"]["factor"]
+ operationOrder: Database["public"]["Enums"]["methodOperationOrder"]
+ order: number
+ overheadRate: number
+ processId: string
+ quotingRate: number
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
updatedAt: string | null
updatedBy: string | null
+ workCenterId: string | null
+ workInstruction: Json
}
Insert: {
- companyId?: string | null
+ companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
+ description?: string | null
id?: string
- name: string
+ jobId: string
+ laborRate?: number
+ laborTime?: number
+ laborUnit?: Database["public"]["Enums"]["factor"]
+ machineTime?: number
+ machineUnit?: Database["public"]["Enums"]["factor"]
+ operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
+ order?: number
+ overheadRate?: number
+ processId: string
+ quotingRate?: number
+ setupTime?: number
+ setupUnit?: Database["public"]["Enums"]["factor"]
updatedAt?: string | null
updatedBy?: string | null
+ workCenterId?: string | null
+ workInstruction?: Json
}
Update: {
- companyId?: string | null
+ companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
+ description?: string | null
id?: string
- name?: string
+ jobId?: string
+ laborRate?: number
+ laborTime?: number
+ laborUnit?: Database["public"]["Enums"]["factor"]
+ machineTime?: number
+ machineUnit?: Database["public"]["Enums"]["factor"]
+ operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
+ order?: number
+ overheadRate?: number
+ processId?: string
+ quotingRate?: number
+ setupTime?: number
+ setupUnit?: Database["public"]["Enums"]["factor"]
updatedAt?: string | null
updatedBy?: string | null
+ workCenterId?: string | null
+ workInstruction?: Json
}
Relationships: [
{
- foreignKeyName: "materialSubstance_companyId_fkey"
+ foreignKeyName: "jobOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_companyId_fkey"
+ foreignKeyName: "jobOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_companyId_fkey"
+ foreignKeyName: "jobOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "materialSubstance_companyId_fkey"
+ foreignKeyName: "jobOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "materialSubstance_createdBy_fkey"
+ foreignKeyName: "jobOperation_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_createdBy_fkey"
+ foreignKeyName: "jobOperation_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_createdBy_fkey"
+ foreignKeyName: "jobOperation_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_createdBy_fkey"
+ foreignKeyName: "jobOperation_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_createdBy_fkey"
+ foreignKeyName: "jobOperation_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "materialSubstance_updatedBy_fkey"
+ foreignKeyName: "jobOperation_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "job"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobOperation_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "jobs"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobOperation_processId_fkey"
+ columns: ["processId"]
+ isOneToOne: false
+ referencedRelation: "process"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobOperation_processId_fkey"
+ columns: ["processId"]
+ isOneToOne: false
+ referencedRelation: "processes"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_updatedBy_fkey"
+ foreignKeyName: "jobOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_updatedBy_fkey"
+ foreignKeyName: "jobOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_updatedBy_fkey"
+ foreignKeyName: "jobOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_updatedBy_fkey"
+ foreignKeyName: "jobOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "jobOperation_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenter"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobOperation_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenters"
+ referencedColumns: ["id"]
+ },
]
}
- membership: {
+ journal: {
Row: {
- groupId: string
+ accountingPeriodId: string | null
+ companyId: string
+ createdAt: string
+ customFields: Json | null
+ description: string | null
id: number
- memberGroupId: string | null
- memberUserId: string | null
+ postingDate: string
}
Insert: {
- groupId: string
+ accountingPeriodId?: string | null
+ companyId: string
+ createdAt?: string
+ customFields?: Json | null
+ description?: string | null
id?: number
- memberGroupId?: string | null
- memberUserId?: string | null
+ postingDate?: string
}
Update: {
- groupId?: string
+ accountingPeriodId?: string | null
+ companyId?: string
+ createdAt?: string
+ customFields?: Json | null
+ description?: string | null
id?: number
- memberGroupId?: string | null
- memberUserId?: string | null
+ postingDate?: string
}
Relationships: [
{
- foreignKeyName: "membership_groupId_fkey"
- columns: ["groupId"]
- isOneToOne: false
- referencedRelation: "group"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "membership_memberGroupId_fkey"
- columns: ["memberGroupId"]
- isOneToOne: false
- referencedRelation: "group"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "journal_accountPeriodId_fkey"
+ columns: ["accountingPeriodId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "accountingPeriod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "journal_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "journal_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "journal_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "journal_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
]
}
- methodMaterial: {
+ journalLine: {
Row: {
- companyId: string
+ accountNumber: string
+ accrual: boolean
+ amount: number
+ companyId: string
+ createdAt: string
+ customFields: Json | null
+ description: string | null
+ documentId: string | null
+ documentLineReference: string | null
+ documentType:
+ | Database["public"]["Enums"]["journalLineDocumentType"]
+ | null
+ externalDocumentId: string | null
+ id: string
+ journalId: number
+ journalLineReference: string
+ quantity: number
+ }
+ Insert: {
+ accountNumber: string
+ accrual?: boolean
+ amount: number
+ companyId: string
+ createdAt?: string
+ customFields?: Json | null
+ description?: string | null
+ documentId?: string | null
+ documentLineReference?: string | null
+ documentType?:
+ | Database["public"]["Enums"]["journalLineDocumentType"]
+ | null
+ externalDocumentId?: string | null
+ id?: string
+ journalId: number
+ journalLineReference: string
+ quantity?: number
+ }
+ Update: {
+ accountNumber?: string
+ accrual?: boolean
+ amount?: number
+ companyId?: string
+ createdAt?: string
+ customFields?: Json | null
+ description?: string | null
+ documentId?: string | null
+ documentLineReference?: string | null
+ documentType?:
+ | Database["public"]["Enums"]["journalLineDocumentType"]
+ | null
+ externalDocumentId?: string | null
+ id?: string
+ journalId?: number
+ journalLineReference?: string
+ quantity?: number
+ }
+ Relationships: [
+ {
+ foreignKeyName: "journalLine_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
+ },
+ {
+ foreignKeyName: "journalLine_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
+ },
+ {
+ foreignKeyName: "journalLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "journalLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "journalLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "journalLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ ]
+ }
+ location: {
+ Row: {
+ addressLine1: string
+ addressLine2: string | null
+ city: string
+ companyId: string
+ countryCode: string | null
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ id: string
+ latitude: number | null
+ longitude: number | null
+ name: string
+ postalCode: string
+ state: string
+ timezone: string
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ addressLine1: string
+ addressLine2?: string | null
+ city: string
+ companyId: string
+ countryCode?: string | null
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ id?: string
+ latitude?: number | null
+ longitude?: number | null
+ name: string
+ postalCode: string
+ state: string
+ timezone: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ addressLine1?: string
+ addressLine2?: string | null
+ city?: string
+ companyId?: string
+ countryCode?: string | null
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ id?: string
+ latitude?: number | null
+ longitude?: number | null
+ name?: string
+ postalCode?: string
+ state?: string
+ timezone?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "location_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "location_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "location_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "location_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ ]
+ }
+ makeMethod: {
+ Row: {
+ companyId: string
createdAt: string
createdBy: string
customFields: Json | null
id: string
itemId: string
- itemReadableId: string
- itemType: string
- makeMethodId: string
- materialMakeMethodId: string | null
- methodOperationId: string | null
- methodType: Database["public"]["Enums"]["methodType"]
- order: number
- quantity: number
- unitOfMeasureCode: string
updatedAt: string | null
updatedBy: string | null
}
@@ -7798,15 +7920,6 @@ export type Database = {
customFields?: Json | null
id?: string
itemId: string
- itemReadableId: string
- itemType?: string
- makeMethodId: string
- materialMakeMethodId?: string | null
- methodOperationId?: string | null
- methodType?: Database["public"]["Enums"]["methodType"]
- order?: number
- quantity: number
- unitOfMeasureCode: string
updatedAt?: string | null
updatedBy?: string | null
}
@@ -7817,503 +7930,430 @@ export type Database = {
customFields?: Json | null
id?: string
itemId?: string
- itemReadableId?: string
- itemType?: string
- makeMethodId?: string
- materialMakeMethodId?: string | null
- methodOperationId?: string | null
- methodType?: Database["public"]["Enums"]["methodType"]
- order?: number
- quantity?: number
- unitOfMeasureCode?: string
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "methodMaterial_companyId_fkey"
+ foreignKeyName: "method_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_companyId_fkey"
+ foreignKeyName: "method_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_companyId_fkey"
+ foreignKeyName: "method_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "methodMaterial_companyId_fkey"
+ foreignKeyName: "method_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "methodMaterial_createdBy_fkey"
+ foreignKeyName: "method_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_createdBy_fkey"
+ foreignKeyName: "method_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_createdBy_fkey"
+ foreignKeyName: "method_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_createdBy_fkey"
+ foreignKeyName: "method_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_createdBy_fkey"
+ foreignKeyName: "method_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "methodMaterial_itemId_fkey"
+ foreignKeyName: "method_itemId_fkey"
columns: ["itemId"]
isOneToOne: false
referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_itemId_fkey"
+ foreignKeyName: "method_itemId_fkey"
columns: ["itemId"]
isOneToOne: false
referencedRelation: "itemQuantities"
referencedColumns: ["itemId"]
},
- {
- foreignKeyName: "methodMaterial_materialMakeMethodId_fkey"
- columns: ["materialMakeMethodId"]
- isOneToOne: false
- referencedRelation: "makeMethod"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_materialMakeMethodId_fkey"
- columns: ["materialMakeMethodId"]
- isOneToOne: false
- referencedRelation: "quoteOperationsWithMakeMethods"
- referencedColumns: ["makeMethodId"]
- },
- {
- foreignKeyName: "methodMaterial_methodId_fkey"
- columns: ["makeMethodId"]
- isOneToOne: false
- referencedRelation: "makeMethod"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_methodId_fkey"
- columns: ["makeMethodId"]
- isOneToOne: false
- referencedRelation: "quoteOperationsWithMakeMethods"
- referencedColumns: ["makeMethodId"]
- },
- {
- foreignKeyName: "methodMaterial_methodOperation_fkey"
- columns: ["methodOperationId"]
- isOneToOne: false
- referencedRelation: "methodOperation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode", "companyId"]
- isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
- },
- {
- foreignKeyName: "methodMaterial_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
]
}
- methodOperation: {
+ material: {
Row: {
+ approved: boolean
+ approvedBy: string | null
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
- description: string
+ dimensions: string | null
+ finish: string | null
+ grade: string | null
id: string
- laborTime: number
- laborUnit: Database["public"]["Enums"]["factor"]
- machineTime: number
- machineUnit: Database["public"]["Enums"]["factor"]
- makeMethodId: string
- operationOrder: Database["public"]["Enums"]["methodOperationOrder"]
- operationSupplierProcessId: string | null
- operationType: Database["public"]["Enums"]["operationType"]
- order: number
- processId: string
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
+ itemId: string | null
+ materialFormId: string
+ materialSubstanceId: string
updatedAt: string | null
updatedBy: string | null
- workCenterId: string | null
}
Insert: {
+ approved?: boolean
+ approvedBy?: string | null
companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
- description: string
- id?: string
- laborTime?: number
- laborUnit?: Database["public"]["Enums"]["factor"]
- machineTime?: number
- machineUnit?: Database["public"]["Enums"]["factor"]
- makeMethodId: string
- operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
- operationSupplierProcessId?: string | null
- operationType?: Database["public"]["Enums"]["operationType"]
- order?: number
- processId: string
- setupTime?: number
- setupUnit?: Database["public"]["Enums"]["factor"]
+ dimensions?: string | null
+ finish?: string | null
+ grade?: string | null
+ id: string
+ itemId?: string | null
+ materialFormId: string
+ materialSubstanceId: string
updatedAt?: string | null
updatedBy?: string | null
- workCenterId?: string | null
}
Update: {
+ approved?: boolean
+ approvedBy?: string | null
companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
- description?: string
+ dimensions?: string | null
+ finish?: string | null
+ grade?: string | null
id?: string
- laborTime?: number
- laborUnit?: Database["public"]["Enums"]["factor"]
- machineTime?: number
- machineUnit?: Database["public"]["Enums"]["factor"]
- makeMethodId?: string
- operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
- operationSupplierProcessId?: string | null
- operationType?: Database["public"]["Enums"]["operationType"]
- order?: number
- processId?: string
- setupTime?: number
- setupUnit?: Database["public"]["Enums"]["factor"]
+ itemId?: string | null
+ materialFormId?: string
+ materialSubstanceId?: string
updatedAt?: string | null
updatedBy?: string | null
- workCenterId?: string | null
}
Relationships: [
{
- foreignKeyName: "methodOperation_companyId_fkey"
+ foreignKeyName: "material_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "material_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "material_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "material_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "material_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "material_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_companyId_fkey"
+ foreignKeyName: "material_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_companyId_fkey"
+ foreignKeyName: "material_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "methodOperation_companyId_fkey"
+ foreignKeyName: "material_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "methodOperation_createdBy_fkey"
+ foreignKeyName: "material_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_createdBy_fkey"
+ foreignKeyName: "material_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_createdBy_fkey"
+ foreignKeyName: "material_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_createdBy_fkey"
+ foreignKeyName: "material_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_createdBy_fkey"
+ foreignKeyName: "material_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "methodOperation_methodId_fkey"
- columns: ["makeMethodId"]
+ foreignKeyName: "material_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "makeMethod"
+ referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_methodId_fkey"
- columns: ["makeMethodId"]
+ foreignKeyName: "material_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "quoteOperationsWithMakeMethods"
- referencedColumns: ["makeMethodId"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
{
- foreignKeyName: "methodOperation_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "material_materialFormId_fkey"
+ columns: ["materialFormId"]
isOneToOne: false
- referencedRelation: "process"
+ referencedRelation: "materialForm"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "material_materialSubstanceId_fkey"
+ columns: ["materialSubstanceId"]
isOneToOne: false
- referencedRelation: "processes"
+ referencedRelation: "materialSubstance"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_updatedBy_fkey"
+ foreignKeyName: "material_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_updatedBy_fkey"
+ foreignKeyName: "material_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_updatedBy_fkey"
+ foreignKeyName: "material_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_updatedBy_fkey"
+ foreignKeyName: "material_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_updatedBy_fkey"
+ foreignKeyName: "material_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "methodOperation_workCenterId_fkey"
- columns: ["workCenterId"]
- isOneToOne: false
- referencedRelation: "workCenter"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodOperation_workCenterId_fkey"
- columns: ["workCenterId"]
- isOneToOne: false
- referencedRelation: "workCenters"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
- columns: ["operationSupplierProcessId"]
- isOneToOne: false
- referencedRelation: "supplierProcess"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
- columns: ["operationSupplierProcessId"]
- isOneToOne: false
- referencedRelation: "supplierProcesses"
- referencedColumns: ["id"]
- },
]
}
- methodOperationWorkInstruction: {
+ materialForm: {
Row: {
- companyId: string
- content: Json | null
+ companyId: string | null
createdAt: string
createdBy: string
- methodOperationId: string
+ customFields: Json | null
+ id: string
+ name: string
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- companyId: string
- content?: Json | null
+ companyId?: string | null
createdAt?: string
createdBy: string
- methodOperationId: string
+ customFields?: Json | null
+ id?: string
+ name: string
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- companyId?: string
- content?: Json | null
+ companyId?: string | null
createdAt?: string
createdBy?: string
- methodOperationId?: string
+ customFields?: Json | null
+ id?: string
+ name?: string
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "methodOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "materialForm_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "materialForm_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "materialForm_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "materialForm_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "materialForm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "materialForm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "materialForm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "materialForm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "materialForm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_methodOperationId_fkey"
- columns: ["methodOperationId"]
- isOneToOne: true
- referencedRelation: "methodOperation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "materialForm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "materialForm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "materialForm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "materialForm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "materialForm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -8321,140 +8361,131 @@ export type Database = {
},
]
}
- modelUpload: {
+ materialSubstance: {
Row: {
- autodeskUrn: string | null
- companyId: string
- createdAt: string | null
+ companyId: string | null
+ createdAt: string
createdBy: string
+ customFields: Json | null
id: string
- modelPath: string
- name: string | null
- size: number | null
- thumbnailPath: string | null
+ name: string
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- autodeskUrn?: string | null
- companyId: string
- createdAt?: string | null
+ companyId?: string | null
+ createdAt?: string
createdBy: string
+ customFields?: Json | null
id?: string
- modelPath: string
- name?: string | null
- size?: number | null
- thumbnailPath?: string | null
+ name: string
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- autodeskUrn?: string | null
- companyId?: string
- createdAt?: string | null
+ companyId?: string | null
+ createdAt?: string
createdBy?: string
+ customFields?: Json | null
id?: string
- modelPath?: string
- name?: string | null
- size?: number | null
- thumbnailPath?: string | null
+ name?: string
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "modelUpload_companyId_fkey"
+ foreignKeyName: "materialSubstance_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_companyId_fkey"
+ foreignKeyName: "materialSubstance_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_companyId_fkey"
+ foreignKeyName: "materialSubstance_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "modelUpload_companyId_fkey"
+ foreignKeyName: "materialSubstance_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "modelUpload_createdBy_fkey"
+ foreignKeyName: "materialSubstance_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_createdBy_fkey"
+ foreignKeyName: "materialSubstance_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_createdBy_fkey"
+ foreignKeyName: "materialSubstance_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_createdBy_fkey"
+ foreignKeyName: "materialSubstance_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_createdBy_fkey"
+ foreignKeyName: "materialSubstance_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "modelUpload_updatedBy_fkey"
+ foreignKeyName: "materialSubstance_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_updatedBy_fkey"
+ foreignKeyName: "materialSubstance_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_updatedBy_fkey"
+ foreignKeyName: "materialSubstance_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_updatedBy_fkey"
+ foreignKeyName: "materialSubstance_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_updatedBy_fkey"
+ foreignKeyName: "materialSubstance_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -8462,648 +8493,662 @@ export type Database = {
},
]
}
- note: {
+ membership: {
+ Row: {
+ groupId: string
+ id: number
+ memberGroupId: string | null
+ memberUserId: string | null
+ }
+ Insert: {
+ groupId: string
+ id?: number
+ memberGroupId?: string | null
+ memberUserId?: string | null
+ }
+ Update: {
+ groupId?: string
+ id?: number
+ memberGroupId?: string | null
+ memberUserId?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "membership_groupId_fkey"
+ columns: ["groupId"]
+ isOneToOne: false
+ referencedRelation: "group"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "membership_memberGroupId_fkey"
+ columns: ["memberGroupId"]
+ isOneToOne: false
+ referencedRelation: "group"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ methodMaterial: {
Row: {
- active: boolean
companyId: string
createdAt: string
createdBy: string
- documentId: string
+ customFields: Json | null
id: string
- note: string
- noteRichText: Json
+ itemId: string
+ itemReadableId: string
+ itemType: string
+ makeMethodId: string
+ materialMakeMethodId: string | null
+ methodOperationId: string | null
+ methodType: Database["public"]["Enums"]["methodType"]
+ order: number
+ productionQuantity: number | null
+ quantity: number
+ scrapQuantity: number
+ unitOfMeasureCode: string
updatedAt: string | null
+ updatedBy: string | null
}
Insert: {
- active?: boolean
companyId: string
createdAt?: string
createdBy: string
- documentId: string
+ customFields?: Json | null
id?: string
- note: string
- noteRichText?: Json
+ itemId: string
+ itemReadableId: string
+ itemType?: string
+ makeMethodId: string
+ materialMakeMethodId?: string | null
+ methodOperationId?: string | null
+ methodType?: Database["public"]["Enums"]["methodType"]
+ order?: number
+ productionQuantity?: number | null
+ quantity: number
+ scrapQuantity?: number
+ unitOfMeasureCode: string
updatedAt?: string | null
+ updatedBy?: string | null
}
Update: {
- active?: boolean
companyId?: string
createdAt?: string
createdBy?: string
- documentId?: string
+ customFields?: Json | null
id?: string
- note?: string
- noteRichText?: Json
+ itemId?: string
+ itemReadableId?: string
+ itemType?: string
+ makeMethodId?: string
+ materialMakeMethodId?: string | null
+ methodOperationId?: string | null
+ methodType?: Database["public"]["Enums"]["methodType"]
+ order?: number
+ productionQuantity?: number | null
+ quantity?: number
+ scrapQuantity?: number
+ unitOfMeasureCode?: string
updatedAt?: string | null
+ updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "notes_companyId_fkey"
+ foreignKeyName: "methodMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "notes_companyId_fkey"
+ foreignKeyName: "methodMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "notes_companyId_fkey"
+ foreignKeyName: "methodMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "notes_companyId_fkey"
+ foreignKeyName: "methodMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "notes_createdBy_fkey"
+ foreignKeyName: "methodMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "notes_createdBy_fkey"
+ foreignKeyName: "methodMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "notes_createdBy_fkey"
+ foreignKeyName: "methodMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "notes_createdBy_fkey"
+ foreignKeyName: "methodMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "notes_createdBy_fkey"
+ foreignKeyName: "methodMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- oauthClient: {
- Row: {
- clientId: string
- clientSecret: string
- companyId: string
- createdAt: string | null
- id: string
- name: string
- redirectUris: string[]
- updatedAt: string | null
- }
- Insert: {
- clientId: string
- clientSecret: string
- companyId: string
- createdAt?: string | null
- id?: string
- name: string
- redirectUris?: string[]
- updatedAt?: string | null
- }
- Update: {
- clientId?: string
- clientSecret?: string
- companyId?: string
- createdAt?: string | null
- id?: string
- name?: string
- redirectUris?: string[]
- updatedAt?: string | null
- }
- Relationships: []
- }
- oauthCode: {
- Row: {
- clientId: string
- code: string
- companyId: string
- createdAt: string | null
- expiresAt: string
- id: string
- redirectUri: string
- userId: string
- }
- Insert: {
- clientId: string
- code: string
- companyId: string
- createdAt?: string | null
- expiresAt: string
- id?: string
- redirectUri: string
- userId: string
- }
- Update: {
- clientId?: string
- code?: string
- companyId?: string
- createdAt?: string | null
- expiresAt?: string
- id?: string
- redirectUri?: string
- userId?: string
- }
- Relationships: [
{
- foreignKeyName: "oauthCode_clientId_fkey"
- columns: ["clientId"]
+ foreignKeyName: "methodMaterial_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "oauthClient"
- referencedColumns: ["clientId"]
+ referencedRelation: "item"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodMaterial_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "methodMaterial_materialMakeMethodId_fkey"
+ columns: ["materialMakeMethodId"]
+ isOneToOne: false
+ referencedRelation: "makeMethod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodMaterial_materialMakeMethodId_fkey"
+ columns: ["materialMakeMethodId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "quoteOperationsWithMakeMethods"
+ referencedColumns: ["makeMethodId"]
+ },
+ {
+ foreignKeyName: "methodMaterial_methodId_fkey"
+ columns: ["makeMethodId"]
+ isOneToOne: false
+ referencedRelation: "makeMethod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodMaterial_methodId_fkey"
+ columns: ["makeMethodId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "quoteOperationsWithMakeMethods"
+ referencedColumns: ["makeMethodId"]
},
{
- foreignKeyName: "oauthCode_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodMaterial_methodOperation_fkey"
+ columns: ["methodOperationId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "methodOperation"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodMaterial_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "methodMaterial_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodMaterial_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodMaterial_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodMaterial_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodMaterial_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- oauthToken: {
+ methodOperation: {
Row: {
- accessToken: string
- clientId: string
companyId: string
- createdAt: string | null
- expiresAt: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ description: string
id: string
- refreshToken: string
- userId: string
+ laborTime: number
+ laborUnit: Database["public"]["Enums"]["factor"]
+ machineTime: number
+ machineUnit: Database["public"]["Enums"]["factor"]
+ makeMethodId: string
+ operationOrder: Database["public"]["Enums"]["methodOperationOrder"]
+ operationSupplierProcessId: string | null
+ operationType: Database["public"]["Enums"]["operationType"]
+ order: number
+ processId: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
+ updatedAt: string | null
+ updatedBy: string | null
+ workCenterId: string | null
+ workInstruction: Json
}
Insert: {
- accessToken: string
- clientId: string
companyId: string
- createdAt?: string | null
- expiresAt: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ description: string
id?: string
- refreshToken: string
- userId: string
+ laborTime?: number
+ laborUnit?: Database["public"]["Enums"]["factor"]
+ machineTime?: number
+ machineUnit?: Database["public"]["Enums"]["factor"]
+ makeMethodId: string
+ operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
+ operationSupplierProcessId?: string | null
+ operationType?: Database["public"]["Enums"]["operationType"]
+ order?: number
+ processId: string
+ setupTime?: number
+ setupUnit?: Database["public"]["Enums"]["factor"]
+ updatedAt?: string | null
+ updatedBy?: string | null
+ workCenterId?: string | null
+ workInstruction?: Json
}
Update: {
- accessToken?: string
- clientId?: string
companyId?: string
- createdAt?: string | null
- expiresAt?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ description?: string
id?: string
- refreshToken?: string
- userId?: string
+ laborTime?: number
+ laborUnit?: Database["public"]["Enums"]["factor"]
+ machineTime?: number
+ machineUnit?: Database["public"]["Enums"]["factor"]
+ makeMethodId?: string
+ operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
+ operationSupplierProcessId?: string | null
+ operationType?: Database["public"]["Enums"]["operationType"]
+ order?: number
+ processId?: string
+ setupTime?: number
+ setupUnit?: Database["public"]["Enums"]["factor"]
+ updatedAt?: string | null
+ updatedBy?: string | null
+ workCenterId?: string | null
+ workInstruction?: Json
}
Relationships: [
{
- foreignKeyName: "oauthToken_clientId_fkey"
- columns: ["clientId"]
- isOneToOne: false
- referencedRelation: "oauthClient"
- referencedColumns: ["clientId"]
- },
- {
- foreignKeyName: "oauthToken_companyId_fkey"
+ foreignKeyName: "methodOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthToken_companyId_fkey"
+ foreignKeyName: "methodOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthToken_companyId_fkey"
+ foreignKeyName: "methodOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "oauthToken_companyId_fkey"
+ foreignKeyName: "methodOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "oauthToken_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthToken_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthToken_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthToken_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthToken_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- opportunity: {
- Row: {
- companyId: string
- id: string
- purchaseOrderDocumentPath: string | null
- quoteId: string | null
- requestForQuoteDocumentPath: string | null
- salesOrderId: string | null
- salesRfqId: string | null
- }
- Insert: {
- companyId: string
- id?: string
- purchaseOrderDocumentPath?: string | null
- quoteId?: string | null
- requestForQuoteDocumentPath?: string | null
- salesOrderId?: string | null
- salesRfqId?: string | null
- }
- Update: {
- companyId?: string
- id?: string
- purchaseOrderDocumentPath?: string | null
- quoteId?: string | null
- requestForQuoteDocumentPath?: string | null
- salesOrderId?: string | null
- salesRfqId?: string | null
- }
- Relationships: [
{
- foreignKeyName: "opportunity_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodOperation_methodId_fkey"
+ columns: ["makeMethodId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "makeMethod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodOperation_methodId_fkey"
+ columns: ["makeMethodId"]
isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
+ referencedRelation: "quoteOperationsWithMakeMethods"
+ referencedColumns: ["makeMethodId"]
},
{
- foreignKeyName: "opportunity_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodOperation_processId_fkey"
+ columns: ["processId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "process"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodOperation_processId_fkey"
+ columns: ["processId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "processes"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "methodOperation_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "quote"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "methodOperation_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "quoteCustomerDetails"
- referencedColumns: ["quoteId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "methodOperation_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "quotes"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "methodOperation_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "salesOrder"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "methodOperation_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "salesOrderLocations"
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "methodOperation_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenter"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "methodOperation_workCenterId_fkey"
+ columns: ["workCenterId"]
isOneToOne: false
- referencedRelation: "salesOrders"
+ referencedRelation: "workCenters"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_salesRfqId_fkey"
- columns: ["salesRfqId"]
+ foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
+ columns: ["operationSupplierProcessId"]
isOneToOne: false
- referencedRelation: "salesRfq"
+ referencedRelation: "supplierProcess"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_salesRfqId_fkey"
- columns: ["salesRfqId"]
+ foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
+ columns: ["operationSupplierProcessId"]
isOneToOne: false
- referencedRelation: "salesRfqs"
+ referencedRelation: "supplierProcesses"
referencedColumns: ["id"]
},
]
}
- part: {
+ modelUpload: {
Row: {
- approved: boolean
- approvedBy: string | null
+ autodeskUrn: string | null
companyId: string
- createdAt: string
+ createdAt: string | null
createdBy: string
- customFields: Json | null
- fromDate: string | null
id: string
- itemId: string
- toDate: string | null
+ modelPath: string
+ name: string | null
+ size: number | null
+ thumbnailPath: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- approved?: boolean
- approvedBy?: string | null
+ autodeskUrn?: string | null
companyId: string
- createdAt?: string
+ createdAt?: string | null
createdBy: string
- customFields?: Json | null
- fromDate?: string | null
- id: string
- itemId: string
- toDate?: string | null
+ id?: string
+ modelPath: string
+ name?: string | null
+ size?: number | null
+ thumbnailPath?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- approved?: boolean
- approvedBy?: string | null
+ autodeskUrn?: string | null
companyId?: string
- createdAt?: string
+ createdAt?: string | null
createdBy?: string
- customFields?: Json | null
- fromDate?: string | null
id?: string
- itemId?: string
- toDate?: string | null
+ modelPath?: string
+ name?: string | null
+ size?: number | null
+ thumbnailPath?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "part_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "part_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "part_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "part_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "part_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "part_companyId_fkey"
+ foreignKeyName: "modelUpload_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_companyId_fkey"
+ foreignKeyName: "modelUpload_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_companyId_fkey"
+ foreignKeyName: "modelUpload_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "part_companyId_fkey"
+ foreignKeyName: "modelUpload_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "part_createdBy_fkey"
+ foreignKeyName: "modelUpload_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_createdBy_fkey"
+ foreignKeyName: "modelUpload_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_createdBy_fkey"
+ foreignKeyName: "modelUpload_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_createdBy_fkey"
+ foreignKeyName: "modelUpload_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_createdBy_fkey"
+ foreignKeyName: "modelUpload_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "part_id_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "part_id_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
- },
- {
- foreignKeyName: "part_updatedBy_fkey"
+ foreignKeyName: "modelUpload_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_updatedBy_fkey"
+ foreignKeyName: "modelUpload_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_updatedBy_fkey"
+ foreignKeyName: "modelUpload_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_updatedBy_fkey"
+ foreignKeyName: "modelUpload_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_updatedBy_fkey"
+ foreignKeyName: "modelUpload_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -9111,482 +9156,648 @@ export type Database = {
},
]
}
- partner: {
+ note: {
Row: {
- abilityId: string
active: boolean
companyId: string
createdAt: string
createdBy: string
- customFields: Json | null
- hoursPerWeek: number
+ documentId: string
id: string
+ note: string
+ noteRichText: Json
updatedAt: string | null
- updatedBy: string | null
}
Insert: {
- abilityId: string
active?: boolean
companyId: string
createdAt?: string
createdBy: string
- customFields?: Json | null
- hoursPerWeek?: number
- id: string
+ documentId: string
+ id?: string
+ note: string
+ noteRichText?: Json
updatedAt?: string | null
- updatedBy?: string | null
}
Update: {
- abilityId?: string
active?: boolean
companyId?: string
createdAt?: string
createdBy?: string
- customFields?: Json | null
- hoursPerWeek?: number
+ documentId?: string
id?: string
+ note?: string
+ noteRichText?: Json
updatedAt?: string | null
- updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "partner_abilityId_fkey"
- columns: ["abilityId"]
- isOneToOne: false
- referencedRelation: "ability"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "partner_companyId_fkey"
+ foreignKeyName: "notes_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_companyId_fkey"
+ foreignKeyName: "notes_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_companyId_fkey"
+ foreignKeyName: "notes_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "partner_companyId_fkey"
+ foreignKeyName: "notes_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "partner_createdBy_fkey"
+ foreignKeyName: "notes_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_createdBy_fkey"
+ foreignKeyName: "notes_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_createdBy_fkey"
+ foreignKeyName: "notes_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_createdBy_fkey"
+ foreignKeyName: "notes_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_createdBy_fkey"
+ foreignKeyName: "notes_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ oauthClient: {
+ Row: {
+ clientId: string
+ clientSecret: string
+ companyId: string
+ createdAt: string | null
+ id: string
+ name: string
+ redirectUris: string[]
+ updatedAt: string | null
+ }
+ Insert: {
+ clientId: string
+ clientSecret: string
+ companyId: string
+ createdAt?: string | null
+ id?: string
+ name: string
+ redirectUris?: string[]
+ updatedAt?: string | null
+ }
+ Update: {
+ clientId?: string
+ clientSecret?: string
+ companyId?: string
+ createdAt?: string | null
+ id?: string
+ name?: string
+ redirectUris?: string[]
+ updatedAt?: string | null
+ }
+ Relationships: []
+ }
+ oauthCode: {
+ Row: {
+ clientId: string
+ code: string
+ companyId: string
+ createdAt: string | null
+ expiresAt: string
+ id: string
+ redirectUri: string
+ userId: string
+ }
+ Insert: {
+ clientId: string
+ code: string
+ companyId: string
+ createdAt?: string | null
+ expiresAt: string
+ id?: string
+ redirectUri: string
+ userId: string
+ }
+ Update: {
+ clientId?: string
+ code?: string
+ companyId?: string
+ createdAt?: string | null
+ expiresAt?: string
+ id?: string
+ redirectUri?: string
+ userId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "oauthCode_clientId_fkey"
+ columns: ["clientId"]
+ isOneToOne: false
+ referencedRelation: "oauthClient"
+ referencedColumns: ["clientId"]
+ },
{
- foreignKeyName: "partner_id_fkey"
- columns: ["id"]
+ foreignKeyName: "oauthCode_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "supplierLocation"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "oauthCode_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "oauthCode_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "oauthCode_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "oauthCode_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "oauthCode_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "oauthCode_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "oauthCode_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "oauthCode_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- paymentTerm: {
+ oauthToken: {
Row: {
- active: boolean
- calculationMethod: Database["public"]["Enums"]["paymentTermCalculationMethod"]
+ accessToken: string
+ clientId: string
companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- daysDiscount: number
- daysDue: number
- discountPercentage: number
+ createdAt: string | null
+ expiresAt: string
id: string
- name: string
- updatedAt: string | null
- updatedBy: string | null
+ refreshToken: string
+ userId: string
}
Insert: {
- active?: boolean
- calculationMethod?: Database["public"]["Enums"]["paymentTermCalculationMethod"]
+ accessToken: string
+ clientId: string
companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- daysDiscount?: number
- daysDue?: number
- discountPercentage?: number
+ createdAt?: string | null
+ expiresAt: string
id?: string
- name: string
- updatedAt?: string | null
- updatedBy?: string | null
+ refreshToken: string
+ userId: string
}
Update: {
- active?: boolean
- calculationMethod?: Database["public"]["Enums"]["paymentTermCalculationMethod"]
+ accessToken?: string
+ clientId?: string
companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- daysDiscount?: number
- daysDue?: number
- discountPercentage?: number
+ createdAt?: string | null
+ expiresAt?: string
id?: string
- name?: string
- updatedAt?: string | null
- updatedBy?: string | null
+ refreshToken?: string
+ userId?: string
}
Relationships: [
{
- foreignKeyName: "paymentTerm_companyId_fkey"
+ foreignKeyName: "oauthToken_clientId_fkey"
+ columns: ["clientId"]
+ isOneToOne: false
+ referencedRelation: "oauthClient"
+ referencedColumns: ["clientId"]
+ },
+ {
+ foreignKeyName: "oauthToken_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_companyId_fkey"
+ foreignKeyName: "oauthToken_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_companyId_fkey"
+ foreignKeyName: "oauthToken_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "paymentTerm_companyId_fkey"
+ foreignKeyName: "oauthToken_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "paymentTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "oauthToken_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "oauthToken_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "oauthToken_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "oauthToken_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "oauthToken_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "paymentTerm_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "paymentTerm_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "paymentTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ ]
+ }
+ opportunity: {
+ Row: {
+ companyId: string
+ id: string
+ purchaseOrderDocumentPath: string | null
+ quoteId: string | null
+ requestForQuoteDocumentPath: string | null
+ salesOrderId: string | null
+ salesRfqId: string | null
+ }
+ Insert: {
+ companyId: string
+ id?: string
+ purchaseOrderDocumentPath?: string | null
+ quoteId?: string | null
+ requestForQuoteDocumentPath?: string | null
+ salesOrderId?: string | null
+ salesRfqId?: string | null
+ }
+ Update: {
+ companyId?: string
+ id?: string
+ purchaseOrderDocumentPath?: string | null
+ quoteId?: string | null
+ requestForQuoteDocumentPath?: string | null
+ salesOrderId?: string | null
+ salesRfqId?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "opportunity_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "opportunity_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "opportunity_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "opportunity_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "opportunity_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quote"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "opportunity_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quoteCustomerDetails"
+ referencedColumns: ["quoteId"]
+ },
+ {
+ foreignKeyName: "opportunity_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quotes"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "opportunity_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrder"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "opportunity_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderLocations"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "opportunity_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "opportunity_salesRfqId_fkey"
+ columns: ["salesRfqId"]
+ isOneToOne: false
+ referencedRelation: "salesRfq"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "opportunity_salesRfqId_fkey"
+ columns: ["salesRfqId"]
+ isOneToOne: false
+ referencedRelation: "salesRfqs"
+ referencedColumns: ["id"]
},
]
}
- pickMethod: {
+ part: {
Row: {
+ approved: boolean
+ approvedBy: string | null
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
- defaultShelfId: string | null
+ fromDate: string | null
+ id: string
itemId: string
- locationId: string
+ toDate: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
+ approved?: boolean
+ approvedBy?: string | null
companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
- defaultShelfId?: string | null
+ fromDate?: string | null
+ id: string
itemId: string
- locationId: string
+ toDate?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
+ approved?: boolean
+ approvedBy?: string | null
companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
- defaultShelfId?: string | null
+ fromDate?: string | null
+ id?: string
itemId?: string
- locationId?: string
+ toDate?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "pickMethod_companyId_fkey"
+ foreignKeyName: "part_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "part_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "part_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "part_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "part_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "part_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_companyId_fkey"
+ foreignKeyName: "part_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_companyId_fkey"
+ foreignKeyName: "part_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "pickMethod_companyId_fkey"
+ foreignKeyName: "part_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "pickMethod_createdBy_fkey"
+ foreignKeyName: "part_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_createdBy_fkey"
+ foreignKeyName: "part_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_createdBy_fkey"
+ foreignKeyName: "part_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_createdBy_fkey"
+ foreignKeyName: "part_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_createdBy_fkey"
+ foreignKeyName: "part_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "pickMethod_itemId_fkey"
+ foreignKeyName: "part_id_fkey"
columns: ["itemId"]
isOneToOne: false
referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_itemId_fkey"
+ foreignKeyName: "part_id_fkey"
columns: ["itemId"]
isOneToOne: false
referencedRelation: "itemQuantities"
referencedColumns: ["itemId"]
},
{
- foreignKeyName: "pickMethod_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "pickMethod_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickMethod_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "pickMethod_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "pickMethod_shelfId_fkey"
- columns: ["defaultShelfId", "locationId"]
- isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
- },
- {
- foreignKeyName: "pickMethod_updatedBy_fkey"
+ foreignKeyName: "part_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_updatedBy_fkey"
+ foreignKeyName: "part_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_updatedBy_fkey"
+ foreignKeyName: "part_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_updatedBy_fkey"
+ foreignKeyName: "part_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_updatedBy_fkey"
+ foreignKeyName: "part_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -9594,536 +9805,482 @@ export type Database = {
},
]
}
- postingGroupInventory: {
+ partner: {
Row: {
- capacityVarianceAccount: string
+ abilityId: string
+ active: boolean
companyId: string
- costOfGoodsSoldAccount: string
- directCostAppliedAccount: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ hoursPerWeek: number
id: string
- inventoryAccount: string
- inventoryAdjustmentVarianceAccount: string
- inventoryInterimAccrualAccount: string
- inventoryInvoicedNotReceivedAccount: string
- inventoryReceivedNotInvoicedAccount: string
- inventoryShippedNotInvoicedAccount: string
- itemPostingGroupId: string | null
- locationId: string | null
- materialVarianceAccount: string
- overheadAccount: string
- overheadCostAppliedAccount: string
- purchaseVarianceAccount: string
+ updatedAt: string | null
updatedBy: string | null
- workInProgressAccount: string
}
Insert: {
- capacityVarianceAccount: string
+ abilityId: string
+ active?: boolean
companyId: string
- costOfGoodsSoldAccount: string
- directCostAppliedAccount: string
- id?: string
- inventoryAccount: string
- inventoryAdjustmentVarianceAccount: string
- inventoryInterimAccrualAccount: string
- inventoryInvoicedNotReceivedAccount: string
- inventoryReceivedNotInvoicedAccount: string
- inventoryShippedNotInvoicedAccount: string
- itemPostingGroupId?: string | null
- locationId?: string | null
- materialVarianceAccount: string
- overheadAccount: string
- overheadCostAppliedAccount: string
- purchaseVarianceAccount: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ hoursPerWeek?: number
+ id: string
+ updatedAt?: string | null
updatedBy?: string | null
- workInProgressAccount: string
}
Update: {
- capacityVarianceAccount?: string
+ abilityId?: string
+ active?: boolean
companyId?: string
- costOfGoodsSoldAccount?: string
- directCostAppliedAccount?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ hoursPerWeek?: number
id?: string
- inventoryAccount?: string
- inventoryAdjustmentVarianceAccount?: string
- inventoryInterimAccrualAccount?: string
- inventoryInvoicedNotReceivedAccount?: string
- inventoryReceivedNotInvoicedAccount?: string
- inventoryShippedNotInvoicedAccount?: string
- itemPostingGroupId?: string | null
- locationId?: string | null
- materialVarianceAccount?: string
- overheadAccount?: string
- overheadCostAppliedAccount?: string
- purchaseVarianceAccount?: string
+ updatedAt?: string | null
updatedBy?: string | null
- workInProgressAccount?: string
}
Relationships: [
{
- foreignKeyName: "postingGroupInventory_capacityVarianceAccount_fkey"
- columns: ["capacityVarianceAccount", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "postingGroupInventory_capacityVarianceAccount_fkey"
- columns: ["capacityVarianceAccount", "companyId"]
+ foreignKeyName: "partner_abilityId_fkey"
+ columns: ["abilityId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "ability"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_costOfGoodsSoldAccount_fkey"
- columns: ["costOfGoodsSoldAccount", "companyId"]
+ foreignKeyName: "partner_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_costOfGoodsSoldAccount_fkey"
- columns: ["costOfGoodsSoldAccount", "companyId"]
+ foreignKeyName: "partner_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "company"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_directCostAppliedAccount_fkey"
- columns: ["directCostAppliedAccount", "companyId"]
+ foreignKeyName: "partner_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "postingGroupInventory_directCostAppliedAccount_fkey"
- columns: ["directCostAppliedAccount", "companyId"]
+ foreignKeyName: "partner_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryAccount_fkey"
- columns: ["inventoryAccount", "companyId"]
+ foreignKeyName: "partner_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryAccount_fkey"
- columns: ["inventoryAccount", "companyId"]
+ foreignKeyName: "partner_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryAdjustmentVarianceAccount_fkey"
- columns: ["inventoryAdjustmentVarianceAccount", "companyId"]
+ foreignKeyName: "partner_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryAdjustmentVarianceAccount_fkey"
- columns: ["inventoryAdjustmentVarianceAccount", "companyId"]
+ foreignKeyName: "partner_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryInterimAccrualAccount_fkey"
- columns: ["inventoryInterimAccrualAccount", "companyId"]
+ foreignKeyName: "partner_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryInterimAccrualAccount_fkey"
- columns: ["inventoryInterimAccrualAccount", "companyId"]
+ foreignKeyName: "partner_id_fkey"
+ columns: ["id"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "supplierLocation"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryInvoicedNotReceivedAccount_fkey"
- columns: ["inventoryInvoicedNotReceivedAccount", "companyId"]
+ foreignKeyName: "partner_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryInvoicedNotReceivedAccount_fkey"
- columns: ["inventoryInvoicedNotReceivedAccount", "companyId"]
+ foreignKeyName: "partner_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryReceivedNotInvoicedAccount_fkey"
- columns: ["inventoryReceivedNotInvoicedAccount", "companyId"]
+ foreignKeyName: "partner_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryReceivedNotInvoicedAccount_fkey"
- columns: ["inventoryReceivedNotInvoicedAccount", "companyId"]
+ foreignKeyName: "partner_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryShippedNotInvoicedAccount_fkey"
- columns: ["inventoryShippedNotInvoicedAccount", "companyId"]
+ foreignKeyName: "partner_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
+ ]
+ }
+ paymentTerm: {
+ Row: {
+ active: boolean
+ calculationMethod: Database["public"]["Enums"]["paymentTermCalculationMethod"]
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ daysDiscount: number
+ daysDue: number
+ discountPercentage: number
+ id: string
+ name: string
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ active?: boolean
+ calculationMethod?: Database["public"]["Enums"]["paymentTermCalculationMethod"]
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ daysDiscount?: number
+ daysDue?: number
+ discountPercentage?: number
+ id?: string
+ name: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ active?: boolean
+ calculationMethod?: Database["public"]["Enums"]["paymentTermCalculationMethod"]
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ daysDiscount?: number
+ daysDue?: number
+ discountPercentage?: number
+ id?: string
+ name?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "postingGroupInventory_inventoryShippedNotInvoicedAccount_fkey"
- columns: ["inventoryShippedNotInvoicedAccount", "companyId"]
+ foreignKeyName: "paymentTerm_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_itemPostingGroupId_fkey"
- columns: ["itemPostingGroupId"]
+ foreignKeyName: "paymentTerm_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "itemPostingGroup"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "postingGroupInventory_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "postingGroupInventory_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "postingGroupInventory_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "postingGroupInventory_materialVarianceAccount_fkey"
- columns: ["materialVarianceAccount", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "postingGroupInventory_materialVarianceAccount_fkey"
- columns: ["materialVarianceAccount", "companyId"]
+ foreignKeyName: "paymentTerm_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "postingGroupInventory_overheadAccount_fkey"
- columns: ["overheadAccount", "companyId"]
+ foreignKeyName: "paymentTerm_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "postingGroupInventory_overheadAccount_fkey"
- columns: ["overheadAccount", "companyId"]
+ foreignKeyName: "paymentTerm_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_overheadCostAppliedAccount_fkey"
- columns: ["overheadCostAppliedAccount", "companyId"]
+ foreignKeyName: "paymentTerm_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_overheadCostAppliedAccount_fkey"
- columns: ["overheadCostAppliedAccount", "companyId"]
+ foreignKeyName: "paymentTerm_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_purchaseVarianceAccount_fkey"
- columns: ["purchaseVarianceAccount", "companyId"]
+ foreignKeyName: "paymentTerm_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_purchaseVarianceAccount_fkey"
- columns: ["purchaseVarianceAccount", "companyId"]
+ foreignKeyName: "paymentTerm_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "postingGroupInventory_updatedBy_fkey"
+ foreignKeyName: "paymentTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_updatedBy_fkey"
+ foreignKeyName: "paymentTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_updatedBy_fkey"
+ foreignKeyName: "paymentTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_updatedBy_fkey"
+ foreignKeyName: "paymentTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_updatedBy_fkey"
+ foreignKeyName: "paymentTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "postingGroupInventory_workInProgressAccount_fkey"
- columns: ["workInProgressAccount", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "postingGroupInventory_workInProgressAccount_fkey"
- columns: ["workInProgressAccount", "companyId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
- },
]
}
- postingGroupPurchasing: {
+ pickMethod: {
Row: {
companyId: string
- id: string
- itemPostingGroupId: string | null
- payablesAccount: string
- purchaseAccount: string
- purchaseCreditAccount: string
- purchaseDiscountAccount: string
- purchasePrepaymentAccount: string
- purchaseTaxPayableAccount: string
- supplierTypeId: string | null
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ defaultShelfId: string | null
+ itemId: string
+ locationId: string
+ updatedAt: string | null
updatedBy: string | null
}
Insert: {
companyId: string
- id?: string
- itemPostingGroupId?: string | null
- payablesAccount: string
- purchaseAccount: string
- purchaseCreditAccount: string
- purchaseDiscountAccount: string
- purchasePrepaymentAccount: string
- purchaseTaxPayableAccount: string
- supplierTypeId?: string | null
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ defaultShelfId?: string | null
+ itemId: string
+ locationId: string
+ updatedAt?: string | null
updatedBy?: string | null
}
Update: {
companyId?: string
- id?: string
- itemPostingGroupId?: string | null
- payablesAccount?: string
- purchaseAccount?: string
- purchaseCreditAccount?: string
- purchaseDiscountAccount?: string
- purchasePrepaymentAccount?: string
- purchaseTaxPayableAccount?: string
- supplierTypeId?: string | null
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ defaultShelfId?: string | null
+ itemId?: string
+ locationId?: string
+ updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "postingGroupPurchasing_companyId_fkey"
+ foreignKeyName: "pickMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_companyId_fkey"
+ foreignKeyName: "pickMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_companyId_fkey"
+ foreignKeyName: "pickMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "postingGroupPurchasing_companyId_fkey"
+ foreignKeyName: "pickMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "postingGroupPurchasing_itemPostingGroupId_fkey"
- columns: ["itemPostingGroupId"]
+ foreignKeyName: "pickMethod_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "itemPostingGroup"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_payablesAccount_fkey"
- columns: ["payablesAccount", "companyId"]
+ foreignKeyName: "pickMethod_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_payablesAccount_fkey"
- columns: ["payablesAccount", "companyId"]
+ foreignKeyName: "pickMethod_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseAccount_fkey"
- columns: ["purchaseAccount", "companyId"]
+ foreignKeyName: "pickMethod_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseAccount_fkey"
- columns: ["purchaseAccount", "companyId"]
+ foreignKeyName: "pickMethod_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseCreditAccount_fkey"
- columns: ["purchaseCreditAccount", "companyId"]
+ foreignKeyName: "pickMethod_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "item"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseCreditAccount_fkey"
- columns: ["purchaseCreditAccount", "companyId"]
+ foreignKeyName: "pickMethod_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseDiscountAccount_fkey"
- columns: ["purchaseDiscountAccount", "companyId"]
+ foreignKeyName: "pickMethod_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseDiscountAccount_fkey"
- columns: ["purchaseDiscountAccount", "companyId"]
+ foreignKeyName: "pickMethod_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "location"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchasePrepaymentAccount_fkey"
- columns: ["purchasePrepaymentAccount", "companyId"]
+ foreignKeyName: "pickMethod_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchasePrepaymentAccount_fkey"
- columns: ["purchasePrepaymentAccount", "companyId"]
+ foreignKeyName: "pickMethod_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "postingGroupPurchasing_purchaseTaxPayableAccount_fkey"
- columns: ["purchaseTaxPayableAccount", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "postingGroupPurchasing_purchaseTaxPayableAccount_fkey"
- columns: ["purchaseTaxPayableAccount", "companyId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "postingGroupPurchasing_supplierTypeId_fkey"
- columns: ["supplierTypeId"]
+ foreignKeyName: "pickMethod_shelfId_fkey"
+ columns: ["defaultShelfId", "locationId"]
isOneToOne: false
- referencedRelation: "supplierType"
- referencedColumns: ["id"]
+ referencedRelation: "shelf"
+ referencedColumns: ["id", "locationId"]
},
{
- foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
+ foreignKeyName: "pickMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
+ foreignKeyName: "pickMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
+ foreignKeyName: "pickMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
+ foreignKeyName: "pickMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
+ foreignKeyName: "pickMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -10131,663 +10288,536 @@ export type Database = {
},
]
}
- postingGroupSales: {
+ postingGroupInventory: {
Row: {
+ capacityVarianceAccount: string
companyId: string
- customerTypeId: string | null
+ costOfGoodsSoldAccount: string
+ directCostAppliedAccount: string
id: string
+ inventoryAccount: string
+ inventoryAdjustmentVarianceAccount: string
+ inventoryInterimAccrualAccount: string
+ inventoryInvoicedNotReceivedAccount: string
+ inventoryReceivedNotInvoicedAccount: string
+ inventoryShippedNotInvoicedAccount: string
itemPostingGroupId: string | null
- receivablesAccount: string
- salesAccount: string
- salesCreditAccount: string
- salesDiscountAccount: string
- salesPrepaymentAccount: string
- salesTaxPayableAccount: string
+ locationId: string | null
+ materialVarianceAccount: string
+ overheadAccount: string
+ overheadCostAppliedAccount: string
+ purchaseVarianceAccount: string
updatedBy: string | null
+ workInProgressAccount: string
}
Insert: {
+ capacityVarianceAccount: string
companyId: string
- customerTypeId?: string | null
+ costOfGoodsSoldAccount: string
+ directCostAppliedAccount: string
id?: string
+ inventoryAccount: string
+ inventoryAdjustmentVarianceAccount: string
+ inventoryInterimAccrualAccount: string
+ inventoryInvoicedNotReceivedAccount: string
+ inventoryReceivedNotInvoicedAccount: string
+ inventoryShippedNotInvoicedAccount: string
itemPostingGroupId?: string | null
- receivablesAccount: string
- salesAccount: string
- salesCreditAccount: string
- salesDiscountAccount: string
- salesPrepaymentAccount: string
- salesTaxPayableAccount: string
+ locationId?: string | null
+ materialVarianceAccount: string
+ overheadAccount: string
+ overheadCostAppliedAccount: string
+ purchaseVarianceAccount: string
updatedBy?: string | null
+ workInProgressAccount: string
}
Update: {
+ capacityVarianceAccount?: string
companyId?: string
- customerTypeId?: string | null
+ costOfGoodsSoldAccount?: string
+ directCostAppliedAccount?: string
id?: string
+ inventoryAccount?: string
+ inventoryAdjustmentVarianceAccount?: string
+ inventoryInterimAccrualAccount?: string
+ inventoryInvoicedNotReceivedAccount?: string
+ inventoryReceivedNotInvoicedAccount?: string
+ inventoryShippedNotInvoicedAccount?: string
itemPostingGroupId?: string | null
- receivablesAccount?: string
- salesAccount?: string
- salesCreditAccount?: string
- salesDiscountAccount?: string
- salesPrepaymentAccount?: string
- salesTaxPayableAccount?: string
+ locationId?: string | null
+ materialVarianceAccount?: string
+ overheadAccount?: string
+ overheadCostAppliedAccount?: string
+ purchaseVarianceAccount?: string
updatedBy?: string | null
+ workInProgressAccount?: string
}
Relationships: [
{
- foreignKeyName: "postingGroupSales_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_capacityVarianceAccount_fkey"
+ columns: ["capacityVarianceAccount", "companyId"]
isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_capacityVarianceAccount_fkey"
+ columns: ["capacityVarianceAccount", "companyId"]
isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_costOfGoodsSoldAccount_fkey"
+ columns: ["costOfGoodsSoldAccount", "companyId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_costOfGoodsSoldAccount_fkey"
+ columns: ["costOfGoodsSoldAccount", "companyId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_customerTypeId_fkey"
- columns: ["customerTypeId"]
+ foreignKeyName: "postingGroupInventory_directCostAppliedAccount_fkey"
+ columns: ["directCostAppliedAccount", "companyId"]
isOneToOne: false
- referencedRelation: "customerType"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_itemPostingGroupId_fkey"
- columns: ["itemPostingGroupId"]
+ foreignKeyName: "postingGroupInventory_directCostAppliedAccount_fkey"
+ columns: ["directCostAppliedAccount", "companyId"]
isOneToOne: false
- referencedRelation: "itemPostingGroup"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_receivablesAccount_fkey"
- columns: ["receivablesAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryAccount_fkey"
+ columns: ["inventoryAccount", "companyId"]
isOneToOne: false
referencedRelation: "account"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_receivablesAccount_fkey"
- columns: ["receivablesAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryAccount_fkey"
+ columns: ["inventoryAccount", "companyId"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesAccount_fkey"
- columns: ["salesAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryAdjustmentVarianceAccount_fkey"
+ columns: ["inventoryAdjustmentVarianceAccount", "companyId"]
isOneToOne: false
referencedRelation: "account"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesAccount_fkey"
- columns: ["salesAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryAdjustmentVarianceAccount_fkey"
+ columns: ["inventoryAdjustmentVarianceAccount", "companyId"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesCreditAccount_fkey"
- columns: ["salesCreditAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryInterimAccrualAccount_fkey"
+ columns: ["inventoryInterimAccrualAccount", "companyId"]
isOneToOne: false
referencedRelation: "account"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesCreditAccount_fkey"
- columns: ["salesCreditAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryInterimAccrualAccount_fkey"
+ columns: ["inventoryInterimAccrualAccount", "companyId"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesDiscountAccount_fkey"
- columns: ["salesDiscountAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryInvoicedNotReceivedAccount_fkey"
+ columns: ["inventoryInvoicedNotReceivedAccount", "companyId"]
isOneToOne: false
referencedRelation: "account"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesDiscountAccount_fkey"
- columns: ["salesDiscountAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryInvoicedNotReceivedAccount_fkey"
+ columns: ["inventoryInvoicedNotReceivedAccount", "companyId"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesPrepaymentAccount_fkey"
- columns: ["salesPrepaymentAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryReceivedNotInvoicedAccount_fkey"
+ columns: ["inventoryReceivedNotInvoicedAccount", "companyId"]
isOneToOne: false
referencedRelation: "account"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesPrepaymentAccount_fkey"
- columns: ["salesPrepaymentAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryReceivedNotInvoicedAccount_fkey"
+ columns: ["inventoryReceivedNotInvoicedAccount", "companyId"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesTaxPayableAccount_fkey"
- columns: ["salesTaxPayableAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryShippedNotInvoicedAccount_fkey"
+ columns: ["inventoryShippedNotInvoicedAccount", "companyId"]
isOneToOne: false
referencedRelation: "account"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesTaxPayableAccount_fkey"
- columns: ["salesTaxPayableAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryShippedNotInvoicedAccount_fkey"
+ columns: ["inventoryShippedNotInvoicedAccount", "companyId"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "postingGroupInventory_itemPostingGroupId_fkey"
+ columns: ["itemPostingGroupId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "itemPostingGroup"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupSales_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "postingGroupInventory_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "postingGroupSales_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "postingGroupInventory_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupSales_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "postingGroupInventory_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "postingGroupSales_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "postingGroupInventory_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
- process: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- defaultStandardFactor: Database["public"]["Enums"]["factor"]
- id: string
- name: string
- processType: Database["public"]["Enums"]["processType"]
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- defaultStandardFactor: Database["public"]["Enums"]["factor"]
- id?: string
- name: string
- processType?: Database["public"]["Enums"]["processType"]
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- defaultStandardFactor?: Database["public"]["Enums"]["factor"]
- id?: string
- name?: string
- processType?: Database["public"]["Enums"]["processType"]
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "process_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "process_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_materialVarianceAccount_fkey"
+ columns: ["materialVarianceAccount", "companyId"]
isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_materialVarianceAccount_fkey"
+ columns: ["materialVarianceAccount", "companyId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_overheadAccount_fkey"
+ columns: ["overheadAccount", "companyId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupInventory_overheadAccount_fkey"
+ columns: ["overheadAccount", "companyId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupInventory_overheadCostAppliedAccount_fkey"
+ columns: ["overheadCostAppliedAccount", "companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupInventory_overheadCostAppliedAccount_fkey"
+ columns: ["overheadCostAppliedAccount", "companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupInventory_purchaseVarianceAccount_fkey"
+ columns: ["purchaseVarianceAccount", "companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupInventory_purchaseVarianceAccount_fkey"
+ columns: ["purchaseVarianceAccount", "companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_updatedBy_fkey"
+ foreignKeyName: "postingGroupInventory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "process_updatedBy_fkey"
+ foreignKeyName: "postingGroupInventory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "process_updatedBy_fkey"
+ foreignKeyName: "postingGroupInventory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "process_updatedBy_fkey"
+ foreignKeyName: "postingGroupInventory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "process_updatedBy_fkey"
+ foreignKeyName: "postingGroupInventory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "postingGroupInventory_workInProgressAccount_fkey"
+ columns: ["workInProgressAccount", "companyId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
+ },
+ {
+ foreignKeyName: "postingGroupInventory_workInProgressAccount_fkey"
+ columns: ["workInProgressAccount", "companyId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
+ },
]
}
- purchaseInvoice: {
+ postingGroupPurchasing: {
Row: {
- assignee: string | null
- balance: number
companyId: string
- createdAt: string
- createdBy: string
- currencyCode: string
- customFields: Json | null
- dateDue: string | null
- dateIssued: string | null
- datePaid: string | null
- exchangeRate: number
id: string
- invoiceId: string
- invoiceSupplierContactId: string | null
- invoiceSupplierId: string | null
- invoiceSupplierLocationId: string | null
- paymentTermId: string | null
- postingDate: string | null
- status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- subtotal: number
- supplierId: string | null
- supplierReference: string | null
- totalAmount: number
- totalDiscount: number
- totalTax: number
- updatedAt: string | null
+ itemPostingGroupId: string | null
+ payablesAccount: string
+ purchaseAccount: string
+ purchaseCreditAccount: string
+ purchaseDiscountAccount: string
+ purchasePrepaymentAccount: string
+ purchaseTaxPayableAccount: string
+ supplierTypeId: string | null
updatedBy: string | null
}
Insert: {
- assignee?: string | null
- balance?: number
companyId: string
- createdAt?: string
- createdBy: string
- currencyCode: string
- customFields?: Json | null
- dateDue?: string | null
- dateIssued?: string | null
- datePaid?: string | null
- exchangeRate?: number
id?: string
- invoiceId: string
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentTermId?: string | null
- postingDate?: string | null
- status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- subtotal?: number
- supplierId?: string | null
- supplierReference?: string | null
- totalAmount?: number
- totalDiscount?: number
- totalTax?: number
- updatedAt?: string | null
+ itemPostingGroupId?: string | null
+ payablesAccount: string
+ purchaseAccount: string
+ purchaseCreditAccount: string
+ purchaseDiscountAccount: string
+ purchasePrepaymentAccount: string
+ purchaseTaxPayableAccount: string
+ supplierTypeId?: string | null
updatedBy?: string | null
}
Update: {
- assignee?: string | null
- balance?: number
companyId?: string
- createdAt?: string
- createdBy?: string
- currencyCode?: string
- customFields?: Json | null
- dateDue?: string | null
- dateIssued?: string | null
- datePaid?: string | null
- exchangeRate?: number
id?: string
- invoiceId?: string
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentTermId?: string | null
- postingDate?: string | null
- status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- subtotal?: number
- supplierId?: string | null
- supplierReference?: string | null
- totalAmount?: number
- totalDiscount?: number
- totalTax?: number
- updatedAt?: string | null
+ itemPostingGroupId?: string | null
+ payablesAccount?: string
+ purchaseAccount?: string
+ purchaseCreditAccount?: string
+ purchaseDiscountAccount?: string
+ purchasePrepaymentAccount?: string
+ purchaseTaxPayableAccount?: string
+ supplierTypeId?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchaseInvoice_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "purchaseInvoice_companyId_fkey"
+ foreignKeyName: "postingGroupPurchasing_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_companyId_fkey"
+ foreignKeyName: "postingGroupPurchasing_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_companyId_fkey"
+ foreignKeyName: "postingGroupPurchasing_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseInvoice_companyId_fkey"
+ foreignKeyName: "postingGroupPurchasing_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupPurchasing_itemPostingGroupId_fkey"
+ columns: ["itemPostingGroupId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "itemPostingGroup"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "purchaseInvoice_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
- isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
- },
- {
- foreignKeyName: "purchaseInvoice_invoiceSupplierContactId_fkey"
- columns: ["invoiceSupplierContactId"]
+ foreignKeyName: "postingGroupPurchasing_payablesAccount_fkey"
+ columns: ["payablesAccount", "companyId"]
isOneToOne: false
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "postingGroupPurchasing_payablesAccount_fkey"
+ columns: ["payablesAccount", "companyId"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseAccount_fkey"
+ columns: ["purchaseAccount", "companyId"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseAccount_fkey"
+ columns: ["purchaseAccount", "companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseCreditAccount_fkey"
+ columns: ["purchaseCreditAccount", "companyId"]
isOneToOne: false
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseCreditAccount_fkey"
+ columns: ["purchaseCreditAccount", "companyId"]
isOneToOne: false
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierLocationId_fkey"
- columns: ["invoiceSupplierLocationId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseDiscountAccount_fkey"
+ columns: ["purchaseDiscountAccount", "companyId"]
isOneToOne: false
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_paymentTermId_fkey"
- columns: ["paymentTermId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseDiscountAccount_fkey"
+ columns: ["purchaseDiscountAccount", "companyId"]
isOneToOne: false
- referencedRelation: "paymentTerm"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchasePrepaymentAccount_fkey"
+ columns: ["purchasePrepaymentAccount", "companyId"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchasePrepaymentAccount_fkey"
+ columns: ["purchasePrepaymentAccount", "companyId"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseTaxPayableAccount_fkey"
+ columns: ["purchaseTaxPayableAccount", "companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseTaxPayableAccount_fkey"
+ columns: ["purchaseTaxPayableAccount", "companyId"]
isOneToOne: false
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "postingGroupPurchasing_supplierTypeId_fkey"
+ columns: ["supplierTypeId"]
isOneToOne: false
- referencedRelation: "suppliers"
+ referencedRelation: "supplierType"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
+ foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
+ foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
+ foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
+ foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
+ foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -10795,451 +10825,341 @@ export type Database = {
},
]
}
- purchaseInvoiceLine: {
+ postingGroupSales: {
Row: {
- accountNumber: string | null
- assetId: string | null
companyId: string
- conversionFactor: number | null
- createdAt: string
- createdBy: string
- currencyCode: string
- customFields: Json | null
- description: string | null
- exchangeRate: number
+ customerTypeId: string | null
id: string
- inventoryUnitOfMeasureCode: string | null
- invoiceId: string
- invoiceLineType: Database["public"]["Enums"]["payableLineType"]
- itemId: string | null
- itemReadableId: string | null
- locationId: string | null
- purchaseOrderId: string | null
- purchaseOrderLineId: string | null
- purchaseUnitOfMeasureCode: string | null
- quantity: number
- serviceId: string | null
- shelfId: string | null
- totalAmount: number | null
- unitPrice: number
- updatedAt: string | null
+ itemPostingGroupId: string | null
+ receivablesAccount: string
+ salesAccount: string
+ salesCreditAccount: string
+ salesDiscountAccount: string
+ salesPrepaymentAccount: string
+ salesTaxPayableAccount: string
updatedBy: string | null
}
Insert: {
- accountNumber?: string | null
- assetId?: string | null
companyId: string
- conversionFactor?: number | null
- createdAt?: string
- createdBy: string
- currencyCode: string
- customFields?: Json | null
- description?: string | null
- exchangeRate?: number
+ customerTypeId?: string | null
id?: string
- inventoryUnitOfMeasureCode?: string | null
- invoiceId: string
- invoiceLineType: Database["public"]["Enums"]["payableLineType"]
- itemId?: string | null
- itemReadableId?: string | null
- locationId?: string | null
- purchaseOrderId?: string | null
- purchaseOrderLineId?: string | null
- purchaseUnitOfMeasureCode?: string | null
- quantity?: number
- serviceId?: string | null
- shelfId?: string | null
- totalAmount?: number | null
- unitPrice?: number
- updatedAt?: string | null
+ itemPostingGroupId?: string | null
+ receivablesAccount: string
+ salesAccount: string
+ salesCreditAccount: string
+ salesDiscountAccount: string
+ salesPrepaymentAccount: string
+ salesTaxPayableAccount: string
updatedBy?: string | null
}
Update: {
- accountNumber?: string | null
- assetId?: string | null
companyId?: string
- conversionFactor?: number | null
- createdAt?: string
- createdBy?: string
- currencyCode?: string
- customFields?: Json | null
- description?: string | null
- exchangeRate?: number
+ customerTypeId?: string | null
id?: string
- inventoryUnitOfMeasureCode?: string | null
- invoiceId?: string
- invoiceLineType?: Database["public"]["Enums"]["payableLineType"]
- itemId?: string | null
- itemReadableId?: string | null
- locationId?: string | null
- purchaseOrderId?: string | null
- purchaseOrderLineId?: string | null
- purchaseUnitOfMeasureCode?: string | null
- quantity?: number
- serviceId?: string | null
- shelfId?: string | null
- totalAmount?: number | null
- unitPrice?: number
- updatedAt?: string | null
+ itemPostingGroupId?: string | null
+ receivablesAccount?: string
+ salesAccount?: string
+ salesCreditAccount?: string
+ salesDiscountAccount?: string
+ salesPrepaymentAccount?: string
+ salesTaxPayableAccount?: string
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchaseInvoiceLines_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "purchaseInvoiceLines_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupSales_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ foreignKeyName: "postingGroupSales_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ foreignKeyName: "postingGroupSales_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ foreignKeyName: "postingGroupSales_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupSales_customerTypeId_fkey"
+ columns: ["customerTypeId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "customerType"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupSales_itemPostingGroupId_fkey"
+ columns: ["itemPostingGroupId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "itemPostingGroup"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupSales_receivablesAccount_fkey"
+ columns: ["receivablesAccount", "companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupSales_receivablesAccount_fkey"
+ columns: ["receivablesAccount", "companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupSales_salesAccount_fkey"
+ columns: ["salesAccount", "companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
+ foreignKeyName: "postingGroupSales_salesAccount_fkey"
+ columns: ["salesAccount", "companyId"]
isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_inventoryUnitOfMeasureCode_fkey"
- columns: ["inventoryUnitOfMeasureCode", "companyId"]
+ foreignKeyName: "postingGroupSales_salesCreditAccount_fkey"
+ columns: ["salesCreditAccount", "companyId"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_invoiceId_fkey"
- columns: ["invoiceId"]
+ foreignKeyName: "postingGroupSales_salesCreditAccount_fkey"
+ columns: ["salesCreditAccount", "companyId"]
isOneToOne: false
- referencedRelation: "purchaseInvoice"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_invoiceId_fkey"
- columns: ["invoiceId"]
+ foreignKeyName: "postingGroupSales_salesDiscountAccount_fkey"
+ columns: ["salesDiscountAccount", "companyId"]
isOneToOne: false
- referencedRelation: "purchaseInvoices"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "postingGroupSales_salesDiscountAccount_fkey"
+ columns: ["salesDiscountAccount", "companyId"]
isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "postingGroupSales_salesPrepaymentAccount_fkey"
+ columns: ["salesPrepaymentAccount", "companyId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "postingGroupSales_salesPrepaymentAccount_fkey"
+ columns: ["salesPrepaymentAccount", "companyId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "postingGroupSales_salesTaxPayableAccount_fkey"
+ columns: ["salesTaxPayableAccount", "companyId"]
isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "postingGroupSales_salesTaxPayableAccount_fkey"
+ columns: ["salesTaxPayableAccount", "companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "postingGroupSales_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "postingGroupSales_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrder"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "postingGroupSales_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrderLocations"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "postingGroupSales_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderLineId_fkey"
- columns: ["purchaseOrderLineId"]
+ foreignKeyName: "postingGroupSales_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrderLine"
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ process: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ defaultStandardFactor: Database["public"]["Enums"]["factor"]
+ id: string
+ name: string
+ processType: Database["public"]["Enums"]["processType"]
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ defaultStandardFactor: Database["public"]["Enums"]["factor"]
+ id?: string
+ name: string
+ processType?: Database["public"]["Enums"]["processType"]
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ defaultStandardFactor?: Database["public"]["Enums"]["factor"]
+ id?: string
+ name?: string
+ processType?: Database["public"]["Enums"]["processType"]
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "process_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderLineId_fkey"
- columns: ["purchaseOrderLineId"]
+ foreignKeyName: "process_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrderLines"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseUnitOfMeasureCode_fkey"
- columns: ["purchaseUnitOfMeasureCode", "companyId"]
+ foreignKeyName: "process_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_shelfId_fkey"
- columns: ["shelfId", "locationId"]
+ foreignKeyName: "process_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "process_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "process_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "process_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "process_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "process_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- purchaseInvoicePaymentRelation: {
- Row: {
- id: string
- invoiceId: string
- paymentId: string
- }
- Insert: {
- id?: string
- invoiceId: string
- paymentId: string
- }
- Update: {
- id?: string
- invoiceId?: string
- paymentId?: string
- }
- Relationships: [
- {
- foreignKeyName: "purchasePayments_invoiceId_fkey"
- columns: ["invoiceId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoice"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchasePayments_invoiceId_fkey"
- columns: ["invoiceId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoices"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchasePayments_paymentId_fkey"
- columns: ["paymentId"]
- isOneToOne: false
- referencedRelation: "purchasePayment"
- referencedColumns: ["id"]
- },
- ]
- }
- purchaseInvoicePriceChange: {
- Row: {
- id: string
- invoiceId: string
- invoiceLineId: string
- newPrice: number
- newQuantity: number
- previousPrice: number
- previousQuantity: number
- updatedBy: string
- }
- Insert: {
- id?: string
- invoiceId: string
- invoiceLineId: string
- newPrice?: number
- newQuantity?: number
- previousPrice?: number
- previousQuantity?: number
- updatedBy: string
- }
- Update: {
- id?: string
- invoiceId?: string
- invoiceLineId?: string
- newPrice?: number
- newQuantity?: number
- previousPrice?: number
- previousQuantity?: number
- updatedBy?: string
- }
- Relationships: [
{
- foreignKeyName: "purchaseInvoicePriceChange_invoiceId_fkey"
- columns: ["invoiceId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoice"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoicePriceChange_invoiceId_fkey"
- columns: ["invoiceId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoices"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoicePriceChange_invoiceLineId_fkey"
- columns: ["invoiceLineId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoiceLine"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ foreignKeyName: "process_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ foreignKeyName: "process_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ foreignKeyName: "process_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ foreignKeyName: "process_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ foreignKeyName: "process_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -11247,322 +11167,321 @@ export type Database = {
},
]
}
- purchaseInvoiceStatusHistory: {
- Row: {
- createdAt: string
- id: string
- invoiceId: string
- status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- }
- Insert: {
- createdAt?: string
- id?: string
- invoiceId: string
- status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- }
- Update: {
- createdAt?: string
- id?: string
- invoiceId?: string
- status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- }
- Relationships: [
- {
- foreignKeyName: "purchaseInvoiceStatusHistory_invoiceId_fkey"
- columns: ["invoiceId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoice"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoiceStatusHistory_invoiceId_fkey"
- columns: ["invoiceId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoices"
- referencedColumns: ["id"]
- },
- ]
- }
- purchaseOrder: {
+ purchaseInvoice: {
Row: {
assignee: string | null
- closedAt: string | null
- closedBy: string | null
+ balance: number
companyId: string
createdAt: string
createdBy: string
+ currencyCode: string
customFields: Json | null
+ dateDue: string | null
+ dateIssued: string | null
+ datePaid: string | null
+ exchangeRate: number
id: string
- notes: string | null
- orderDate: string
- purchaseOrderId: string
- revisionId: number
- status: Database["public"]["Enums"]["purchaseOrderStatus"]
- supplierContactId: string | null
- supplierId: string
- supplierLocationId: string | null
+ invoiceId: string
+ invoiceSupplierContactId: string | null
+ invoiceSupplierId: string | null
+ invoiceSupplierLocationId: string | null
+ paymentTermId: string | null
+ postingDate: string | null
+ status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
+ subtotal: number
+ supplierId: string | null
supplierReference: string | null
- type: Database["public"]["Enums"]["purchaseOrderType"]
+ totalAmount: number
+ totalDiscount: number
+ totalTax: number
updatedAt: string | null
updatedBy: string | null
}
Insert: {
assignee?: string | null
- closedAt?: string | null
- closedBy?: string | null
+ balance?: number
companyId: string
createdAt?: string
createdBy: string
+ currencyCode: string
customFields?: Json | null
+ dateDue?: string | null
+ dateIssued?: string | null
+ datePaid?: string | null
+ exchangeRate?: number
id?: string
- notes?: string | null
- orderDate?: string
- purchaseOrderId: string
- revisionId?: number
- status?: Database["public"]["Enums"]["purchaseOrderStatus"]
- supplierContactId?: string | null
- supplierId: string
- supplierLocationId?: string | null
+ invoiceId: string
+ invoiceSupplierContactId?: string | null
+ invoiceSupplierId?: string | null
+ invoiceSupplierLocationId?: string | null
+ paymentTermId?: string | null
+ postingDate?: string | null
+ status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
+ subtotal?: number
+ supplierId?: string | null
supplierReference?: string | null
- type: Database["public"]["Enums"]["purchaseOrderType"]
+ totalAmount?: number
+ totalDiscount?: number
+ totalTax?: number
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
assignee?: string | null
- closedAt?: string | null
- closedBy?: string | null
+ balance?: number
companyId?: string
createdAt?: string
createdBy?: string
+ currencyCode?: string
customFields?: Json | null
+ dateDue?: string | null
+ dateIssued?: string | null
+ datePaid?: string | null
+ exchangeRate?: number
id?: string
- notes?: string | null
- orderDate?: string
- purchaseOrderId?: string
- revisionId?: number
- status?: Database["public"]["Enums"]["purchaseOrderStatus"]
- supplierContactId?: string | null
- supplierId?: string
- supplierLocationId?: string | null
+ invoiceId?: string
+ invoiceSupplierContactId?: string | null
+ invoiceSupplierId?: string | null
+ invoiceSupplierLocationId?: string | null
+ paymentTermId?: string | null
+ postingDate?: string | null
+ status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
+ subtotal?: number
+ supplierId?: string | null
supplierReference?: string | null
- type?: Database["public"]["Enums"]["purchaseOrderType"]
+ totalAmount?: number
+ totalDiscount?: number
+ totalTax?: number
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchaseOrder_assignee_fkey"
+ foreignKeyName: "purchaseInvoice_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_assignee_fkey"
+ foreignKeyName: "purchaseInvoice_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_assignee_fkey"
+ foreignKeyName: "purchaseInvoice_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_assignee_fkey"
+ foreignKeyName: "purchaseInvoice_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_assignee_fkey"
+ foreignKeyName: "purchaseInvoice_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
+ foreignKeyName: "purchaseInvoice_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
+ foreignKeyName: "purchaseInvoice_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
+ foreignKeyName: "purchaseInvoice_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
+ foreignKeyName: "purchaseInvoice_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseInvoice_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoice_invoiceSupplierContactId_fkey"
+ columns: ["invoiceSupplierContactId"]
+ isOneToOne: false
+ referencedRelation: "supplierContact"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
+ isOneToOne: false
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierLocationId_fkey"
+ columns: ["invoiceSupplierLocationId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "supplierLocation"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_supplierContactId_fkey"
- columns: ["supplierContactId"]
+ foreignKeyName: "purchaseInvoice_paymentTermId_fkey"
+ columns: ["paymentTermId"]
isOneToOne: false
- referencedRelation: "supplierContact"
+ referencedRelation: "paymentTerm"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
+ foreignKeyName: "purchaseInvoice_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "contractors"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
+ foreignKeyName: "purchaseInvoice_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "partners"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
+ foreignKeyName: "purchaseInvoice_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
+ foreignKeyName: "purchaseInvoice_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
+ foreignKeyName: "purchaseInvoice_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_supplierLocationId_fkey"
- columns: ["supplierLocationId"]
- isOneToOne: false
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -11570,183 +11489,321 @@ export type Database = {
},
]
}
- purchaseOrderDelivery: {
+ purchaseInvoiceLine: {
Row: {
+ accountNumber: string | null
+ assetId: string | null
companyId: string
- customerId: string | null
- customerLocationId: string | null
+ conversionFactor: number | null
+ createdAt: string
+ createdBy: string
+ currencyCode: string
customFields: Json | null
- deliveryDate: string | null
- dropShipment: boolean
+ description: string | null
+ exchangeRate: number
id: string
+ inventoryUnitOfMeasureCode: string | null
+ invoiceId: string
+ invoiceLineType: Database["public"]["Enums"]["payableLineType"]
+ itemId: string | null
+ itemReadableId: string | null
locationId: string | null
- notes: string | null
- receiptPromisedDate: string | null
- receiptRequestedDate: string | null
- shippingMethodId: string | null
- shippingTermId: string | null
- trackingNumber: string | null
+ purchaseOrderId: string | null
+ purchaseOrderLineId: string | null
+ purchaseUnitOfMeasureCode: string | null
+ quantity: number
+ serviceId: string | null
+ shelfId: string | null
+ totalAmount: number | null
+ unitPrice: number
updatedAt: string | null
updatedBy: string | null
}
Insert: {
+ accountNumber?: string | null
+ assetId?: string | null
companyId: string
- customerId?: string | null
- customerLocationId?: string | null
+ conversionFactor?: number | null
+ createdAt?: string
+ createdBy: string
+ currencyCode: string
customFields?: Json | null
- deliveryDate?: string | null
- dropShipment?: boolean
- id: string
+ description?: string | null
+ exchangeRate?: number
+ id?: string
+ inventoryUnitOfMeasureCode?: string | null
+ invoiceId: string
+ invoiceLineType: Database["public"]["Enums"]["payableLineType"]
+ itemId?: string | null
+ itemReadableId?: string | null
locationId?: string | null
- notes?: string | null
- receiptPromisedDate?: string | null
- receiptRequestedDate?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- trackingNumber?: string | null
+ purchaseOrderId?: string | null
+ purchaseOrderLineId?: string | null
+ purchaseUnitOfMeasureCode?: string | null
+ quantity?: number
+ serviceId?: string | null
+ shelfId?: string | null
+ totalAmount?: number | null
+ unitPrice?: number
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
+ accountNumber?: string | null
+ assetId?: string | null
companyId?: string
- customerId?: string | null
- customerLocationId?: string | null
+ conversionFactor?: number | null
+ createdAt?: string
+ createdBy?: string
+ currencyCode?: string
customFields?: Json | null
- deliveryDate?: string | null
- dropShipment?: boolean
+ description?: string | null
+ exchangeRate?: number
id?: string
+ inventoryUnitOfMeasureCode?: string | null
+ invoiceId?: string
+ invoiceLineType?: Database["public"]["Enums"]["payableLineType"]
+ itemId?: string | null
+ itemReadableId?: string | null
locationId?: string | null
- notes?: string | null
- receiptPromisedDate?: string | null
- receiptRequestedDate?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- trackingNumber?: string | null
+ purchaseOrderId?: string | null
+ purchaseOrderLineId?: string | null
+ purchaseUnitOfMeasureCode?: string | null
+ quantity?: number
+ serviceId?: string | null
+ shelfId?: string | null
+ totalAmount?: number | null
+ unitPrice?: number
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "purchaseInvoiceLines_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
isOneToOne: false
- referencedRelation: "customer"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "purchaseInvoiceLines_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
isOneToOne: false
- referencedRelation: "customers"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_customerLocationId_fkey"
- columns: ["customerLocationId"]
+ foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "customerLocation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseOrderDelivery_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "purchaseOrder"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "purchaseOrderLocations"
+ foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "purchaseOrders"
+ foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_inventoryUnitOfMeasureCode_fkey"
+ columns: ["inventoryUnitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_invoiceId_fkey"
+ columns: ["invoiceId"]
+ isOneToOne: false
+ referencedRelation: "purchaseInvoice"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_invoiceId_fkey"
+ columns: ["invoiceId"]
+ isOneToOne: false
+ referencedRelation: "purchaseInvoices"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "itemQuantities"
referencedColumns: ["locationId"]
},
{
- foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "purchaseOrders"
referencedColumns: ["locationId"]
},
{
- foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "salesOrders"
referencedColumns: ["locationId"]
},
{
- foreignKeyName: "purchaseOrderDelivery_shippingMethodId_fkey"
- columns: ["shippingMethodId"]
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "shippingMethod"
+ referencedRelation: "purchaseOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_shippingTermId_fkey"
- columns: ["shippingTermId"]
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "shippingTerm"
+ referencedRelation: "purchaseOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderLineId_fkey"
+ columns: ["purchaseOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderLine"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderLineId_fkey"
+ columns: ["purchaseOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_purchaseUnitOfMeasureCode_fkey"
+ columns: ["purchaseUnitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_shelfId_fkey"
+ columns: ["shelfId", "locationId"]
+ isOneToOne: false
+ referencedRelation: "shelf"
+ referencedColumns: ["id", "locationId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -11754,308 +11811,452 @@ export type Database = {
},
]
}
- purchaseOrderFavorite: {
+ purchaseInvoicePaymentRelation: {
Row: {
- purchaseOrderId: string
- userId: string
+ id: string
+ invoiceId: string
+ paymentId: string
}
Insert: {
- purchaseOrderId: string
- userId: string
+ id?: string
+ invoiceId: string
+ paymentId: string
}
Update: {
- purchaseOrderId?: string
- userId?: string
+ id?: string
+ invoiceId?: string
+ paymentId?: string
}
Relationships: [
{
- foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "purchasePayments_invoiceId_fkey"
+ columns: ["invoiceId"]
isOneToOne: false
- referencedRelation: "purchaseOrder"
+ referencedRelation: "purchaseInvoice"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "purchasePayments_invoiceId_fkey"
+ columns: ["invoiceId"]
isOneToOne: false
- referencedRelation: "purchaseOrderLocations"
+ referencedRelation: "purchaseInvoices"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "purchasePayments_paymentId_fkey"
+ columns: ["paymentId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
+ referencedRelation: "purchasePayment"
referencedColumns: ["id"]
},
+ ]
+ }
+ purchaseInvoicePriceChange: {
+ Row: {
+ id: string
+ invoiceId: string
+ invoiceLineId: string
+ newPrice: number
+ newQuantity: number
+ previousPrice: number
+ previousQuantity: number
+ updatedBy: string
+ }
+ Insert: {
+ id?: string
+ invoiceId: string
+ invoiceLineId: string
+ newPrice?: number
+ newQuantity?: number
+ previousPrice?: number
+ previousQuantity?: number
+ updatedBy: string
+ }
+ Update: {
+ id?: string
+ invoiceId?: string
+ invoiceLineId?: string
+ newPrice?: number
+ newQuantity?: number
+ previousPrice?: number
+ previousQuantity?: number
+ updatedBy?: string
+ }
+ Relationships: [
{
- foreignKeyName: "purchaseOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchaseInvoicePriceChange_invoiceId_fkey"
+ columns: ["invoiceId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "purchaseInvoice"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchaseInvoicePriceChange_invoiceId_fkey"
+ columns: ["invoiceId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "purchaseInvoices"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchaseInvoicePriceChange_invoiceLineId_fkey"
+ columns: ["invoiceLineId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "purchaseInvoiceLine"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "userDefaults"
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- purchaseOrderLine: {
+ purchaseInvoiceStatusHistory: {
Row: {
- accountNumber: string | null
- assetId: string | null
+ createdAt: string
+ id: string
+ invoiceId: string
+ status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
+ }
+ Insert: {
+ createdAt?: string
+ id?: string
+ invoiceId: string
+ status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
+ }
+ Update: {
+ createdAt?: string
+ id?: string
+ invoiceId?: string
+ status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
+ }
+ Relationships: [
+ {
+ foreignKeyName: "purchaseInvoiceStatusHistory_invoiceId_fkey"
+ columns: ["invoiceId"]
+ isOneToOne: false
+ referencedRelation: "purchaseInvoice"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceStatusHistory_invoiceId_fkey"
+ columns: ["invoiceId"]
+ isOneToOne: false
+ referencedRelation: "purchaseInvoices"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
+ purchaseOrder: {
+ Row: {
+ assignee: string | null
+ closedAt: string | null
+ closedBy: string | null
companyId: string
- conversionFactor: number | null
createdAt: string
createdBy: string
customFields: Json | null
- description: string | null
id: string
- inventoryUnitOfMeasureCode: string | null
- invoicedComplete: boolean
- itemId: string | null
- itemReadableId: string | null
- locationId: string | null
+ notes: string | null
+ orderDate: string
purchaseOrderId: string
- purchaseOrderLineType: Database["public"]["Enums"]["purchaseOrderLineType"]
- purchaseQuantity: number | null
- purchaseUnitOfMeasureCode: string | null
- quantityInvoiced: number | null
- quantityReceived: number | null
- quantityToInvoice: number | null
- quantityToReceive: number | null
- receivedComplete: boolean
- requiresInspection: boolean
- setupPrice: number | null
- shelfId: string | null
- unitPrice: number | null
+ revisionId: number
+ status: Database["public"]["Enums"]["purchaseOrderStatus"]
+ supplierContactId: string | null
+ supplierId: string
+ supplierLocationId: string | null
+ supplierReference: string | null
+ type: Database["public"]["Enums"]["purchaseOrderType"]
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- accountNumber?: string | null
- assetId?: string | null
+ assignee?: string | null
+ closedAt?: string | null
+ closedBy?: string | null
companyId: string
- conversionFactor?: number | null
createdAt?: string
createdBy: string
customFields?: Json | null
- description?: string | null
id?: string
- inventoryUnitOfMeasureCode?: string | null
- invoicedComplete?: boolean
- itemId?: string | null
- itemReadableId?: string | null
- locationId?: string | null
+ notes?: string | null
+ orderDate?: string
purchaseOrderId: string
- purchaseOrderLineType: Database["public"]["Enums"]["purchaseOrderLineType"]
- purchaseQuantity?: number | null
- purchaseUnitOfMeasureCode?: string | null
- quantityInvoiced?: number | null
- quantityReceived?: number | null
- quantityToInvoice?: number | null
- quantityToReceive?: number | null
- receivedComplete?: boolean
- requiresInspection?: boolean
- setupPrice?: number | null
- shelfId?: string | null
- unitPrice?: number | null
+ revisionId?: number
+ status?: Database["public"]["Enums"]["purchaseOrderStatus"]
+ supplierContactId?: string | null
+ supplierId: string
+ supplierLocationId?: string | null
+ supplierReference?: string | null
+ type: Database["public"]["Enums"]["purchaseOrderType"]
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- accountNumber?: string | null
- assetId?: string | null
+ assignee?: string | null
+ closedAt?: string | null
+ closedBy?: string | null
companyId?: string
- conversionFactor?: number | null
createdAt?: string
createdBy?: string
customFields?: Json | null
- description?: string | null
id?: string
- inventoryUnitOfMeasureCode?: string | null
- invoicedComplete?: boolean
- itemId?: string | null
- itemReadableId?: string | null
- locationId?: string | null
+ notes?: string | null
+ orderDate?: string
purchaseOrderId?: string
- purchaseOrderLineType?: Database["public"]["Enums"]["purchaseOrderLineType"]
- purchaseQuantity?: number | null
- purchaseUnitOfMeasureCode?: string | null
- quantityInvoiced?: number | null
- quantityReceived?: number | null
- quantityToInvoice?: number | null
- quantityToReceive?: number | null
- receivedComplete?: boolean
- requiresInspection?: boolean
- setupPrice?: number | null
- shelfId?: string | null
- unitPrice?: number | null
+ revisionId?: number
+ status?: Database["public"]["Enums"]["purchaseOrderStatus"]
+ supplierContactId?: string | null
+ supplierId?: string
+ supplierLocationId?: string | null
+ supplierReference?: string | null
+ type?: Database["public"]["Enums"]["purchaseOrderType"]
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchaseOrderLine_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "purchaseOrderLine_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "purchaseOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "purchaseOrderLine_inventoryUnitOfMeasureCode_fkey"
- columns: ["inventoryUnitOfMeasureCode", "companyId"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey"
+ columns: ["closedBy"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey"
+ columns: ["closedBy"]
isOneToOne: false
- referencedRelation: "item"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey"
+ columns: ["closedBy"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey"
+ columns: ["closedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrder"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey"
+ columns: ["closedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrderLocations"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "purchaseOrder_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_purchaseUnitOfMeasureCode_fkey"
- columns: ["purchaseUnitOfMeasureCode", "companyId"]
+ foreignKeyName: "purchaseOrder_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "company"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_shelfId_fkey"
- columns: ["shelfId", "locationId"]
+ foreignKeyName: "purchaseOrder_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "purchaseOrder_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
+ foreignKeyName: "purchaseOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierContactId_fkey"
+ columns: ["supplierContactId"]
+ isOneToOne: false
+ referencedRelation: "supplierContact"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: false
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: false
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderSuppliers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: false
+ referencedRelation: "supplier"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: false
+ referencedRelation: "suppliers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierLocationId_fkey"
+ columns: ["supplierLocationId"]
+ isOneToOne: false
+ referencedRelation: "supplierLocation"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
+ foreignKeyName: "purchaseOrder_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
+ foreignKeyName: "purchaseOrder_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
+ foreignKeyName: "purchaseOrder_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -12063,288 +12264,255 @@ export type Database = {
},
]
}
- purchaseOrderPayment: {
+ purchaseOrderDelivery: {
Row: {
companyId: string
- currencyCode: string
+ customerId: string | null
+ customerLocationId: string | null
customFields: Json | null
+ deliveryDate: string | null
+ dropShipment: boolean
id: string
- invoiceSupplierContactId: string | null
- invoiceSupplierId: string | null
- invoiceSupplierLocationId: string | null
- paymentComplete: boolean
- paymentTermId: string | null
+ locationId: string | null
+ notes: string | null
+ receiptPromisedDate: string | null
+ receiptRequestedDate: string | null
+ shippingMethodId: string | null
+ shippingTermId: string | null
+ trackingNumber: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
companyId: string
- currencyCode?: string
+ customerId?: string | null
+ customerLocationId?: string | null
customFields?: Json | null
+ deliveryDate?: string | null
+ dropShipment?: boolean
id: string
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentComplete?: boolean
- paymentTermId?: string | null
+ locationId?: string | null
+ notes?: string | null
+ receiptPromisedDate?: string | null
+ receiptRequestedDate?: string | null
+ shippingMethodId?: string | null
+ shippingTermId?: string | null
+ trackingNumber?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
companyId?: string
- currencyCode?: string
+ customerId?: string | null
+ customerLocationId?: string | null
customFields?: Json | null
+ deliveryDate?: string | null
+ dropShipment?: boolean
id?: string
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentComplete?: boolean
- paymentTermId?: string | null
+ locationId?: string | null
+ notes?: string | null
+ receiptPromisedDate?: string | null
+ receiptRequestedDate?: string | null
+ shippingMethodId?: string | null
+ shippingTermId?: string | null
+ trackingNumber?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchaseOrderPayment_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
+ foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_id_fkey"
+ foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderCustomers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrderDelivery_customerLocationId_fkey"
+ columns: ["customerLocationId"]
+ isOneToOne: false
+ referencedRelation: "customerLocation"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrderDelivery_id_fkey"
columns: ["id"]
isOneToOne: true
referencedRelation: "purchaseOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_id_fkey"
+ foreignKeyName: "purchaseOrderDelivery_id_fkey"
columns: ["id"]
isOneToOne: true
referencedRelation: "purchaseOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_id_fkey"
+ foreignKeyName: "purchaseOrderDelivery_id_fkey"
columns: ["id"]
isOneToOne: true
referencedRelation: "purchaseOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierContactId_fkey"
- columns: ["invoiceSupplierContactId"]
+ foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "supplierContact"
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "purchaseOrderDelivery_shippingMethodId_fkey"
+ columns: ["shippingMethodId"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
+ referencedRelation: "shippingMethod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "purchaseOrderDelivery_shippingTermId_fkey"
+ columns: ["shippingTermId"]
isOneToOne: false
- referencedRelation: "supplier"
+ referencedRelation: "shippingTerm"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "suppliers"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierLocationId_fkey"
- columns: ["invoiceSupplierLocationId"]
+ foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "supplierLocation"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_paymentTermId_fkey"
- columns: ["paymentTermId"]
+ foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "paymentTerm"
- referencedColumns: ["id"]
- },
- ]
- }
- purchaseOrderStatusHistory: {
- Row: {
- createdAt: string
- createdBy: string
- id: string
- purchaseOrderId: string
- status: Database["public"]["Enums"]["purchaseOrderStatus"]
- }
- Insert: {
- createdAt?: string
- createdBy: string
- id?: string
- purchaseOrderId: string
- status: Database["public"]["Enums"]["purchaseOrderStatus"]
- }
- Update: {
- createdAt?: string
- createdBy?: string
- id?: string
- purchaseOrderId?: string
- status?: Database["public"]["Enums"]["purchaseOrderStatus"]
- }
- Relationships: [
- {
- foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- isOneToOne: false
- referencedRelation: "purchaseOrder"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- isOneToOne: false
- referencedRelation: "purchaseOrderLocations"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["id"]
- },
]
}
- purchaseOrderTransaction: {
+ purchaseOrderFavorite: {
Row: {
- createdAt: string
- id: string
purchaseOrderId: string
- type: Database["public"]["Enums"]["purchaseOrderTransactionType"]
userId: string
}
Insert: {
- createdAt?: string
- id?: string
purchaseOrderId: string
- type: Database["public"]["Enums"]["purchaseOrderTransactionType"]
userId: string
}
Update: {
- createdAt?: string
- id?: string
purchaseOrderId?: string
- type?: Database["public"]["Enums"]["purchaseOrderTransactionType"]
userId?: string
}
Relationships: [
{
- foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
columns: ["purchaseOrderId"]
isOneToOne: false
referencedRelation: "purchaseOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
columns: ["purchaseOrderId"]
isOneToOne: false
referencedRelation: "purchaseOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
columns: ["purchaseOrderId"]
isOneToOne: false
referencedRelation: "purchaseOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -12352,188 +12520,236 @@ export type Database = {
},
]
}
- purchasePayment: {
+ purchaseOrderLine: {
Row: {
+ accountNumber: string | null
+ assetId: string | null
companyId: string
+ conversionFactor: number | null
createdAt: string
createdBy: string
- currencyCode: string
customFields: Json | null
- exchangeRate: number
+ description: string | null
id: string
- paymentDate: string | null
- paymentId: string
- supplierId: string
- totalAmount: number
+ inventoryUnitOfMeasureCode: string | null
+ invoicedComplete: boolean
+ itemId: string | null
+ itemReadableId: string | null
+ locationId: string | null
+ purchaseOrderId: string
+ purchaseOrderLineType: Database["public"]["Enums"]["purchaseOrderLineType"]
+ purchaseQuantity: number | null
+ purchaseUnitOfMeasureCode: string | null
+ quantityInvoiced: number | null
+ quantityReceived: number | null
+ quantityToInvoice: number | null
+ quantityToReceive: number | null
+ receivedComplete: boolean
+ requiresInspection: boolean
+ setupPrice: number | null
+ shelfId: string | null
+ unitPrice: number | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
+ accountNumber?: string | null
+ assetId?: string | null
companyId: string
+ conversionFactor?: number | null
createdAt?: string
createdBy: string
- currencyCode: string
customFields?: Json | null
- exchangeRate?: number
+ description?: string | null
id?: string
- paymentDate?: string | null
- paymentId: string
- supplierId: string
- totalAmount?: number
+ inventoryUnitOfMeasureCode?: string | null
+ invoicedComplete?: boolean
+ itemId?: string | null
+ itemReadableId?: string | null
+ locationId?: string | null
+ purchaseOrderId: string
+ purchaseOrderLineType: Database["public"]["Enums"]["purchaseOrderLineType"]
+ purchaseQuantity?: number | null
+ purchaseUnitOfMeasureCode?: string | null
+ quantityInvoiced?: number | null
+ quantityReceived?: number | null
+ quantityToInvoice?: number | null
+ quantityToReceive?: number | null
+ receivedComplete?: boolean
+ requiresInspection?: boolean
+ setupPrice?: number | null
+ shelfId?: string | null
+ unitPrice?: number | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
+ accountNumber?: string | null
+ assetId?: string | null
companyId?: string
+ conversionFactor?: number | null
createdAt?: string
createdBy?: string
- currencyCode?: string
customFields?: Json | null
- exchangeRate?: number
+ description?: string | null
id?: string
- paymentDate?: string | null
- paymentId?: string
- supplierId?: string
- totalAmount?: number
+ inventoryUnitOfMeasureCode?: string | null
+ invoicedComplete?: boolean
+ itemId?: string | null
+ itemReadableId?: string | null
+ locationId?: string | null
+ purchaseOrderId?: string
+ purchaseOrderLineType?: Database["public"]["Enums"]["purchaseOrderLineType"]
+ purchaseQuantity?: number | null
+ purchaseUnitOfMeasureCode?: string | null
+ quantityInvoiced?: number | null
+ quantityReceived?: number | null
+ quantityToInvoice?: number | null
+ quantityToReceive?: number | null
+ receivedComplete?: boolean
+ requiresInspection?: boolean
+ setupPrice?: number | null
+ shelfId?: string | null
+ unitPrice?: number | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchasePayment_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchasePayment_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchasePayment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseOrderLine_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchasePayment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseOrderLine_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchasePayment_createdBy_fkey"
+ foreignKeyName: "purchaseOrderLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_createdBy_fkey"
+ foreignKeyName: "purchaseOrderLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_createdBy_fkey"
+ foreignKeyName: "purchaseOrderLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_createdBy_fkey"
+ foreignKeyName: "purchaseOrderLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_createdBy_fkey"
+ foreignKeyName: "purchaseOrderLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "purchasePayment_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
+ foreignKeyName: "purchaseOrderLine_inventoryUnitOfMeasureCode_fkey"
+ columns: ["inventoryUnitOfMeasureCode", "companyId"]
isOneToOne: false
- referencedRelation: "currency"
+ referencedRelation: "unitOfMeasure"
referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "purchaseOrderLine_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "item"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "purchaseOrderLine_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
+ referencedRelation: "purchaseOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "supplier"
+ referencedRelation: "purchaseOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
- isOneToOne: false
- referencedRelation: "suppliers"
+ foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_updatedBy_fkey"
+ foreignKeyName: "purchaseOrderLine_purchaseUnitOfMeasureCode_fkey"
+ columns: ["purchaseUnitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "purchaseOrderLine_shelfId_fkey"
+ columns: ["shelfId", "locationId"]
+ isOneToOne: false
+ referencedRelation: "shelf"
+ referencedColumns: ["id", "locationId"]
+ },
+ {
+ foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_updatedBy_fkey"
+ foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_updatedBy_fkey"
+ foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_updatedBy_fkey"
+ foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_updatedBy_fkey"
+ foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -12541,664 +12757,819 @@ export type Database = {
},
]
}
- quote: {
+ purchaseOrderPayment: {
Row: {
- assignee: string | null
companyId: string
- createdAt: string
- createdBy: string
- customerContactId: string | null
- customerId: string
- customerLocationId: string | null
- customerReference: string | null
+ currencyCode: string
customFields: Json | null
- dueDate: string | null
- estimatorId: string | null
- expirationDate: string | null
- externalNotes: Json | null
id: string
- internalNotes: Json | null
- locationId: string | null
- quoteId: string
- revisionId: number
- salesPersonId: string | null
- status: Database["public"]["Enums"]["quoteStatus"]
+ invoiceSupplierContactId: string | null
+ invoiceSupplierId: string | null
+ invoiceSupplierLocationId: string | null
+ paymentComplete: boolean
+ paymentTermId: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- assignee?: string | null
companyId: string
- createdAt?: string
- createdBy: string
- customerContactId?: string | null
- customerId: string
- customerLocationId?: string | null
- customerReference?: string | null
+ currencyCode?: string
customFields?: Json | null
- dueDate?: string | null
- estimatorId?: string | null
- expirationDate?: string | null
- externalNotes?: Json | null
- id?: string
- internalNotes?: Json | null
- locationId?: string | null
- quoteId: string
- revisionId?: number
- salesPersonId?: string | null
- status?: Database["public"]["Enums"]["quoteStatus"]
+ id: string
+ invoiceSupplierContactId?: string | null
+ invoiceSupplierId?: string | null
+ invoiceSupplierLocationId?: string | null
+ paymentComplete?: boolean
+ paymentTermId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- assignee?: string | null
companyId?: string
- createdAt?: string
- createdBy?: string
- customerContactId?: string | null
- customerId?: string
- customerLocationId?: string | null
- customerReference?: string | null
+ currencyCode?: string
customFields?: Json | null
- dueDate?: string | null
- estimatorId?: string | null
- expirationDate?: string | null
- externalNotes?: Json | null
id?: string
- internalNotes?: Json | null
- locationId?: string | null
- quoteId?: string
- revisionId?: number
- salesPersonId?: string | null
- status?: Database["public"]["Enums"]["quoteStatus"]
+ invoiceSupplierContactId?: string | null
+ invoiceSupplierId?: string | null
+ invoiceSupplierLocationId?: string | null
+ paymentComplete?: boolean
+ paymentTermId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "quote_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "purchaseOrderPayment_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "purchaseOrderPayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "purchaseOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ foreignKeyName: "purchaseOrderPayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "purchaseOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
+ foreignKeyName: "purchaseOrderPayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "purchaseOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierContactId_fkey"
+ columns: ["invoiceSupplierContactId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "supplierContact"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "quote_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
+ },
+ {
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "suppliers"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierLocationId_fkey"
+ columns: ["invoiceSupplierLocationId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "supplierLocation"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_createdBy_fkey"
+ foreignKeyName: "purchaseOrderPayment_paymentTermId_fkey"
+ columns: ["paymentTermId"]
+ isOneToOne: false
+ referencedRelation: "paymentTerm"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
+ purchaseOrderStatusHistory: {
+ Row: {
+ createdAt: string
+ createdBy: string
+ id: string
+ purchaseOrderId: string
+ status: Database["public"]["Enums"]["purchaseOrderStatus"]
+ }
+ Insert: {
+ createdAt?: string
+ createdBy: string
+ id?: string
+ purchaseOrderId: string
+ status: Database["public"]["Enums"]["purchaseOrderStatus"]
+ }
+ Update: {
+ createdAt?: string
+ createdBy?: string
+ id?: string
+ purchaseOrderId?: string
+ status?: Database["public"]["Enums"]["purchaseOrderStatus"]
+ }
+ Relationships: [
+ {
+ foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_createdBy_fkey"
+ foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_createdBy_fkey"
+ foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_createdBy_fkey"
+ foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_createdBy_fkey"
+ foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quote_customerContactId_fkey"
- columns: ["customerContactId"]
- isOneToOne: false
- referencedRelation: "customerContact"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quote_customerId_fkey"
- columns: ["customerId"]
- isOneToOne: false
- referencedRelation: "customer"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quote_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "customers"
+ referencedRelation: "purchaseOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
+ referencedRelation: "purchaseOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_customerLocationId_fkey"
- columns: ["customerLocationId"]
+ foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "customerLocation"
+ referencedRelation: "purchaseOrders"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "quote_estimatorId_fkey"
- columns: ["estimatorId"]
+ ]
+ }
+ purchaseOrderTransaction: {
+ Row: {
+ createdAt: string
+ id: string
+ purchaseOrderId: string
+ type: Database["public"]["Enums"]["purchaseOrderTransactionType"]
+ userId: string
+ }
+ Insert: {
+ createdAt?: string
+ id?: string
+ purchaseOrderId: string
+ type: Database["public"]["Enums"]["purchaseOrderTransactionType"]
+ userId: string
+ }
+ Update: {
+ createdAt?: string
+ id?: string
+ purchaseOrderId?: string
+ type?: Database["public"]["Enums"]["purchaseOrderTransactionType"]
+ userId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrder"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderLocations"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_estimatorId_fkey"
- columns: ["estimatorId"]
+ foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_estimatorId_fkey"
- columns: ["estimatorId"]
+ foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_estimatorId_fkey"
- columns: ["estimatorId"]
+ foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_estimatorId_fkey"
- columns: ["estimatorId"]
+ foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ purchasePayment: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ currencyCode: string
+ customFields: Json | null
+ exchangeRate: number
+ id: string
+ paymentDate: string | null
+ paymentId: string
+ supplierId: string
+ totalAmount: number
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ currencyCode: string
+ customFields?: Json | null
+ exchangeRate?: number
+ id?: string
+ paymentDate?: string | null
+ paymentId: string
+ supplierId: string
+ totalAmount?: number
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ currencyCode?: string
+ customFields?: Json | null
+ exchangeRate?: number
+ id?: string
+ paymentDate?: string | null
+ paymentId?: string
+ supplierId?: string
+ totalAmount?: number
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "quote_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "purchasePayment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "purchasePayment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "purchasePayment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quote_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "purchasePayment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quote_salesPersonId_fkey"
- columns: ["salesPersonId"]
+ foreignKeyName: "purchasePayment_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_salesPersonId_fkey"
- columns: ["salesPersonId"]
+ foreignKeyName: "purchasePayment_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_salesPersonId_fkey"
- columns: ["salesPersonId"]
+ foreignKeyName: "purchasePayment_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_salesPersonId_fkey"
- columns: ["salesPersonId"]
+ foreignKeyName: "purchasePayment_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_salesPersonId_fkey"
- columns: ["salesPersonId"]
+ foreignKeyName: "purchasePayment_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quote_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "purchasePayment_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "quote_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "purchasePayment_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "quote_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "purchasePayment_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "quote_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "purchasePayment_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
- quoteFavorite: {
- Row: {
- quoteId: string
- userId: string
- }
- Insert: {
- quoteId: string
- userId: string
- }
- Update: {
- quoteId?: string
- userId?: string
- }
- Relationships: [
- {
- foreignKeyName: "quoteFavorites_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "purchasePayment_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "quote"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteFavorites_quoteId_fkey"
- columns: ["quoteId"]
- isOneToOne: false
- referencedRelation: "quoteCustomerDetails"
- referencedColumns: ["quoteId"]
- },
- {
- foreignKeyName: "quoteFavorites_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "purchasePayment_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "quotes"
+ referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchasePayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchasePayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchasePayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchasePayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteFavorites_userId_fkey"
- columns: ["userId"]
- isOneToOne: false
+ foreignKeyName: "purchasePayment_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- quoteLine: {
+ quote: {
Row: {
- additionalCharges: Json | null
+ assignee: string | null
companyId: string
+ createdAt: string
createdBy: string
- customerPartId: string | null
- customerPartRevision: string | null
+ customerContactId: string | null
+ customerId: string
+ customerLocationId: string | null
+ customerReference: string | null
customFields: Json | null
- description: string
+ dueDate: string | null
estimatorId: string | null
+ expirationDate: string | null
+ externalNotes: Json | null
id: string
- itemId: string
- itemReadableId: string | null
- itemType: string
- methodType: Database["public"]["Enums"]["methodType"]
- modelUploadId: string | null
- notes: Json | null
- quantity: number[] | null
+ internalNotes: Json | null
+ locationId: string | null
quoteId: string
- quoteRevisionId: number
- status: Database["public"]["Enums"]["quoteLineStatus"]
- unitOfMeasureCode: string | null
+ revisionId: number
+ salesPersonId: string | null
+ status: Database["public"]["Enums"]["quoteStatus"]
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- additionalCharges?: Json | null
+ assignee?: string | null
companyId: string
+ createdAt?: string
createdBy: string
- customerPartId?: string | null
- customerPartRevision?: string | null
+ customerContactId?: string | null
+ customerId: string
+ customerLocationId?: string | null
+ customerReference?: string | null
customFields?: Json | null
- description: string
+ dueDate?: string | null
estimatorId?: string | null
+ expirationDate?: string | null
+ externalNotes?: Json | null
id?: string
- itemId: string
- itemReadableId?: string | null
- itemType?: string
- methodType?: Database["public"]["Enums"]["methodType"]
- modelUploadId?: string | null
- notes?: Json | null
- quantity?: number[] | null
+ internalNotes?: Json | null
+ locationId?: string | null
quoteId: string
- quoteRevisionId?: number
- status?: Database["public"]["Enums"]["quoteLineStatus"]
- unitOfMeasureCode?: string | null
+ revisionId?: number
+ salesPersonId?: string | null
+ status?: Database["public"]["Enums"]["quoteStatus"]
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- additionalCharges?: Json | null
+ assignee?: string | null
companyId?: string
+ createdAt?: string
createdBy?: string
- customerPartId?: string | null
- customerPartRevision?: string | null
+ customerContactId?: string | null
+ customerId?: string
+ customerLocationId?: string | null
+ customerReference?: string | null
customFields?: Json | null
- description?: string
+ dueDate?: string | null
estimatorId?: string | null
+ expirationDate?: string | null
+ externalNotes?: Json | null
id?: string
- itemId?: string
- itemReadableId?: string | null
- itemType?: string
- methodType?: Database["public"]["Enums"]["methodType"]
- modelUploadId?: string | null
- notes?: Json | null
- quantity?: number[] | null
+ internalNotes?: Json | null
+ locationId?: string | null
quoteId?: string
- quoteRevisionId?: number
- status?: Database["public"]["Enums"]["quoteLineStatus"]
- unitOfMeasureCode?: string | null
+ revisionId?: number
+ salesPersonId?: string | null
+ status?: Database["public"]["Enums"]["quoteStatus"]
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "quoteLine_companyId_fkey"
+ foreignKeyName: "quote_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "quote_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_companyId_fkey"
+ foreignKeyName: "quote_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_companyId_fkey"
+ foreignKeyName: "quote_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quoteLine_companyId_fkey"
+ foreignKeyName: "quote_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quoteLine_createdBy_fkey"
+ foreignKeyName: "quote_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_createdBy_fkey"
+ foreignKeyName: "quote_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_createdBy_fkey"
+ foreignKeyName: "quote_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_createdBy_fkey"
+ foreignKeyName: "quote_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_createdBy_fkey"
+ foreignKeyName: "quote_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quoteLine_estimatorId_fkey"
+ foreignKeyName: "quote_customerContactId_fkey"
+ columns: ["customerContactId"]
+ isOneToOne: false
+ referencedRelation: "customerContact"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderCustomers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_customerLocationId_fkey"
+ columns: ["customerLocationId"]
+ isOneToOne: false
+ referencedRelation: "customerLocation"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_estimatorId_fkey"
columns: ["estimatorId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_estimatorId_fkey"
+ foreignKeyName: "quote_estimatorId_fkey"
columns: ["estimatorId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_estimatorId_fkey"
+ foreignKeyName: "quote_estimatorId_fkey"
columns: ["estimatorId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_estimatorId_fkey"
+ foreignKeyName: "quote_estimatorId_fkey"
columns: ["estimatorId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_estimatorId_fkey"
+ foreignKeyName: "quote_estimatorId_fkey"
columns: ["estimatorId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quoteLine_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "quote_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "item"
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "quote_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "quote_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "quoteLine_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "quote_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "quote"
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "quote_salesPersonId_fkey"
+ columns: ["salesPersonId"]
+ isOneToOne: false
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "quote_salesPersonId_fkey"
+ columns: ["salesPersonId"]
isOneToOne: false
- referencedRelation: "quoteCustomerDetails"
- referencedColumns: ["quoteId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "quote_salesPersonId_fkey"
+ columns: ["salesPersonId"]
isOneToOne: false
- referencedRelation: "quotes"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode", "companyId"]
+ foreignKeyName: "quote_salesPersonId_fkey"
+ columns: ["salesPersonId"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_updatedBy_fkey"
+ foreignKeyName: "quote_salesPersonId_fkey"
+ columns: ["salesPersonId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "quote_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_updatedBy_fkey"
+ foreignKeyName: "quote_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_updatedBy_fkey"
+ foreignKeyName: "quote_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_updatedBy_fkey"
+ foreignKeyName: "quote_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_updatedBy_fkey"
+ foreignKeyName: "quote_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -13206,351 +13577,322 @@ export type Database = {
},
]
}
- quoteLinePrice: {
+ quoteFavorite: {
Row: {
- createdAt: string
- createdBy: string
- discountPercent: number
- leadTime: number
- quantity: number
quoteId: string
- quoteLineId: string
- unitPrice: number
- updatedAt: string | null
- updatedBy: string | null
+ userId: string
}
Insert: {
- createdAt?: string
- createdBy: string
- discountPercent?: number
- leadTime?: number
- quantity?: number
quoteId: string
- quoteLineId: string
- unitPrice?: number
- updatedAt?: string | null
- updatedBy?: string | null
+ userId: string
}
Update: {
- createdAt?: string
- createdBy?: string
- discountPercent?: number
- leadTime?: number
- quantity?: number
quoteId?: string
- quoteLineId?: string
- unitPrice?: number
- updatedAt?: string | null
- updatedBy?: string | null
+ userId?: string
}
Relationships: [
{
- foreignKeyName: "quoteLinePrice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteLinePrice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteLinePrice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteLinePrice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteLinePrice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "quoteLinePrice_quoteId_fkey"
+ foreignKeyName: "quoteFavorites_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLinePrice_quoteId_fkey"
+ foreignKeyName: "quoteFavorites_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quoteCustomerDetails"
referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "quoteLinePrice_quoteId_fkey"
+ foreignKeyName: "quoteFavorites_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLinePrice_quoteLineId_fkey"
- columns: ["quoteLineId"]
- isOneToOne: false
- referencedRelation: "quoteLine"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteLinePrice_quoteLineId_fkey"
- columns: ["quoteLineId"]
- isOneToOne: false
- referencedRelation: "quoteLines"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteLinePrice_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "quoteFavorites_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLinePrice_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "quoteFavorites_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLinePrice_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "quoteFavorites_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLinePrice_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "quoteFavorites_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLinePrice_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "quoteFavorites_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- quoteMakeMethod: {
+ quoteLine: {
Row: {
+ additionalCharges: Json | null
companyId: string
- createdAt: string
createdBy: string
+ customerPartId: string | null
+ customerPartRevision: string | null
customFields: Json | null
+ description: string
+ estimatorId: string | null
id: string
itemId: string
- parentMaterialId: string | null
- quantityPerParent: number
+ itemReadableId: string | null
+ itemType: string
+ methodType: Database["public"]["Enums"]["methodType"]
+ modelUploadId: string | null
+ notes: Json | null
+ quantity: number[] | null
quoteId: string
- quoteLineId: string
+ quoteRevisionId: number
+ status: Database["public"]["Enums"]["quoteLineStatus"]
+ unitOfMeasureCode: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
+ additionalCharges?: Json | null
companyId: string
- createdAt?: string
createdBy: string
+ customerPartId?: string | null
+ customerPartRevision?: string | null
customFields?: Json | null
+ description: string
+ estimatorId?: string | null
id?: string
itemId: string
- parentMaterialId?: string | null
- quantityPerParent?: number
+ itemReadableId?: string | null
+ itemType?: string
+ methodType?: Database["public"]["Enums"]["methodType"]
+ modelUploadId?: string | null
+ notes?: Json | null
+ quantity?: number[] | null
quoteId: string
- quoteLineId: string
+ quoteRevisionId?: number
+ status?: Database["public"]["Enums"]["quoteLineStatus"]
+ unitOfMeasureCode?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
+ additionalCharges?: Json | null
companyId?: string
- createdAt?: string
createdBy?: string
+ customerPartId?: string | null
+ customerPartRevision?: string | null
customFields?: Json | null
+ description?: string
+ estimatorId?: string | null
id?: string
itemId?: string
- parentMaterialId?: string | null
- quantityPerParent?: number
+ itemReadableId?: string | null
+ itemType?: string
+ methodType?: Database["public"]["Enums"]["methodType"]
+ modelUploadId?: string | null
+ notes?: Json | null
+ quantity?: number[] | null
quoteId?: string
- quoteLineId?: string
+ quoteRevisionId?: number
+ status?: Database["public"]["Enums"]["quoteLineStatus"]
+ unitOfMeasureCode?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "quoteMakeMethod_companyId_fkey"
+ foreignKeyName: "quoteLine_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_companyId_fkey"
+ foreignKeyName: "quoteLine_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_companyId_fkey"
+ foreignKeyName: "quoteLine_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quoteMakeMethod_companyId_fkey"
+ foreignKeyName: "quoteLine_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quoteMakeMethod_createdBy_fkey"
+ foreignKeyName: "quoteLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_createdBy_fkey"
+ foreignKeyName: "quoteLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_createdBy_fkey"
+ foreignKeyName: "quoteLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_createdBy_fkey"
+ foreignKeyName: "quoteLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_createdBy_fkey"
+ foreignKeyName: "quoteLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quoteMakeMethod_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "quoteLine_estimatorId_fkey"
+ columns: ["estimatorId"]
isOneToOne: false
- referencedRelation: "item"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "quoteLine_estimatorId_fkey"
+ columns: ["estimatorId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_parentMaterialId_fkey"
- columns: ["parentMaterialId"]
+ foreignKeyName: "quoteLine_estimatorId_fkey"
+ columns: ["estimatorId"]
isOneToOne: false
- referencedRelation: "quoteMaterial"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_parentMaterialId_fkey"
- columns: ["parentMaterialId"]
+ foreignKeyName: "quoteLine_estimatorId_fkey"
+ columns: ["estimatorId"]
isOneToOne: false
- referencedRelation: "quoteMaterialWithMakeMethodId"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_quoteId_fkey"
+ foreignKeyName: "quoteLine_estimatorId_fkey"
+ columns: ["estimatorId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "quoteLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "quoteLine_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_quoteId_fkey"
+ foreignKeyName: "quoteLine_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quoteCustomerDetails"
referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "quoteMakeMethod_quoteId_fkey"
+ foreignKeyName: "quoteLine_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_quoteLineId_fkey"
- columns: ["quoteLineId"]
+ foreignKeyName: "quoteLine_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
isOneToOne: false
- referencedRelation: "quoteLine"
- referencedColumns: ["id"]
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "quoteMakeMethod_quoteLineId_fkey"
- columns: ["quoteLineId"]
+ foreignKeyName: "quoteLine_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "quoteLines"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
+ foreignKeyName: "quoteLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
+ foreignKeyName: "quoteLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
+ foreignKeyName: "quoteLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
+ foreignKeyName: "quoteLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -13558,251 +13900,144 @@ export type Database = {
},
]
}
- quoteMaterial: {
+ quoteLinePrice: {
Row: {
- companyId: string
createdAt: string
createdBy: string
- customFields: Json | null
- description: string
- id: string
- itemId: string
- itemReadableId: string
- itemType: string
- methodType: Database["public"]["Enums"]["methodType"]
- order: number
+ discountPercent: number
+ leadTime: number
quantity: number
quoteId: string
quoteLineId: string
- quoteMakeMethodId: string
- quoteOperationId: string | null
- unitCost: number
- unitOfMeasureCode: string | null
+ unitPrice: number
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- companyId: string
createdAt?: string
createdBy: string
- customFields?: Json | null
- description: string
- id?: string
- itemId: string
- itemReadableId: string
- itemType?: string
- methodType?: Database["public"]["Enums"]["methodType"]
- order?: number
+ discountPercent?: number
+ leadTime?: number
quantity?: number
quoteId: string
quoteLineId: string
- quoteMakeMethodId: string
- quoteOperationId?: string | null
- unitCost?: number
- unitOfMeasureCode?: string | null
+ unitPrice?: number
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- companyId?: string
createdAt?: string
createdBy?: string
- customFields?: Json | null
- description?: string
- id?: string
- itemId?: string
- itemReadableId?: string
- itemType?: string
- methodType?: Database["public"]["Enums"]["methodType"]
- order?: number
+ discountPercent?: number
+ leadTime?: number
quantity?: number
quoteId?: string
quoteLineId?: string
- quoteMakeMethodId?: string
- quoteOperationId?: string | null
- unitCost?: number
- unitOfMeasureCode?: string | null
+ unitPrice?: number
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "quoteMaterial_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMaterial_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMaterial_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "quoteMaterial_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "quoteMaterial_createdBy_fkey"
+ foreignKeyName: "quoteLinePrice_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_createdBy_fkey"
+ foreignKeyName: "quoteLinePrice_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_createdBy_fkey"
+ foreignKeyName: "quoteLinePrice_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_createdBy_fkey"
+ foreignKeyName: "quoteLinePrice_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_createdBy_fkey"
+ foreignKeyName: "quoteLinePrice_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quoteMaterial_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMaterial_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
- },
- {
- foreignKeyName: "quoteMaterial_quoteId_fkey"
+ foreignKeyName: "quoteLinePrice_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_quoteId_fkey"
+ foreignKeyName: "quoteLinePrice_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quoteCustomerDetails"
referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "quoteMaterial_quoteId_fkey"
+ foreignKeyName: "quoteLinePrice_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_quoteLineId_fkey"
+ foreignKeyName: "quoteLinePrice_quoteLineId_fkey"
columns: ["quoteLineId"]
isOneToOne: false
referencedRelation: "quoteLine"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_quoteLineId_fkey"
+ foreignKeyName: "quoteLinePrice_quoteLineId_fkey"
columns: ["quoteLineId"]
isOneToOne: false
referencedRelation: "quoteLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_quoteMakeMethodId_fkey"
- columns: ["quoteMakeMethodId"]
- isOneToOne: false
- referencedRelation: "quoteMakeMethod"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMaterial_quoteMakeMethodId_fkey"
- columns: ["quoteMakeMethodId"]
- isOneToOne: false
- referencedRelation: "quoteMaterialWithMakeMethodId"
- referencedColumns: ["quoteMaterialMakeMethodId"]
- },
- {
- foreignKeyName: "quoteMaterial_quoteOperationId_fkey"
- columns: ["quoteOperationId"]
- isOneToOne: false
- referencedRelation: "quoteOperation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMaterial_quoteOperationId_fkey"
- columns: ["quoteOperationId"]
- isOneToOne: false
- referencedRelation: "quoteOperationsWithMakeMethods"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMaterial_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode", "companyId"]
- isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
- },
- {
- foreignKeyName: "quoteMaterial_updatedBy_fkey"
+ foreignKeyName: "quoteLinePrice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_updatedBy_fkey"
+ foreignKeyName: "quoteLinePrice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_updatedBy_fkey"
+ foreignKeyName: "quoteLinePrice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_updatedBy_fkey"
+ foreignKeyName: "quoteLinePrice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_updatedBy_fkey"
+ foreignKeyName: "quoteLinePrice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -13810,403 +14045,464 @@ export type Database = {
},
]
}
- quoteOperation: {
+ quoteMakeMethod: {
Row: {
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
- description: string | null
id: string
- laborRate: number
- laborTime: number
- laborUnit: Database["public"]["Enums"]["factor"]
- machineRate: number | null
- machineTime: number
- machineUnit: Database["public"]["Enums"]["factor"]
- operationLeadTime: number
- operationMinimumCost: number
- operationOrder: Database["public"]["Enums"]["methodOperationOrder"]
- operationSupplierProcessId: string | null
- operationType: Database["public"]["Enums"]["operationType"]
- operationUnitCost: number
- order: number
- overheadRate: number
- processId: string
+ itemId: string
+ parentMaterialId: string | null
+ quantityPerParent: number
quoteId: string
quoteLineId: string
- quoteMakeMethodId: string | null
- quotingRate: number
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
updatedAt: string | null
updatedBy: string | null
- workCenterId: string | null
}
Insert: {
companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
- description?: string | null
id?: string
- laborRate?: number
- laborTime?: number
- laborUnit?: Database["public"]["Enums"]["factor"]
- machineRate?: number | null
- machineTime?: number
- machineUnit?: Database["public"]["Enums"]["factor"]
- operationLeadTime?: number
- operationMinimumCost?: number
- operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
- operationSupplierProcessId?: string | null
- operationType?: Database["public"]["Enums"]["operationType"]
- operationUnitCost?: number
- order?: number
- overheadRate?: number
- processId: string
+ itemId: string
+ parentMaterialId?: string | null
+ quantityPerParent?: number
quoteId: string
quoteLineId: string
- quoteMakeMethodId?: string | null
- quotingRate?: number
- setupTime?: number
- setupUnit?: Database["public"]["Enums"]["factor"]
updatedAt?: string | null
updatedBy?: string | null
- workCenterId?: string | null
}
Update: {
companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
- description?: string | null
id?: string
- laborRate?: number
- laborTime?: number
- laborUnit?: Database["public"]["Enums"]["factor"]
- machineRate?: number | null
- machineTime?: number
- machineUnit?: Database["public"]["Enums"]["factor"]
- operationLeadTime?: number
- operationMinimumCost?: number
- operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
- operationSupplierProcessId?: string | null
- operationType?: Database["public"]["Enums"]["operationType"]
- operationUnitCost?: number
- order?: number
- overheadRate?: number
- processId?: string
+ itemId?: string
+ parentMaterialId?: string | null
+ quantityPerParent?: number
quoteId?: string
quoteLineId?: string
- quoteMakeMethodId?: string | null
- quotingRate?: number
- setupTime?: number
- setupUnit?: Database["public"]["Enums"]["factor"]
updatedAt?: string | null
updatedBy?: string | null
- workCenterId?: string | null
}
Relationships: [
{
- foreignKeyName: "quoteOperation_companyId_fkey"
+ foreignKeyName: "quoteMakeMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_companyId_fkey"
+ foreignKeyName: "quoteMakeMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_companyId_fkey"
+ foreignKeyName: "quoteMakeMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quoteOperation_companyId_fkey"
+ foreignKeyName: "quoteMakeMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quoteOperation_createdBy_fkey"
+ foreignKeyName: "quoteMakeMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_createdBy_fkey"
+ foreignKeyName: "quoteMakeMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_createdBy_fkey"
+ foreignKeyName: "quoteMakeMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_createdBy_fkey"
+ foreignKeyName: "quoteMakeMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_createdBy_fkey"
+ foreignKeyName: "quoteMakeMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
- columns: ["operationSupplierProcessId"]
+ foreignKeyName: "quoteMakeMethod_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "supplierProcess"
+ referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
- columns: ["operationSupplierProcessId"]
+ foreignKeyName: "quoteMakeMethod_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "supplierProcesses"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
{
- foreignKeyName: "quoteOperation_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "quoteMakeMethod_parentMaterialId_fkey"
+ columns: ["parentMaterialId"]
isOneToOne: false
- referencedRelation: "process"
+ referencedRelation: "quoteMaterial"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "quoteMakeMethod_parentMaterialId_fkey"
+ columns: ["parentMaterialId"]
isOneToOne: false
- referencedRelation: "processes"
+ referencedRelation: "quoteMaterialWithMakeMethodId"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_quoteId_fkey"
+ foreignKeyName: "quoteMakeMethod_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_quoteId_fkey"
+ foreignKeyName: "quoteMakeMethod_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quoteCustomerDetails"
referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "quoteOperation_quoteId_fkey"
+ foreignKeyName: "quoteMakeMethod_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_quoteLineId_fkey"
+ foreignKeyName: "quoteMakeMethod_quoteLineId_fkey"
columns: ["quoteLineId"]
isOneToOne: false
referencedRelation: "quoteLine"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_quoteLineId_fkey"
+ foreignKeyName: "quoteMakeMethod_quoteLineId_fkey"
columns: ["quoteLineId"]
isOneToOne: false
referencedRelation: "quoteLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_quoteMakeMethodId_fkey"
- columns: ["quoteMakeMethodId"]
- isOneToOne: false
- referencedRelation: "quoteMakeMethod"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteOperation_quoteMakeMethodId_fkey"
- columns: ["quoteMakeMethodId"]
- isOneToOne: false
- referencedRelation: "quoteMaterialWithMakeMethodId"
- referencedColumns: ["quoteMaterialMakeMethodId"]
- },
- {
- foreignKeyName: "quoteOperation_updatedBy_fkey"
+ foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_updatedBy_fkey"
+ foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_updatedBy_fkey"
+ foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_updatedBy_fkey"
+ foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_updatedBy_fkey"
+ foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "quoteOperation_workCenterId_fkey"
- columns: ["workCenterId"]
- isOneToOne: false
- referencedRelation: "workCenter"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteOperation_workCenterId_fkey"
- columns: ["workCenterId"]
- isOneToOne: false
- referencedRelation: "workCenters"
- referencedColumns: ["id"]
- },
]
}
- quoteOperationWorkInstruction: {
+ quoteMaterial: {
Row: {
companyId: string
- content: Json | null
createdAt: string
createdBy: string
- quoteOperationId: string
+ customFields: Json | null
+ description: string
+ id: string
+ itemId: string
+ itemReadableId: string
+ itemType: string
+ methodType: Database["public"]["Enums"]["methodType"]
+ order: number
+ productionQuantity: number | null
+ quantity: number
+ quoteId: string
+ quoteLineId: string
+ quoteMakeMethodId: string
+ quoteOperationId: string | null
+ scrapQuantity: number
+ unitCost: number
+ unitOfMeasureCode: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
companyId: string
- content?: Json | null
createdAt?: string
createdBy: string
- quoteOperationId: string
+ customFields?: Json | null
+ description: string
+ id?: string
+ itemId: string
+ itemReadableId: string
+ itemType?: string
+ methodType?: Database["public"]["Enums"]["methodType"]
+ order?: number
+ productionQuantity?: number | null
+ quantity?: number
+ quoteId: string
+ quoteLineId: string
+ quoteMakeMethodId: string
+ quoteOperationId?: string | null
+ scrapQuantity?: number
+ unitCost?: number
+ unitOfMeasureCode?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
companyId?: string
- content?: Json | null
createdAt?: string
createdBy?: string
- quoteOperationId?: string
+ customFields?: Json | null
+ description?: string
+ id?: string
+ itemId?: string
+ itemReadableId?: string
+ itemType?: string
+ methodType?: Database["public"]["Enums"]["methodType"]
+ order?: number
+ productionQuantity?: number | null
+ quantity?: number
+ quoteId?: string
+ quoteLineId?: string
+ quoteMakeMethodId?: string
+ quoteOperationId?: string | null
+ scrapQuantity?: number
+ unitCost?: number
+ unitOfMeasureCode?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "quoteOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "quoteMaterial_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "quoteMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "quoteMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "quoteMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "quoteMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_quoteOperationId_fkey"
+ foreignKeyName: "quoteMaterial_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quote"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quoteCustomerDetails"
+ referencedColumns: ["quoteId"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quotes"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteLineId_fkey"
+ columns: ["quoteLineId"]
+ isOneToOne: false
+ referencedRelation: "quoteLine"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteLineId_fkey"
+ columns: ["quoteLineId"]
+ isOneToOne: false
+ referencedRelation: "quoteLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteMakeMethodId_fkey"
+ columns: ["quoteMakeMethodId"]
+ isOneToOne: false
+ referencedRelation: "quoteMakeMethod"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteMakeMethodId_fkey"
+ columns: ["quoteMakeMethodId"]
+ isOneToOne: false
+ referencedRelation: "quoteMaterialWithMakeMethodId"
+ referencedColumns: ["quoteMaterialMakeMethodId"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteOperationId_fkey"
columns: ["quoteOperationId"]
- isOneToOne: true
+ isOneToOne: false
referencedRelation: "quoteOperation"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_quoteOperationId_fkey"
+ foreignKeyName: "quoteMaterial_quoteOperationId_fkey"
columns: ["quoteOperationId"]
- isOneToOne: true
+ isOneToOne: false
referencedRelation: "quoteOperationsWithMakeMethods"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "quoteMaterial_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "quoteMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "quoteMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "quoteMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "quoteMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -14214,760 +14510,589 @@ export type Database = {
},
]
}
- quotePayment: {
+ quoteOperation: {
Row: {
companyId: string
- currencyCode: string
+ createdAt: string
+ createdBy: string
customFields: Json | null
+ description: string | null
id: string
- invoiceCustomerContactId: string | null
- invoiceCustomerId: string | null
- invoiceCustomerLocationId: string | null
- paymentTermId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- currencyCode?: string
+ laborRate: number
+ laborTime: number
+ laborUnit: Database["public"]["Enums"]["factor"]
+ machineRate: number | null
+ machineTime: number
+ machineUnit: Database["public"]["Enums"]["factor"]
+ operationLeadTime: number
+ operationMinimumCost: number
+ operationOrder: Database["public"]["Enums"]["methodOperationOrder"]
+ operationSupplierProcessId: string | null
+ operationType: Database["public"]["Enums"]["operationType"]
+ operationUnitCost: number
+ order: number
+ overheadRate: number
+ processId: string
+ quoteId: string
+ quoteLineId: string
+ quoteMakeMethodId: string | null
+ quotingRate: number
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
+ updatedAt: string | null
+ updatedBy: string | null
+ workCenterId: string | null
+ workInstruction: Json
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
customFields?: Json | null
- id: string
- invoiceCustomerContactId?: string | null
- invoiceCustomerId?: string | null
- invoiceCustomerLocationId?: string | null
- paymentTermId?: string | null
+ description?: string | null
+ id?: string
+ laborRate?: number
+ laborTime?: number
+ laborUnit?: Database["public"]["Enums"]["factor"]
+ machineRate?: number | null
+ machineTime?: number
+ machineUnit?: Database["public"]["Enums"]["factor"]
+ operationLeadTime?: number
+ operationMinimumCost?: number
+ operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
+ operationSupplierProcessId?: string | null
+ operationType?: Database["public"]["Enums"]["operationType"]
+ operationUnitCost?: number
+ order?: number
+ overheadRate?: number
+ processId: string
+ quoteId: string
+ quoteLineId: string
+ quoteMakeMethodId?: string | null
+ quotingRate?: number
+ setupTime?: number
+ setupUnit?: Database["public"]["Enums"]["factor"]
updatedAt?: string | null
updatedBy?: string | null
+ workCenterId?: string | null
+ workInstruction?: Json
}
Update: {
companyId?: string
- currencyCode?: string
+ createdAt?: string
+ createdBy?: string
customFields?: Json | null
+ description?: string | null
id?: string
- invoiceCustomerContactId?: string | null
- invoiceCustomerId?: string | null
- invoiceCustomerLocationId?: string | null
- paymentTermId?: string | null
+ laborRate?: number
+ laborTime?: number
+ laborUnit?: Database["public"]["Enums"]["factor"]
+ machineRate?: number | null
+ machineTime?: number
+ machineUnit?: Database["public"]["Enums"]["factor"]
+ operationLeadTime?: number
+ operationMinimumCost?: number
+ operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
+ operationSupplierProcessId?: string | null
+ operationType?: Database["public"]["Enums"]["operationType"]
+ operationUnitCost?: number
+ order?: number
+ overheadRate?: number
+ processId?: string
+ quoteId?: string
+ quoteLineId?: string
+ quoteMakeMethodId?: string | null
+ quotingRate?: number
+ setupTime?: number
+ setupUnit?: Database["public"]["Enums"]["factor"]
updatedAt?: string | null
updatedBy?: string | null
+ workCenterId?: string | null
+ workInstruction?: Json
}
Relationships: [
{
- foreignKeyName: "quotePayment_companyId_fkey"
+ foreignKeyName: "quoteOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_companyId_fkey"
+ foreignKeyName: "quoteOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_companyId_fkey"
+ foreignKeyName: "quoteOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quotePayment_companyId_fkey"
+ foreignKeyName: "quoteOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quotePayment_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
+ foreignKeyName: "quoteOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
- },
- {
- foreignKeyName: "quotePayment_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "quote"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quotePayment_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "quoteCustomerDetails"
- referencedColumns: ["quoteId"]
- },
- {
- foreignKeyName: "quotePayment_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "quotes"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_invoiceCustomerContactId_fkey"
- columns: ["invoiceCustomerContactId"]
+ foreignKeyName: "quoteOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customerContact"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
+ foreignKeyName: "quoteOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customer"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
+ foreignKeyName: "quoteOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customers"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
+ foreignKeyName: "quoteOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "quotePayment_invoiceCustomerLocationId_fkey"
- columns: ["invoiceCustomerLocationId"]
+ foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
+ columns: ["operationSupplierProcessId"]
isOneToOne: false
- referencedRelation: "customerLocation"
+ referencedRelation: "supplierProcess"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_paymentTermId_fkey"
- columns: ["paymentTermId"]
+ foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
+ columns: ["operationSupplierProcessId"]
isOneToOne: false
- referencedRelation: "paymentTerm"
+ referencedRelation: "supplierProcesses"
referencedColumns: ["id"]
},
- ]
- }
- quoteShipment: {
- Row: {
- companyId: string
- id: string
- locationId: string | null
- receiptRequestedDate: string | null
- shippingMethodId: string | null
- shippingTermId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- id: string
- locationId?: string | null
- receiptRequestedDate?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- companyId?: string
- id?: string
- locationId?: string | null
- receiptRequestedDate?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
{
- foreignKeyName: "quoteShipment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "quoteOperation_processId_fkey"
+ columns: ["processId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "process"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "quoteOperation_processId_fkey"
+ columns: ["processId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "processes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "quoteShipment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "quoteOperation_quoteId_fkey"
+ columns: ["quoteId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "quoteShipment_id_fkey"
- columns: ["id"]
- isOneToOne: true
referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "quoteOperation_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
referencedRelation: "quoteCustomerDetails"
referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "quoteShipment_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "quoteOperation_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "quoteOperation_quoteLineId_fkey"
+ columns: ["quoteLineId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
+ referencedRelation: "quoteLine"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "quoteOperation_quoteLineId_fkey"
+ columns: ["quoteLineId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "quoteLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "quoteOperation_quoteMakeMethodId_fkey"
+ columns: ["quoteMakeMethodId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "quoteShipment_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "quoteShipment_shippingMethodId_fkey"
- columns: ["shippingMethodId"]
- isOneToOne: false
- referencedRelation: "shippingMethod"
+ referencedRelation: "quoteMakeMethod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_shippingTermId_fkey"
- columns: ["shippingTermId"]
+ foreignKeyName: "quoteOperation_quoteMakeMethodId_fkey"
+ columns: ["quoteMakeMethodId"]
isOneToOne: false
- referencedRelation: "shippingTerm"
- referencedColumns: ["id"]
+ referencedRelation: "quoteMaterialWithMakeMethodId"
+ referencedColumns: ["quoteMaterialMakeMethodId"]
},
{
- foreignKeyName: "quoteShipment_updatedBy_fkey"
+ foreignKeyName: "quoteOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_updatedBy_fkey"
+ foreignKeyName: "quoteOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_updatedBy_fkey"
+ foreignKeyName: "quoteOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_updatedBy_fkey"
+ foreignKeyName: "quoteOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_updatedBy_fkey"
+ foreignKeyName: "quoteOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "quoteOperation_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenter"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteOperation_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenters"
+ referencedColumns: ["id"]
+ },
]
}
- receipt: {
+ quotePayment: {
Row: {
- assignee: string | null
companyId: string
- createdAt: string
- createdBy: string
+ currencyCode: string
customFields: Json | null
- externalDocumentId: string | null
id: string
- invoiced: boolean | null
- locationId: string | null
- postingDate: string | null
- receiptId: string
- sourceDocument:
- | Database["public"]["Enums"]["receiptSourceDocument"]
- | null
- sourceDocumentId: string | null
- sourceDocumentReadableId: string | null
- status: Database["public"]["Enums"]["receiptStatus"]
- supplierId: string | null
+ invoiceCustomerContactId: string | null
+ invoiceCustomerId: string | null
+ invoiceCustomerLocationId: string | null
+ paymentTermId: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- assignee?: string | null
companyId: string
- createdAt?: string
- createdBy: string
+ currencyCode?: string
customFields?: Json | null
- externalDocumentId?: string | null
- id?: string
- invoiced?: boolean | null
- locationId?: string | null
- postingDate?: string | null
- receiptId: string
- sourceDocument?:
- | Database["public"]["Enums"]["receiptSourceDocument"]
- | null
- sourceDocumentId?: string | null
- sourceDocumentReadableId?: string | null
- status?: Database["public"]["Enums"]["receiptStatus"]
- supplierId?: string | null
+ id: string
+ invoiceCustomerContactId?: string | null
+ invoiceCustomerId?: string | null
+ invoiceCustomerLocationId?: string | null
+ paymentTermId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- assignee?: string | null
companyId?: string
- createdAt?: string
- createdBy?: string
+ currencyCode?: string
customFields?: Json | null
- externalDocumentId?: string | null
id?: string
- invoiced?: boolean | null
- locationId?: string | null
- postingDate?: string | null
- receiptId?: string
- sourceDocument?:
- | Database["public"]["Enums"]["receiptSourceDocument"]
- | null
- sourceDocumentId?: string | null
- sourceDocumentReadableId?: string | null
- status?: Database["public"]["Enums"]["receiptStatus"]
- supplierId?: string | null
+ invoiceCustomerContactId?: string | null
+ invoiceCustomerId?: string | null
+ invoiceCustomerLocationId?: string | null
+ paymentTermId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "receipt_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "receipt_companyId_fkey"
+ foreignKeyName: "quotePayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_companyId_fkey"
+ foreignKeyName: "quotePayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_companyId_fkey"
+ foreignKeyName: "quotePayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "receipt_companyId_fkey"
+ foreignKeyName: "quotePayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "receipt_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "quotePayment_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "receipt_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ foreignKeyName: "quotePayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ foreignKeyName: "quotePayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "quoteCustomerDetails"
+ referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "receipt_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
+ foreignKeyName: "quotePayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "receipt_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "receipt_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "quotePayment_invoiceCustomerContactId_fkey"
+ columns: ["invoiceCustomerContactId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "customerContact"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "receipt_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "quotePayment_invoiceCustomerId_fkey"
+ columns: ["invoiceCustomerId"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "quotePayment_invoiceCustomerId_fkey"
+ columns: ["invoiceCustomerId"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "quotePayment_invoiceCustomerId_fkey"
+ columns: ["invoiceCustomerId"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
+ referencedRelation: "salesOrderCustomers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "quotePayment_invoiceCustomerLocationId_fkey"
+ columns: ["invoiceCustomerLocationId"]
isOneToOne: false
- referencedRelation: "supplier"
+ referencedRelation: "customerLocation"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "quotePayment_paymentTermId_fkey"
+ columns: ["paymentTermId"]
isOneToOne: false
- referencedRelation: "suppliers"
+ referencedRelation: "paymentTerm"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "receipt_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
]
}
- receiptLine: {
+ quoteShipment: {
Row: {
companyId: string
- conversionFactor: number | null
- createdAt: string
- createdBy: string
id: string
- itemId: string
- itemReadableId: string | null
- lineId: string | null
locationId: string | null
- orderQuantity: number
- outstandingQuantity: number
- receiptId: string
- receivedQuantity: number
- shelfId: string | null
- unitOfMeasure: string
- unitPrice: number
+ receiptRequestedDate: string | null
+ shippingMethodId: string | null
+ shippingTermId: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
companyId: string
- conversionFactor?: number | null
- createdAt?: string
- createdBy: string
- id?: string
- itemId: string
- itemReadableId?: string | null
- lineId?: string | null
+ id: string
locationId?: string | null
- orderQuantity: number
- outstandingQuantity?: number
- receiptId: string
- receivedQuantity?: number
- shelfId?: string | null
- unitOfMeasure: string
- unitPrice: number
+ receiptRequestedDate?: string | null
+ shippingMethodId?: string | null
+ shippingTermId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
companyId?: string
- conversionFactor?: number | null
- createdAt?: string
- createdBy?: string
id?: string
- itemId?: string
- itemReadableId?: string | null
- lineId?: string | null
locationId?: string | null
- orderQuantity?: number
- outstandingQuantity?: number
- receiptId?: string
- receivedQuantity?: number
- shelfId?: string | null
- unitOfMeasure?: string
- unitPrice?: number
+ receiptRequestedDate?: string | null
+ shippingMethodId?: string | null
+ shippingTermId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "receiptLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "quoteShipment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "quoteShipment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "quoteShipment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "receiptLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "quoteShipment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "receiptLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "quoteShipment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "quote"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
+ foreignKeyName: "quoteShipment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "quoteCustomerDetails"
+ referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "receiptLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ foreignKeyName: "quoteShipment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "quotes"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_locationId_fkey"
+ foreignKeyName: "quoteShipment_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "itemQuantities"
referencedColumns: ["locationId"]
},
{
- foreignKeyName: "receiptLine_locationId_fkey"
+ foreignKeyName: "quoteShipment_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_locationId_fkey"
+ foreignKeyName: "quoteShipment_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "purchaseOrders"
referencedColumns: ["locationId"]
},
{
- foreignKeyName: "receiptLine_locationId_fkey"
+ foreignKeyName: "quoteShipment_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "salesOrders"
referencedColumns: ["locationId"]
},
{
- foreignKeyName: "receiptLine_receiptId_fkey"
- columns: ["receiptId"]
+ foreignKeyName: "quoteShipment_shippingMethodId_fkey"
+ columns: ["shippingMethodId"]
isOneToOne: false
- referencedRelation: "receipt"
+ referencedRelation: "shippingMethod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_receiptId_fkey"
- columns: ["receiptId"]
+ foreignKeyName: "quoteShipment_shippingTermId_fkey"
+ columns: ["shippingTermId"]
isOneToOne: false
- referencedRelation: "receipts"
+ referencedRelation: "shippingTerm"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_shelfId_fkey"
- columns: ["shelfId", "locationId"]
- isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
- },
- {
- foreignKeyName: "receiptLine_updatedBy_fkey"
+ foreignKeyName: "quoteShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_updatedBy_fkey"
+ foreignKeyName: "quoteShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_updatedBy_fkey"
+ foreignKeyName: "quoteShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_updatedBy_fkey"
+ foreignKeyName: "quoteShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_updatedBy_fkey"
+ foreignKeyName: "quoteShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -14975,310 +15100,265 @@ export type Database = {
},
]
}
- salesOrder: {
+ receipt: {
Row: {
assignee: string | null
- closedAt: string | null
- closedBy: string | null
companyId: string
createdAt: string
createdBy: string
- currencyCode: string
- customerContactId: string | null
- customerId: string
- customerLocationId: string | null
- customerReference: string | null
customFields: Json | null
+ externalDocumentId: string | null
id: string
+ invoiced: boolean | null
locationId: string | null
- notes: string | null
- orderDate: string
- revisionId: number
- salesOrderId: string
- status: Database["public"]["Enums"]["salesOrderStatus"]
+ postingDate: string | null
+ receiptId: string
+ sourceDocument:
+ | Database["public"]["Enums"]["receiptSourceDocument"]
+ | null
+ sourceDocumentId: string | null
+ sourceDocumentReadableId: string | null
+ status: Database["public"]["Enums"]["receiptStatus"]
+ supplierId: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
assignee?: string | null
- closedAt?: string | null
- closedBy?: string | null
companyId: string
createdAt?: string
createdBy: string
- currencyCode?: string
- customerContactId?: string | null
- customerId: string
- customerLocationId?: string | null
- customerReference?: string | null
customFields?: Json | null
+ externalDocumentId?: string | null
id?: string
+ invoiced?: boolean | null
locationId?: string | null
- notes?: string | null
- orderDate?: string
- revisionId?: number
- salesOrderId: string
- status?: Database["public"]["Enums"]["salesOrderStatus"]
+ postingDate?: string | null
+ receiptId: string
+ sourceDocument?:
+ | Database["public"]["Enums"]["receiptSourceDocument"]
+ | null
+ sourceDocumentId?: string | null
+ sourceDocumentReadableId?: string | null
+ status?: Database["public"]["Enums"]["receiptStatus"]
+ supplierId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
assignee?: string | null
- closedAt?: string | null
- closedBy?: string | null
companyId?: string
createdAt?: string
createdBy?: string
- currencyCode?: string
- customerContactId?: string | null
- customerId?: string
- customerLocationId?: string | null
- customerReference?: string | null
customFields?: Json | null
+ externalDocumentId?: string | null
id?: string
+ invoiced?: boolean | null
locationId?: string | null
- notes?: string | null
- orderDate?: string
- revisionId?: number
- salesOrderId?: string
- status?: Database["public"]["Enums"]["salesOrderStatus"]
+ postingDate?: string | null
+ receiptId?: string
+ sourceDocument?:
+ | Database["public"]["Enums"]["receiptSourceDocument"]
+ | null
+ sourceDocumentId?: string | null
+ sourceDocumentReadableId?: string | null
+ status?: Database["public"]["Enums"]["receiptStatus"]
+ supplierId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "salesOrder_assignee_fkey"
+ foreignKeyName: "receipt_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_assignee_fkey"
+ foreignKeyName: "receipt_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_assignee_fkey"
+ foreignKeyName: "receipt_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_assignee_fkey"
+ foreignKeyName: "receipt_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_assignee_fkey"
+ foreignKeyName: "receipt_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesOrder_closedBy_fkey"
- columns: ["closedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrder_closedBy_fkey"
- columns: ["closedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrder_closedBy_fkey"
- columns: ["closedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrder_closedBy_fkey"
- columns: ["closedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrder_closedBy_fkey"
- columns: ["closedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "salesOrder_companyId_fkey"
+ foreignKeyName: "receipt_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_companyId_fkey"
+ foreignKeyName: "receipt_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_companyId_fkey"
+ foreignKeyName: "receipt_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesOrder_companyId_fkey"
+ foreignKeyName: "receipt_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesOrder_createdBy_fkey"
+ foreignKeyName: "receipt_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_createdBy_fkey"
+ foreignKeyName: "receipt_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_createdBy_fkey"
+ foreignKeyName: "receipt_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_createdBy_fkey"
+ foreignKeyName: "receipt_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_createdBy_fkey"
+ foreignKeyName: "receipt_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesOrder_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
- isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
- },
- {
- foreignKeyName: "salesOrder_customerContactId_fkey"
- columns: ["customerContactId"]
+ foreignKeyName: "receipt_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "customerContact"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesOrder_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "receipt_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "customer"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "receipt_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "customers"
- referencedColumns: ["id"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesOrder_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "receipt_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
- referencedColumns: ["id"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesOrder_customerLocationId_fkey"
- columns: ["customerLocationId"]
+ foreignKeyName: "receipt_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "customerLocation"
- referencedColumns: ["id"]
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "salesOrder_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "receipt_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "salesOrder_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "receipt_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "receipt_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "supplier"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "receipt_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "suppliers"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_updatedBy_fkey"
+ foreignKeyName: "receipt_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_updatedBy_fkey"
+ foreignKeyName: "receipt_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_updatedBy_fkey"
+ foreignKeyName: "receipt_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_updatedBy_fkey"
+ foreignKeyName: "receipt_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_updatedBy_fkey"
+ foreignKeyName: "receipt_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -15286,310 +15366,1215 @@ export type Database = {
},
]
}
- salesOrderFavorite: {
+ receiptLine: {
Row: {
- salesOrderId: string
- userId: string
+ companyId: string
+ conversionFactor: number | null
+ createdAt: string
+ createdBy: string
+ id: string
+ itemId: string
+ itemReadableId: string | null
+ lineId: string | null
+ locationId: string | null
+ orderQuantity: number
+ outstandingQuantity: number
+ receiptId: string
+ receivedQuantity: number
+ shelfId: string | null
+ unitOfMeasure: string
+ unitPrice: number
+ updatedAt: string | null
+ updatedBy: string | null
}
Insert: {
- salesOrderId: string
- userId: string
+ companyId: string
+ conversionFactor?: number | null
+ createdAt?: string
+ createdBy: string
+ id?: string
+ itemId: string
+ itemReadableId?: string | null
+ lineId?: string | null
+ locationId?: string | null
+ orderQuantity: number
+ outstandingQuantity?: number
+ receiptId: string
+ receivedQuantity?: number
+ shelfId?: string | null
+ unitOfMeasure: string
+ unitPrice: number
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Update: {
- salesOrderId?: string
- userId?: string
+ companyId?: string
+ conversionFactor?: number | null
+ createdAt?: string
+ createdBy?: string
+ id?: string
+ itemId?: string
+ itemReadableId?: string | null
+ lineId?: string | null
+ locationId?: string | null
+ orderQuantity?: number
+ outstandingQuantity?: number
+ receiptId?: string
+ receivedQuantity?: number
+ shelfId?: string | null
+ unitOfMeasure?: string
+ unitPrice?: number
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "salesOrderFavorites_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "receiptLine_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "salesOrder"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderFavorites_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "receiptLine_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "salesOrderLocations"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderFavorites_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "receiptLine_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "salesOrders"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "receiptLine_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "receiptLine_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "receiptLine_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "receiptLine_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
{
- foreignKeyName: "salesOrderFavorites_userId_fkey"
- columns: ["userId"]
- isOneToOne: false
+ foreignKeyName: "receiptLine_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "receiptLine_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "receiptLine_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "receiptLine_receiptId_fkey"
+ columns: ["receiptId"]
+ isOneToOne: false
+ referencedRelation: "receipt"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_receiptId_fkey"
+ columns: ["receiptId"]
+ isOneToOne: false
+ referencedRelation: "receipts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_shelfId_fkey"
+ columns: ["shelfId", "locationId"]
+ isOneToOne: false
+ referencedRelation: "shelf"
+ referencedColumns: ["id", "locationId"]
+ },
+ {
+ foreignKeyName: "receiptLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- salesOrderLine: {
+ salesOrder: {
Row: {
- accountNumber: string | null
- addOnCost: number
- assetId: string | null
+ assignee: string | null
+ closedAt: string | null
+ closedBy: string | null
companyId: string
createdAt: string
createdBy: string
+ currencyCode: string
+ customerContactId: string | null
+ customerId: string
+ customerLocationId: string | null
+ customerReference: string | null
customFields: Json | null
- description: string | null
id: string
- invoicedComplete: boolean
- itemId: string | null
- itemReadableId: string | null
locationId: string | null
- methodType: Database["public"]["Enums"]["methodType"]
- modelUploadId: string | null
- promisedDate: string | null
- quantityInvoiced: number | null
- quantitySent: number | null
- quantityToInvoice: number | null
- quantityToSend: number | null
- requiresInspection: boolean
- saleQuantity: number | null
+ notes: string | null
+ orderDate: string
+ revisionId: number
salesOrderId: string
- salesOrderLineType: Database["public"]["Enums"]["salesOrderLineType"]
- sentComplete: boolean
- setupPrice: number | null
- shelfId: string | null
- status: Database["public"]["Enums"]["salesOrderLineStatus"]
- unitOfMeasureCode: string | null
- unitPrice: number | null
+ status: Database["public"]["Enums"]["salesOrderStatus"]
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- accountNumber?: string | null
- addOnCost?: number
- assetId?: string | null
+ assignee?: string | null
+ closedAt?: string | null
+ closedBy?: string | null
companyId: string
createdAt?: string
createdBy: string
+ currencyCode?: string
+ customerContactId?: string | null
+ customerId: string
+ customerLocationId?: string | null
+ customerReference?: string | null
customFields?: Json | null
- description?: string | null
id?: string
- invoicedComplete?: boolean
- itemId?: string | null
- itemReadableId?: string | null
locationId?: string | null
- methodType?: Database["public"]["Enums"]["methodType"]
- modelUploadId?: string | null
- promisedDate?: string | null
- quantityInvoiced?: number | null
- quantitySent?: number | null
- quantityToInvoice?: number | null
- quantityToSend?: number | null
- requiresInspection?: boolean
- saleQuantity?: number | null
+ notes?: string | null
+ orderDate?: string
+ revisionId?: number
salesOrderId: string
- salesOrderLineType: Database["public"]["Enums"]["salesOrderLineType"]
- sentComplete?: boolean
- setupPrice?: number | null
- shelfId?: string | null
- status?: Database["public"]["Enums"]["salesOrderLineStatus"]
- unitOfMeasureCode?: string | null
- unitPrice?: number | null
+ status?: Database["public"]["Enums"]["salesOrderStatus"]
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- accountNumber?: string | null
- addOnCost?: number
- assetId?: string | null
+ assignee?: string | null
+ closedAt?: string | null
+ closedBy?: string | null
companyId?: string
createdAt?: string
createdBy?: string
+ currencyCode?: string
+ customerContactId?: string | null
+ customerId?: string
+ customerLocationId?: string | null
+ customerReference?: string | null
customFields?: Json | null
- description?: string | null
id?: string
- invoicedComplete?: boolean
- itemId?: string | null
- itemReadableId?: string | null
locationId?: string | null
- methodType?: Database["public"]["Enums"]["methodType"]
- modelUploadId?: string | null
- promisedDate?: string | null
- quantityInvoiced?: number | null
- quantitySent?: number | null
- quantityToInvoice?: number | null
- quantityToSend?: number | null
- requiresInspection?: boolean
- saleQuantity?: number | null
+ notes?: string | null
+ orderDate?: string
+ revisionId?: number
salesOrderId?: string
- salesOrderLineType?: Database["public"]["Enums"]["salesOrderLineType"]
- sentComplete?: boolean
- setupPrice?: number | null
- shelfId?: string | null
- status?: Database["public"]["Enums"]["salesOrderLineStatus"]
- unitOfMeasureCode?: string | null
- unitPrice?: number | null
+ status?: Database["public"]["Enums"]["salesOrderStatus"]
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "salesOrderLine_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
+ foreignKeyName: "salesOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
+ foreignKeyName: "salesOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesOrder_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "salesOrder_closedBy_fkey"
+ columns: ["closedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesOrder_closedBy_fkey"
+ columns: ["closedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_closedBy_fkey"
+ columns: ["closedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_closedBy_fkey"
+ columns: ["closedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_closedBy_fkey"
+ columns: ["closedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "salesOrder_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesOrder_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "salesOrder_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "salesOrder_customerContactId_fkey"
+ columns: ["customerContactId"]
+ isOneToOne: false
+ referencedRelation: "customerContact"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderCustomers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_customerLocationId_fkey"
+ columns: ["customerLocationId"]
+ isOneToOne: false
+ referencedRelation: "customerLocation"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "salesOrder_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "salesOrder_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "salesOrder_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ salesOrderFavorite: {
+ Row: {
+ salesOrderId: string
+ userId: string
+ }
+ Insert: {
+ salesOrderId: string
+ userId: string
+ }
+ Update: {
+ salesOrderId?: string
+ userId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "salesOrderFavorites_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrder"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderLocations"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ salesOrderLine: {
+ Row: {
+ accountNumber: string | null
+ addOnCost: number
+ assetId: string | null
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ description: string | null
+ id: string
+ invoicedComplete: boolean
+ itemId: string | null
+ itemReadableId: string | null
+ locationId: string | null
+ methodType: Database["public"]["Enums"]["methodType"]
+ modelUploadId: string | null
+ promisedDate: string | null
+ quantityInvoiced: number | null
+ quantitySent: number | null
+ quantityToInvoice: number | null
+ quantityToSend: number | null
+ requiresInspection: boolean
+ saleQuantity: number | null
+ salesOrderId: string
+ salesOrderLineType: Database["public"]["Enums"]["salesOrderLineType"]
+ sentComplete: boolean
+ setupPrice: number | null
+ shelfId: string | null
+ status: Database["public"]["Enums"]["salesOrderLineStatus"]
+ unitOfMeasureCode: string | null
+ unitPrice: number | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ accountNumber?: string | null
+ addOnCost?: number
+ assetId?: string | null
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ description?: string | null
+ id?: string
+ invoicedComplete?: boolean
+ itemId?: string | null
+ itemReadableId?: string | null
+ locationId?: string | null
+ methodType?: Database["public"]["Enums"]["methodType"]
+ modelUploadId?: string | null
+ promisedDate?: string | null
+ quantityInvoiced?: number | null
+ quantitySent?: number | null
+ quantityToInvoice?: number | null
+ quantityToSend?: number | null
+ requiresInspection?: boolean
+ saleQuantity?: number | null
+ salesOrderId: string
+ salesOrderLineType: Database["public"]["Enums"]["salesOrderLineType"]
+ sentComplete?: boolean
+ setupPrice?: number | null
+ shelfId?: string | null
+ status?: Database["public"]["Enums"]["salesOrderLineStatus"]
+ unitOfMeasureCode?: string | null
+ unitPrice?: number | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ accountNumber?: string | null
+ addOnCost?: number
+ assetId?: string | null
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ description?: string | null
+ id?: string
+ invoicedComplete?: boolean
+ itemId?: string | null
+ itemReadableId?: string | null
+ locationId?: string | null
+ methodType?: Database["public"]["Enums"]["methodType"]
+ modelUploadId?: string | null
+ promisedDate?: string | null
+ quantityInvoiced?: number | null
+ quantitySent?: number | null
+ quantityToInvoice?: number | null
+ quantityToSend?: number | null
+ requiresInspection?: boolean
+ saleQuantity?: number | null
+ salesOrderId?: string
+ salesOrderLineType?: Database["public"]["Enums"]["salesOrderLineType"]
+ sentComplete?: boolean
+ setupPrice?: number | null
+ shelfId?: string | null
+ status?: Database["public"]["Enums"]["salesOrderLineStatus"]
+ unitOfMeasureCode?: string | null
+ unitPrice?: number | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "salesOrderLine_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrder"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderLocations"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_shelfId_fkey"
+ columns: ["shelfId", "locationId"]
+ isOneToOne: false
+ referencedRelation: "shelf"
+ referencedColumns: ["id", "locationId"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ salesOrderPayment: {
+ Row: {
+ companyId: string
+ currencyCode: string
+ customFields: Json | null
+ id: string
+ invoiceCustomerContactId: string | null
+ invoiceCustomerId: string | null
+ invoiceCustomerLocationId: string | null
+ paymentComplete: boolean
+ paymentTermId: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ currencyCode?: string
+ customFields?: Json | null
+ id: string
+ invoiceCustomerContactId?: string | null
+ invoiceCustomerId?: string | null
+ invoiceCustomerLocationId?: string | null
+ paymentComplete?: boolean
+ paymentTermId?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ currencyCode?: string
+ customFields?: Json | null
+ id?: string
+ invoiceCustomerContactId?: string | null
+ invoiceCustomerId?: string | null
+ invoiceCustomerLocationId?: string | null
+ paymentComplete?: boolean
+ paymentTermId?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "salesOrderPayment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "salesOrder"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "salesOrderLocations"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "salesOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_invoiceCustomerContactId_fkey"
+ columns: ["invoiceCustomerContactId"]
+ isOneToOne: false
+ referencedRelation: "customerContact"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_invoiceCustomerId_fkey"
+ columns: ["invoiceCustomerId"]
+ isOneToOne: false
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_invoiceCustomerId_fkey"
+ columns: ["invoiceCustomerId"]
+ isOneToOne: false
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_invoiceCustomerId_fkey"
+ columns: ["invoiceCustomerId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderCustomers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_invoiceCustomerLocationId_fkey"
+ columns: ["invoiceCustomerLocationId"]
+ isOneToOne: false
+ referencedRelation: "customerLocation"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_paymentTermId_fkey"
+ columns: ["paymentTermId"]
+ isOneToOne: false
+ referencedRelation: "paymentTerm"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
+ salesOrderShipment: {
+ Row: {
+ assignee: string | null
+ companyId: string
+ customerId: string | null
+ customerLocationId: string | null
+ customFields: Json | null
+ deliveryDate: string | null
+ dropShipment: boolean
+ id: string
+ locationId: string | null
+ notes: string | null
+ receiptPromisedDate: string | null
+ receiptRequestedDate: string | null
+ shippingMethodId: string | null
+ shippingTermId: string | null
+ supplierId: string | null
+ supplierLocationId: string | null
+ trackingNumber: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ assignee?: string | null
+ companyId: string
+ customerId?: string | null
+ customerLocationId?: string | null
+ customFields?: Json | null
+ deliveryDate?: string | null
+ dropShipment?: boolean
+ id: string
+ locationId?: string | null
+ notes?: string | null
+ receiptPromisedDate?: string | null
+ receiptRequestedDate?: string | null
+ shippingMethodId?: string | null
+ shippingTermId?: string | null
+ supplierId?: string | null
+ supplierLocationId?: string | null
+ trackingNumber?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ assignee?: string | null
+ companyId?: string
+ customerId?: string | null
+ customerLocationId?: string | null
+ customFields?: Json | null
+ deliveryDate?: string | null
+ dropShipment?: boolean
+ id?: string
+ locationId?: string | null
+ notes?: string | null
+ receiptPromisedDate?: string | null
+ receiptRequestedDate?: string | null
+ shippingMethodId?: string | null
+ shippingTermId?: string | null
+ supplierId?: string | null
+ supplierLocationId?: string | null
+ trackingNumber?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "salesOrderShipment_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "salesOrderCustomers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesOrderShipment_customerLocationId_fkey"
+ columns: ["customerLocationId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "customerLocation"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
+ foreignKeyName: "salesOrderShipment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "salesOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "salesOrderShipment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "salesOrderLocations"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
+ foreignKeyName: "salesOrderShipment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "salesOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "salesOrderShipment_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesOrderLine_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "salesOrderShipment_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "salesOrder"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "salesOrderShipment_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "salesOrderLocations"
- referencedColumns: ["id"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesOrderLine_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "salesOrderShipment_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
referencedRelation: "salesOrders"
- referencedColumns: ["id"]
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesOrderLine_shelfId_fkey"
- columns: ["shelfId", "locationId"]
+ foreignKeyName: "salesOrderShipment_shippingMethodId_fkey"
+ columns: ["shippingMethodId"]
isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
+ referencedRelation: "shippingMethod"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode", "companyId"]
+ foreignKeyName: "salesOrderShipment_shippingTermId_fkey"
+ columns: ["shippingTermId"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "shippingTerm"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ foreignKeyName: "salesOrderShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ foreignKeyName: "salesOrderShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ foreignKeyName: "salesOrderShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ foreignKeyName: "salesOrderShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ foreignKeyName: "salesOrderShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -15597,558 +16582,530 @@ export type Database = {
},
]
}
- salesOrderPayment: {
+ salesOrderStatusHistory: {
Row: {
- companyId: string
- currencyCode: string
- customFields: Json | null
+ createdAt: string
+ createdBy: string
id: string
- invoiceCustomerContactId: string | null
- invoiceCustomerId: string | null
- invoiceCustomerLocationId: string | null
- paymentComplete: boolean
- paymentTermId: string | null
- updatedAt: string | null
- updatedBy: string | null
+ salesOrderId: string
+ status: Database["public"]["Enums"]["salesOrderStatus"]
}
Insert: {
- companyId: string
- currencyCode?: string
- customFields?: Json | null
- id: string
- invoiceCustomerContactId?: string | null
- invoiceCustomerId?: string | null
- invoiceCustomerLocationId?: string | null
- paymentComplete?: boolean
- paymentTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
+ createdAt?: string
+ createdBy: string
+ id?: string
+ salesOrderId: string
+ status: Database["public"]["Enums"]["salesOrderStatus"]
}
Update: {
- companyId?: string
- currencyCode?: string
- customFields?: Json | null
+ createdAt?: string
+ createdBy?: string
id?: string
- invoiceCustomerContactId?: string | null
- invoiceCustomerId?: string | null
- invoiceCustomerLocationId?: string | null
- paymentComplete?: boolean
- paymentTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
+ salesOrderId?: string
+ status?: Database["public"]["Enums"]["salesOrderStatus"]
}
Relationships: [
{
- foreignKeyName: "salesOrderPayment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
+ foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesOrderPayment_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "salesOrderStatusHistory_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
referencedRelation: "salesOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "salesOrderStatusHistory_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
referencedRelation: "salesOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "salesOrderStatusHistory_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
referencedRelation: "salesOrders"
referencedColumns: ["id"]
},
+ ]
+ }
+ salesOrderTransaction: {
+ Row: {
+ createdAt: string
+ id: string
+ salesOrderId: string
+ type: Database["public"]["Enums"]["salesOrderTransactionType"]
+ userId: string
+ }
+ Insert: {
+ createdAt?: string
+ id?: string
+ salesOrderId: string
+ type: Database["public"]["Enums"]["salesOrderTransactionType"]
+ userId: string
+ }
+ Update: {
+ createdAt?: string
+ id?: string
+ salesOrderId?: string
+ type?: Database["public"]["Enums"]["salesOrderTransactionType"]
+ userId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "salesOrderTransaction_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrder"
+ referencedColumns: ["id"]
+ },
{
- foreignKeyName: "salesOrderPayment_invoiceCustomerContactId_fkey"
- columns: ["invoiceCustomerContactId"]
+ foreignKeyName: "salesOrderTransaction_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "customerContact"
+ referencedRelation: "salesOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
+ foreignKeyName: "salesOrderTransaction_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "customer"
+ referencedRelation: "salesOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
+ foreignKeyName: "salesOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "customers"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
+ foreignKeyName: "salesOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_invoiceCustomerLocationId_fkey"
- columns: ["invoiceCustomerLocationId"]
+ foreignKeyName: "salesOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "customerLocation"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_paymentTermId_fkey"
- columns: ["paymentTermId"]
+ foreignKeyName: "salesOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "paymentTerm"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "salesOrderTransaction_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
]
}
- salesOrderShipment: {
+ salesRfq: {
Row: {
assignee: string | null
companyId: string
- customerId: string | null
+ createdAt: string | null
+ createdBy: string | null
+ customerContactId: string | null
+ customerId: string
customerLocationId: string | null
+ customerReference: string | null
customFields: Json | null
- deliveryDate: string | null
- dropShipment: boolean
+ employeeId: string | null
+ expirationDate: string | null
+ externalNotes: Json | null
id: string
+ internalNotes: Json | null
locationId: string | null
- notes: string | null
- receiptPromisedDate: string | null
- receiptRequestedDate: string | null
- shippingMethodId: string | null
- shippingTermId: string | null
- supplierId: string | null
- supplierLocationId: string | null
- trackingNumber: string | null
+ revisionId: number
+ rfqDate: string
+ rfqId: string
+ status: Database["public"]["Enums"]["salesRfqStatus"]
updatedAt: string | null
updatedBy: string | null
}
Insert: {
assignee?: string | null
companyId: string
- customerId?: string | null
+ createdAt?: string | null
+ createdBy?: string | null
+ customerContactId?: string | null
+ customerId: string
customerLocationId?: string | null
+ customerReference?: string | null
customFields?: Json | null
- deliveryDate?: string | null
- dropShipment?: boolean
- id: string
+ employeeId?: string | null
+ expirationDate?: string | null
+ externalNotes?: Json | null
+ id?: string
+ internalNotes?: Json | null
locationId?: string | null
- notes?: string | null
- receiptPromisedDate?: string | null
- receiptRequestedDate?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- supplierId?: string | null
- supplierLocationId?: string | null
- trackingNumber?: string | null
+ revisionId?: number
+ rfqDate: string
+ rfqId: string
+ status?: Database["public"]["Enums"]["salesRfqStatus"]
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
assignee?: string | null
companyId?: string
- customerId?: string | null
+ createdAt?: string | null
+ createdBy?: string | null
+ customerContactId?: string | null
+ customerId?: string
customerLocationId?: string | null
+ customerReference?: string | null
customFields?: Json | null
- deliveryDate?: string | null
- dropShipment?: boolean
+ employeeId?: string | null
+ expirationDate?: string | null
+ externalNotes?: Json | null
id?: string
+ internalNotes?: Json | null
locationId?: string | null
- notes?: string | null
- receiptPromisedDate?: string | null
- receiptRequestedDate?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- supplierId?: string | null
- supplierLocationId?: string | null
- trackingNumber?: string | null
+ revisionId?: number
+ rfqDate?: string
+ rfqId?: string
+ status?: Database["public"]["Enums"]["salesRfqStatus"]
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "salesOrderShipment_assignee_fkey"
+ foreignKeyName: "salesRfq_assigneeId_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_assignee_fkey"
+ foreignKeyName: "salesRfq_assigneeId_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_assignee_fkey"
+ foreignKeyName: "salesRfq_assigneeId_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_assignee_fkey"
+ foreignKeyName: "salesRfq_assigneeId_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_assignee_fkey"
+ foreignKeyName: "salesRfq_assigneeId_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesOrderShipment_companyId_fkey"
+ foreignKeyName: "salesRfq_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_companyId_fkey"
+ foreignKeyName: "salesRfq_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_companyId_fkey"
+ foreignKeyName: "salesRfq_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesOrderShipment_companyId_fkey"
+ foreignKeyName: "salesRfq_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesOrderShipment_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "salesRfq_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customer"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "salesRfq_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customers"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "salesRfq_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_customerLocationId_fkey"
- columns: ["customerLocationId"]
+ foreignKeyName: "salesRfq_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customerLocation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrderShipment_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "salesOrder"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrderShipment_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "salesOrderLocations"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrderShipment_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "salesOrders"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "salesRfq_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesOrderShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "salesRfq_customerContactId_fkey"
+ columns: ["customerContactId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "customerContact"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "salesRfq_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "salesRfq_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_shippingMethodId_fkey"
- columns: ["shippingMethodId"]
+ foreignKeyName: "salesRfq_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "shippingMethod"
+ referencedRelation: "salesOrderCustomers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_shippingTermId_fkey"
- columns: ["shippingTermId"]
+ foreignKeyName: "salesRfq_customerLocationId_fkey"
+ columns: ["customerLocationId"]
isOneToOne: false
- referencedRelation: "shippingTerm"
+ referencedRelation: "customerLocation"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "salesRfq_employeeId_fkey"
+ columns: ["employeeId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "salesRfq_employeeId_fkey"
+ columns: ["employeeId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "salesRfq_employeeId_fkey"
+ columns: ["employeeId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "salesRfq_employeeId_fkey"
+ columns: ["employeeId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "salesRfq_employeeId_fkey"
+ columns: ["employeeId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- salesOrderStatusHistory: {
- Row: {
- createdAt: string
- createdBy: string
- id: string
- salesOrderId: string
- status: Database["public"]["Enums"]["salesOrderStatus"]
- }
- Insert: {
- createdAt?: string
- createdBy: string
- id?: string
- salesOrderId: string
- status: Database["public"]["Enums"]["salesOrderStatus"]
- }
- Update: {
- createdAt?: string
- createdBy?: string
- id?: string
- salesOrderId?: string
- status?: Database["public"]["Enums"]["salesOrderStatus"]
- }
- Relationships: [
{
- foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesRfq_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "salesRfq_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfq_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "salesRfq_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "salesRfq_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesRfq_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesRfq_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesRfq_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesRfq_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "salesOrderStatusHistory_salesOrderId_fkey"
- columns: ["salesOrderId"]
- isOneToOne: false
- referencedRelation: "salesOrder"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrderStatusHistory_salesOrderId_fkey"
- columns: ["salesOrderId"]
- isOneToOne: false
- referencedRelation: "salesOrderLocations"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrderStatusHistory_salesOrderId_fkey"
- columns: ["salesOrderId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["id"]
- },
]
}
- salesOrderTransaction: {
+ salesRfqFavorite: {
Row: {
- createdAt: string
- id: string
- salesOrderId: string
- type: Database["public"]["Enums"]["salesOrderTransactionType"]
+ rfqId: string
userId: string
}
Insert: {
- createdAt?: string
- id?: string
- salesOrderId: string
- type: Database["public"]["Enums"]["salesOrderTransactionType"]
+ rfqId: string
userId: string
}
Update: {
- createdAt?: string
- id?: string
- salesOrderId?: string
- type?: Database["public"]["Enums"]["salesOrderTransactionType"]
+ rfqId?: string
userId?: string
}
Relationships: [
{
- foreignKeyName: "salesOrderTransaction_salesOrderId_fkey"
- columns: ["salesOrderId"]
- isOneToOne: false
- referencedRelation: "salesOrder"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrderTransaction_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "salesRfqFavorites_salesRfqId_fkey"
+ columns: ["rfqId"]
isOneToOne: false
- referencedRelation: "salesOrderLocations"
+ referencedRelation: "salesRfq"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderTransaction_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "salesRfqFavorites_salesRfqId_fkey"
+ columns: ["rfqId"]
isOneToOne: false
- referencedRelation: "salesOrders"
+ referencedRelation: "salesRfqs"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderTransaction_userId_fkey"
+ foreignKeyName: "salesRfqFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderTransaction_userId_fkey"
+ foreignKeyName: "salesRfqFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderTransaction_userId_fkey"
+ foreignKeyName: "salesRfqFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderTransaction_userId_fkey"
+ foreignKeyName: "salesRfqFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderTransaction_userId_fkey"
+ foreignKeyName: "salesRfqFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -16156,733 +17113,926 @@ export type Database = {
},
]
}
- salesRfq: {
+ salesRfqLine: {
Row: {
- assignee: string | null
companyId: string
createdAt: string | null
- createdBy: string | null
- customerContactId: string | null
- customerId: string
- customerLocationId: string | null
- customerReference: string | null
+ createdBy: string
+ customerPartId: string
+ customerPartRevision: string | null
customFields: Json | null
- employeeId: string | null
- expirationDate: string | null
+ description: string | null
externalNotes: Json | null
id: string
internalNotes: Json | null
- locationId: string | null
- revisionId: number
- rfqDate: string
- rfqId: string
- status: Database["public"]["Enums"]["salesRfqStatus"]
+ itemId: string | null
+ modelUploadId: string | null
+ order: number
+ quantity: number[] | null
+ salesRfqId: string
+ unitOfMeasureCode: string
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- assignee?: string | null
companyId: string
createdAt?: string | null
- createdBy?: string | null
- customerContactId?: string | null
- customerId: string
- customerLocationId?: string | null
- customerReference?: string | null
+ createdBy: string
+ customerPartId: string
+ customerPartRevision?: string | null
customFields?: Json | null
- employeeId?: string | null
- expirationDate?: string | null
+ description?: string | null
externalNotes?: Json | null
id?: string
internalNotes?: Json | null
- locationId?: string | null
- revisionId?: number
- rfqDate: string
- rfqId: string
- status?: Database["public"]["Enums"]["salesRfqStatus"]
+ itemId?: string | null
+ modelUploadId?: string | null
+ order?: number
+ quantity?: number[] | null
+ salesRfqId: string
+ unitOfMeasureCode: string
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- assignee?: string | null
companyId?: string
createdAt?: string | null
- createdBy?: string | null
- customerContactId?: string | null
- customerId?: string
- customerLocationId?: string | null
- customerReference?: string | null
+ createdBy?: string
+ customerPartId?: string
+ customerPartRevision?: string | null
customFields?: Json | null
- employeeId?: string | null
- expirationDate?: string | null
+ description?: string | null
externalNotes?: Json | null
id?: string
internalNotes?: Json | null
- locationId?: string | null
- revisionId?: number
- rfqDate?: string
- rfqId?: string
- status?: Database["public"]["Enums"]["salesRfqStatus"]
+ itemId?: string | null
+ modelUploadId?: string | null
+ order?: number
+ quantity?: number[] | null
+ salesRfqId?: string
+ unitOfMeasureCode?: string
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "salesRfq_assigneeId_fkey"
- columns: ["assignee"]
+ foreignKeyName: "salesRfqLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_salesRfqId_fkey"
+ columns: ["salesRfqId"]
+ isOneToOne: false
+ referencedRelation: "salesRfq"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_salesRfqId_fkey"
+ columns: ["salesRfqId"]
+ isOneToOne: false
+ referencedRelation: "salesRfqs"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_assigneeId_fkey"
- columns: ["assignee"]
+ foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_assigneeId_fkey"
- columns: ["assignee"]
+ foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_assigneeId_fkey"
- columns: ["assignee"]
+ foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_assigneeId_fkey"
- columns: ["assignee"]
+ foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ search: {
+ Row: {
+ companyId: string | null
+ description: string | null
+ entity: Database["public"]["Enums"]["searchEntity"] | null
+ fts: unknown | null
+ id: number
+ link: string
+ name: string
+ uuid: string | null
+ }
+ Insert: {
+ companyId?: string | null
+ description?: string | null
+ entity?: Database["public"]["Enums"]["searchEntity"] | null
+ fts?: unknown | null
+ id?: number
+ link: string
+ name: string
+ uuid?: string | null
+ }
+ Update: {
+ companyId?: string | null
+ description?: string | null
+ entity?: Database["public"]["Enums"]["searchEntity"] | null
+ fts?: unknown | null
+ id?: number
+ link?: string
+ name?: string
+ uuid?: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "salesRfq_companyId_fkey"
+ foreignKeyName: "search_companyid_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_companyId_fkey"
+ foreignKeyName: "search_companyid_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_companyId_fkey"
+ foreignKeyName: "search_companyid_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfq_companyId_fkey"
+ foreignKeyName: "search_companyid_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
+ ]
+ }
+ sequence: {
+ Row: {
+ companyId: string
+ id: string
+ name: string
+ next: number
+ prefix: string | null
+ size: number
+ step: number
+ suffix: string | null
+ table: string
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ id?: string
+ name: string
+ next?: number
+ prefix?: string | null
+ size?: number
+ step?: number
+ suffix?: string | null
+ table: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ id?: string
+ name?: string
+ next?: number
+ prefix?: string | null
+ size?: number
+ step?: number
+ suffix?: string | null
+ table?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "salesRfq_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesRfq_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "sequence_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "sequence_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "sequence_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfq_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "sequence_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfq_customerContactId_fkey"
- columns: ["customerContactId"]
+ foreignKeyName: "sequence_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "customerContact"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "sequence_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "customer"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "sequence_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "customers"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "sequence_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_customerLocationId_fkey"
- columns: ["customerLocationId"]
+ foreignKeyName: "sequence_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "customerLocation"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
+ ]
+ }
+ service: {
+ Row: {
+ approved: boolean
+ approvedBy: string | null
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ fromDate: string | null
+ id: string
+ itemId: string | null
+ serviceType: Database["public"]["Enums"]["serviceType"]
+ toDate: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ approved?: boolean
+ approvedBy?: string | null
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ fromDate?: string | null
+ id: string
+ itemId?: string | null
+ serviceType: Database["public"]["Enums"]["serviceType"]
+ toDate?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ approved?: boolean
+ approvedBy?: string | null
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ fromDate?: string | null
+ id?: string
+ itemId?: string | null
+ serviceType?: Database["public"]["Enums"]["serviceType"]
+ toDate?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "salesRfq_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "service_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "service_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "service_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "service_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "service_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesRfq_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "service_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "service_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "service_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfq_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "service_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfq_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "service_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "service_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "service_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "service_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "service_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- salesRfqFavorite: {
- Row: {
- rfqId: string
- userId: string
- }
- Insert: {
- rfqId: string
- userId: string
- }
- Update: {
- rfqId?: string
- userId?: string
- }
- Relationships: [
{
- foreignKeyName: "salesRfqFavorites_salesRfqId_fkey"
- columns: ["rfqId"]
+ foreignKeyName: "service_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "salesRfq"
+ referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqFavorites_salesRfqId_fkey"
- columns: ["rfqId"]
+ foreignKeyName: "service_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "salesRfqs"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
{
- foreignKeyName: "salesRfqFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "service_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "service_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "service_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "service_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "service_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- salesRfqLine: {
+ shelf: {
Row: {
+ active: boolean
companyId: string
- createdAt: string | null
+ createdAt: string
createdBy: string
- customerPartId: string
- customerPartRevision: string | null
customFields: Json | null
- description: string | null
- externalNotes: Json | null
id: string
- internalNotes: Json | null
- itemId: string | null
- modelUploadId: string | null
- order: number
- quantity: number[] | null
- salesRfqId: string
- unitOfMeasureCode: string
+ locationId: string
updatedAt: string | null
updatedBy: string | null
+ warehouseId: string | null
}
Insert: {
+ active?: boolean
companyId: string
- createdAt?: string | null
+ createdAt?: string
createdBy: string
- customerPartId: string
- customerPartRevision?: string | null
customFields?: Json | null
- description?: string | null
- externalNotes?: Json | null
- id?: string
- internalNotes?: Json | null
- itemId?: string | null
- modelUploadId?: string | null
- order?: number
- quantity?: number[] | null
- salesRfqId: string
- unitOfMeasureCode: string
+ id: string
+ locationId: string
updatedAt?: string | null
updatedBy?: string | null
+ warehouseId?: string | null
}
Update: {
+ active?: boolean
companyId?: string
- createdAt?: string | null
+ createdAt?: string
createdBy?: string
- customerPartId?: string
- customerPartRevision?: string | null
customFields?: Json | null
- description?: string | null
- externalNotes?: Json | null
id?: string
- internalNotes?: Json | null
- itemId?: string | null
- modelUploadId?: string | null
- order?: number
- quantity?: number[] | null
- salesRfqId?: string
- unitOfMeasureCode?: string
+ locationId?: string
updatedAt?: string | null
updatedBy?: string | null
+ warehouseId?: string | null
}
Relationships: [
{
- foreignKeyName: "salesRfqLine_companyId_fkey"
+ foreignKeyName: "shelf_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_companyId_fkey"
+ foreignKeyName: "shelf_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_companyId_fkey"
+ foreignKeyName: "shelf_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfqLine_companyId_fkey"
+ foreignKeyName: "shelf_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfqLine_createdBy_fkey"
+ foreignKeyName: "shelf_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_createdBy_fkey"
+ foreignKeyName: "shelf_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_createdBy_fkey"
+ foreignKeyName: "shelf_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_createdBy_fkey"
+ foreignKeyName: "shelf_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_createdBy_fkey"
+ foreignKeyName: "shelf_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesRfqLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesRfqLine_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "shelf_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesRfqLine_salesRfqId_fkey"
- columns: ["salesRfqId"]
+ foreignKeyName: "shelf_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "salesRfq"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_salesRfqId_fkey"
- columns: ["salesRfqId"]
+ foreignKeyName: "shelf_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "salesRfqs"
- referencedColumns: ["id"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesRfqLine_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode", "companyId"]
+ foreignKeyName: "shelf_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ foreignKeyName: "shelf_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ foreignKeyName: "shelf_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesRfqLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ foreignKeyName: "shelf_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
- search: {
- Row: {
- companyId: string | null
- description: string | null
- entity: Database["public"]["Enums"]["searchEntity"] | null
- fts: unknown | null
- id: number
- link: string
- name: string
- uuid: string | null
- }
- Insert: {
- companyId?: string | null
- description?: string | null
- entity?: Database["public"]["Enums"]["searchEntity"] | null
- fts?: unknown | null
- id?: number
- link: string
- name: string
- uuid?: string | null
- }
- Update: {
- companyId?: string | null
- description?: string | null
- entity?: Database["public"]["Enums"]["searchEntity"] | null
- fts?: unknown | null
- id?: number
- link?: string
- name?: string
- uuid?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "search_companyid_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "search_companyid_fkey"
- columns: ["companyId"]
+ foreignKeyName: "shelf_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "search_companyid_fkey"
- columns: ["companyId"]
+ foreignKeyName: "shelf_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "search_companyid_fkey"
- columns: ["companyId"]
+ foreignKeyName: "shelf_warehouseId_fkey"
+ columns: ["warehouseId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "warehouse"
+ referencedColumns: ["id"]
},
]
}
- sequence: {
+ shift: {
Row: {
+ active: boolean
companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ endTime: string
+ friday: boolean
id: string
+ locationId: string
+ monday: boolean
name: string
- next: number
- prefix: string | null
- size: number
- step: number
- suffix: string | null
- table: string
+ saturday: boolean
+ startTime: string
+ sunday: boolean
+ thursday: boolean
+ tuesday: boolean
updatedAt: string | null
updatedBy: string | null
+ wednesday: boolean
}
Insert: {
+ active?: boolean
companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ endTime: string
+ friday?: boolean
id?: string
+ locationId: string
+ monday?: boolean
name: string
- next?: number
- prefix?: string | null
- size?: number
- step?: number
- suffix?: string | null
- table: string
+ saturday?: boolean
+ startTime: string
+ sunday?: boolean
+ thursday?: boolean
+ tuesday?: boolean
updatedAt?: string | null
updatedBy?: string | null
+ wednesday?: boolean
}
Update: {
+ active?: boolean
companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ endTime?: string
+ friday?: boolean
id?: string
+ locationId?: string
+ monday?: boolean
name?: string
- next?: number
- prefix?: string | null
- size?: number
- step?: number
- suffix?: string | null
- table?: string
+ saturday?: boolean
+ startTime?: string
+ sunday?: boolean
+ thursday?: boolean
+ tuesday?: boolean
updatedAt?: string | null
updatedBy?: string | null
+ wednesday?: boolean
}
Relationships: [
{
- foreignKeyName: "sequence_companyId_fkey"
+ foreignKeyName: "shifts_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "sequence_companyId_fkey"
+ foreignKeyName: "shifts_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "sequence_companyId_fkey"
+ foreignKeyName: "shifts_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "sequence_companyId_fkey"
+ foreignKeyName: "shifts_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "sequence_updatedBy_fkey"
+ foreignKeyName: "shifts_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shifts_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shifts_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shifts_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shifts_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "shifts_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "shifts_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shifts_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "shifts_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "shifts_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "sequence_updatedBy_fkey"
+ foreignKeyName: "shifts_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "sequence_updatedBy_fkey"
+ foreignKeyName: "shifts_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "sequence_updatedBy_fkey"
+ foreignKeyName: "shifts_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "sequence_updatedBy_fkey"
+ foreignKeyName: "shifts_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -16890,195 +18040,157 @@ export type Database = {
},
]
}
- service: {
+ shippingMethod: {
Row: {
- approved: boolean
- approvedBy: string | null
+ active: boolean
+ carrier: Database["public"]["Enums"]["shippingCarrier"]
+ carrierAccountId: string | null
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
- fromDate: string | null
id: string
- itemId: string | null
- serviceType: Database["public"]["Enums"]["serviceType"]
- toDate: string | null
+ name: string
+ trackingUrl: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- approved?: boolean
- approvedBy?: string | null
+ active?: boolean
+ carrier?: Database["public"]["Enums"]["shippingCarrier"]
+ carrierAccountId?: string | null
companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
- fromDate?: string | null
- id: string
- itemId?: string | null
- serviceType: Database["public"]["Enums"]["serviceType"]
- toDate?: string | null
+ id?: string
+ name: string
+ trackingUrl?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- approved?: boolean
- approvedBy?: string | null
+ active?: boolean
+ carrier?: Database["public"]["Enums"]["shippingCarrier"]
+ carrierAccountId?: string | null
companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
- fromDate?: string | null
id?: string
- itemId?: string | null
- serviceType?: Database["public"]["Enums"]["serviceType"]
- toDate?: string | null
+ name?: string
+ trackingUrl?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "service_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "service_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "service_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "service_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "shippingMethod_carrierAccountId_fkey"
+ columns: ["carrierAccountId", "companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "service_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "shippingMethod_carrierAccountId_fkey"
+ columns: ["carrierAccountId", "companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "service_companyId_fkey"
+ foreignKeyName: "shippingMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_companyId_fkey"
+ foreignKeyName: "shippingMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_companyId_fkey"
+ foreignKeyName: "shippingMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "service_companyId_fkey"
+ foreignKeyName: "shippingMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "service_createdBy_fkey"
+ foreignKeyName: "shippingMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_createdBy_fkey"
+ foreignKeyName: "shippingMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_createdBy_fkey"
+ foreignKeyName: "shippingMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_createdBy_fkey"
+ foreignKeyName: "shippingMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_createdBy_fkey"
+ foreignKeyName: "shippingMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "service_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "service_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
- },
- {
- foreignKeyName: "service_updatedBy_fkey"
+ foreignKeyName: "shippingMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_updatedBy_fkey"
+ foreignKeyName: "shippingMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_updatedBy_fkey"
+ foreignKeyName: "shippingMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_updatedBy_fkey"
+ foreignKeyName: "shippingMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_updatedBy_fkey"
+ foreignKeyName: "shippingMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -17086,523 +18198,365 @@ export type Database = {
},
]
}
- shelf: {
+ shippingTerm: {
Row: {
active: boolean
companyId: string
createdAt: string
createdBy: string
- customFields: Json | null
id: string
- locationId: string
+ name: string
updatedAt: string | null
updatedBy: string | null
- warehouseId: string | null
}
Insert: {
active?: boolean
companyId: string
createdAt?: string
createdBy: string
- customFields?: Json | null
- id: string
- locationId: string
+ id?: string
+ name: string
updatedAt?: string | null
updatedBy?: string | null
- warehouseId?: string | null
}
Update: {
active?: boolean
companyId?: string
createdAt?: string
createdBy?: string
- customFields?: Json | null
id?: string
- locationId?: string
+ name?: string
updatedAt?: string | null
updatedBy?: string | null
- warehouseId?: string | null
}
Relationships: [
{
- foreignKeyName: "shelf_companyId_fkey"
+ foreignKeyName: "shippingTerm_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_companyId_fkey"
+ foreignKeyName: "shippingTerm_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_companyId_fkey"
+ foreignKeyName: "shippingTerm_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "shelf_companyId_fkey"
+ foreignKeyName: "shippingTerm_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "shelf_createdBy_fkey"
+ foreignKeyName: "shippingTerm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_createdBy_fkey"
+ foreignKeyName: "shippingTerm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_createdBy_fkey"
+ foreignKeyName: "shippingTerm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_createdBy_fkey"
+ foreignKeyName: "shippingTerm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_createdBy_fkey"
+ foreignKeyName: "shippingTerm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "shelf_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "shelf_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shelf_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "shelf_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "shelf_updatedBy_fkey"
+ foreignKeyName: "shippingTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_updatedBy_fkey"
+ foreignKeyName: "shippingTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_updatedBy_fkey"
+ foreignKeyName: "shippingTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_updatedBy_fkey"
+ foreignKeyName: "shippingTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_updatedBy_fkey"
+ foreignKeyName: "shippingTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "shelf_warehouseId_fkey"
- columns: ["warehouseId"]
- isOneToOne: false
- referencedRelation: "warehouse"
- referencedColumns: ["id"]
- },
]
}
- shift: {
+ supplier: {
Row: {
- active: boolean
+ accountManagerId: string | null
+ assignee: string | null
companyId: string
createdAt: string
- createdBy: string
+ createdBy: string | null
customFields: Json | null
- endTime: string
- friday: boolean
id: string
- locationId: string
- monday: boolean
+ logo: string | null
name: string
- saturday: boolean
- startTime: string
- sunday: boolean
- thursday: boolean
- tuesday: boolean
+ supplierStatusId: string | null
+ supplierTypeId: string | null
+ taxId: string | null
updatedAt: string | null
updatedBy: string | null
- wednesday: boolean
}
Insert: {
- active?: boolean
+ accountManagerId?: string | null
+ assignee?: string | null
companyId: string
createdAt?: string
- createdBy: string
+ createdBy?: string | null
customFields?: Json | null
- endTime: string
- friday?: boolean
id?: string
- locationId: string
- monday?: boolean
+ logo?: string | null
name: string
- saturday?: boolean
- startTime: string
- sunday?: boolean
- thursday?: boolean
- tuesday?: boolean
+ supplierStatusId?: string | null
+ supplierTypeId?: string | null
+ taxId?: string | null
updatedAt?: string | null
updatedBy?: string | null
- wednesday?: boolean
}
Update: {
- active?: boolean
+ accountManagerId?: string | null
+ assignee?: string | null
companyId?: string
createdAt?: string
- createdBy?: string
+ createdBy?: string | null
customFields?: Json | null
- endTime?: string
- friday?: boolean
id?: string
- locationId?: string
- monday?: boolean
+ logo?: string | null
name?: string
- saturday?: boolean
- startTime?: string
- sunday?: boolean
- thursday?: boolean
- tuesday?: boolean
+ supplierStatusId?: string | null
+ supplierTypeId?: string | null
+ taxId?: string | null
updatedAt?: string | null
updatedBy?: string | null
- wednesday?: boolean
}
Relationships: [
{
- foreignKeyName: "shifts_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shifts_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shifts_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "shifts_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "shifts_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplier_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplier_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplier_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplier_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplier_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "shifts_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "shifts_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shifts_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "shifts_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "shifts_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplier_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplier_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplier_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "shifts_updatedBy_fkey"
- columns: ["updatedBy"]
+ {
+ foreignKeyName: "supplier_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplier_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- shippingMethod: {
- Row: {
- active: boolean
- carrier: Database["public"]["Enums"]["shippingCarrier"]
- carrierAccountId: string | null
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- id: string
- name: string
- trackingUrl: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- active?: boolean
- carrier?: Database["public"]["Enums"]["shippingCarrier"]
- carrierAccountId?: string | null
- companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- id?: string
- name: string
- trackingUrl?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- active?: boolean
- carrier?: Database["public"]["Enums"]["shippingCarrier"]
- carrierAccountId?: string | null
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- id?: string
- name?: string
- trackingUrl?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "shippingMethod_carrierAccountId_fkey"
- columns: ["carrierAccountId", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "shippingMethod_carrierAccountId_fkey"
- columns: ["carrierAccountId", "companyId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
- },
{
- foreignKeyName: "shippingMethod_companyId_fkey"
+ foreignKeyName: "supplier_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_companyId_fkey"
+ foreignKeyName: "supplier_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_companyId_fkey"
+ foreignKeyName: "supplier_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "shippingMethod_companyId_fkey"
+ foreignKeyName: "supplier_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "shippingMethod_createdBy_fkey"
+ foreignKeyName: "supplier_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_createdBy_fkey"
+ foreignKeyName: "supplier_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_createdBy_fkey"
+ foreignKeyName: "supplier_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_createdBy_fkey"
+ foreignKeyName: "supplier_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_createdBy_fkey"
+ foreignKeyName: "supplier_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "shippingMethod_updatedBy_fkey"
+ foreignKeyName: "supplier_supplierStatusId_fkey"
+ columns: ["supplierStatusId"]
+ isOneToOne: false
+ referencedRelation: "supplierStatus"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplier_supplierTypeId_fkey"
+ columns: ["supplierTypeId"]
+ isOneToOne: false
+ referencedRelation: "supplierType"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplier_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_updatedBy_fkey"
+ foreignKeyName: "supplier_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_updatedBy_fkey"
+ foreignKeyName: "supplier_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_updatedBy_fkey"
+ foreignKeyName: "supplier_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_updatedBy_fkey"
+ foreignKeyName: "supplier_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -17610,971 +18564,999 @@ export type Database = {
},
]
}
- shippingTerm: {
+ supplierAccount: {
Row: {
- active: boolean
companyId: string
- createdAt: string
- createdBy: string
id: string
- name: string
- updatedAt: string | null
- updatedBy: string | null
+ supplierId: string
}
Insert: {
- active?: boolean
companyId: string
- createdAt?: string
- createdBy: string
- id?: string
- name: string
- updatedAt?: string | null
- updatedBy?: string | null
+ id: string
+ supplierId: string
}
Update: {
- active?: boolean
companyId?: string
- createdAt?: string
- createdBy?: string
id?: string
- name?: string
- updatedAt?: string | null
- updatedBy?: string | null
+ supplierId?: string
}
Relationships: [
{
- foreignKeyName: "shippingTerm_companyId_fkey"
+ foreignKeyName: "supplierAccount_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_companyId_fkey"
+ foreignKeyName: "supplierAccount_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_companyId_fkey"
+ foreignKeyName: "supplierAccount_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "shippingTerm_companyId_fkey"
+ foreignKeyName: "supplierAccount_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "shippingTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierAccount_id_fkey"
+ columns: ["id"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierAccount_id_fkey"
+ columns: ["id"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierAccount_id_fkey"
+ columns: ["id"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierAccount_id_fkey"
+ columns: ["id"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierAccount_id_fkey"
+ columns: ["id"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "shippingTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierAccount_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "shippingTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierAccount_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "shippingTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierAccount_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierAccount_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierAccount_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "suppliers"
+ referencedColumns: ["id"]
},
]
}
- supplier: {
+ supplierContact: {
Row: {
- accountManagerId: string | null
- assignee: string | null
- companyId: string
- createdAt: string
- createdBy: string | null
+ contactId: string
customFields: Json | null
id: string
- logo: string | null
- name: string
- supplierStatusId: string | null
- supplierTypeId: string | null
- taxId: string | null
- updatedAt: string | null
- updatedBy: string | null
+ supplierId: string
+ supplierLocationId: string | null
+ userId: string | null
}
Insert: {
- accountManagerId?: string | null
- assignee?: string | null
- companyId: string
- createdAt?: string
- createdBy?: string | null
+ contactId: string
customFields?: Json | null
id?: string
- logo?: string | null
- name: string
- supplierStatusId?: string | null
- supplierTypeId?: string | null
- taxId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
+ supplierId: string
+ supplierLocationId?: string | null
+ userId?: string | null
}
Update: {
- accountManagerId?: string | null
- assignee?: string | null
- companyId?: string
- createdAt?: string
- createdBy?: string | null
+ contactId?: string
customFields?: Json | null
id?: string
- logo?: string | null
- name?: string
- supplierStatusId?: string | null
- supplierTypeId?: string | null
- taxId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
+ supplierId?: string
+ supplierLocationId?: string | null
+ userId?: string | null
}
Relationships: [
{
- foreignKeyName: "supplier_accountManagerId_fkey"
- columns: ["accountManagerId"]
+ foreignKeyName: "supplierContact_contactId_fkey"
+ columns: ["contactId"]
+ isOneToOne: false
+ referencedRelation: "contact"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierContact_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: false
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
+ },
+ {
+ foreignKeyName: "supplierContact_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplier_accountManagerId_fkey"
- columns: ["accountManagerId"]
+ foreignKeyName: "supplierContact_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_accountManagerId_fkey"
- columns: ["accountManagerId"]
+ foreignKeyName: "supplierContact_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_accountManagerId_fkey"
- columns: ["accountManagerId"]
+ foreignKeyName: "supplierContact_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_accountManagerId_fkey"
- columns: ["accountManagerId"]
+ foreignKeyName: "supplierContact_supplierLocationId_fkey"
+ columns: ["supplierLocationId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "supplierLocation"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "supplierContact_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "supplierContact_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "supplierContact_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "supplierContact_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "supplierContact_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ supplierLedger: {
+ Row: {
+ amount: number
+ companyId: string
+ createdAt: string
+ documentId: string | null
+ documentType:
+ | Database["public"]["Enums"]["supplierLedgerDocumentType"]
+ | null
+ entryNumber: number
+ externalDocumentId: string | null
+ id: string
+ postingDate: string
+ supplierId: string
+ }
+ Insert: {
+ amount: number
+ companyId: string
+ createdAt?: string
+ documentId?: string | null
+ documentType?:
+ | Database["public"]["Enums"]["supplierLedgerDocumentType"]
+ | null
+ entryNumber?: number
+ externalDocumentId?: string | null
+ id?: string
+ postingDate?: string
+ supplierId: string
+ }
+ Update: {
+ amount?: number
+ companyId?: string
+ createdAt?: string
+ documentId?: string | null
+ documentType?:
+ | Database["public"]["Enums"]["supplierLedgerDocumentType"]
+ | null
+ entryNumber?: number
+ externalDocumentId?: string | null
+ id?: string
+ postingDate?: string
+ supplierId?: string
+ }
+ Relationships: [
{
- foreignKeyName: "supplier_companyId_fkey"
+ foreignKeyName: "supplierLedger_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_companyId_fkey"
+ foreignKeyName: "supplierLedger_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_companyId_fkey"
+ foreignKeyName: "supplierLedger_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplier_companyId_fkey"
+ foreignKeyName: "supplierLedger_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplier_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierLedger_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplier_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierLedger_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplier_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierLedger_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierLedger_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "supplier_supplierStatusId_fkey"
- columns: ["supplierStatusId"]
+ foreignKeyName: "supplierLedger_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "supplierStatus"
+ referencedRelation: "suppliers"
referencedColumns: ["id"]
},
+ ]
+ }
+ supplierLocation: {
+ Row: {
+ addressId: string
+ customFields: Json | null
+ id: string
+ name: string
+ supplierId: string
+ }
+ Insert: {
+ addressId: string
+ customFields?: Json | null
+ id?: string
+ name: string
+ supplierId: string
+ }
+ Update: {
+ addressId?: string
+ customFields?: Json | null
+ id?: string
+ name?: string
+ supplierId?: string
+ }
+ Relationships: [
{
- foreignKeyName: "supplier_supplierTypeId_fkey"
- columns: ["supplierTypeId"]
+ foreignKeyName: "supplierLocation_addressId_fkey"
+ columns: ["addressId"]
isOneToOne: false
- referencedRelation: "supplierType"
+ referencedRelation: "address"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierLocation_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplier_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierLocation_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplier_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierLocation_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierLocation_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierLocation_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "suppliers"
+ referencedColumns: ["id"]
},
]
}
- supplierAccount: {
+ supplierPayment: {
Row: {
companyId: string
- id: string
+ currencyCode: string | null
+ customFields: Json | null
+ invoiceSupplierContactId: string | null
+ invoiceSupplierId: string | null
+ invoiceSupplierLocationId: string | null
+ paymentTermId: string | null
supplierId: string
+ updatedAt: string | null
+ updatedBy: string | null
}
Insert: {
companyId: string
- id: string
+ currencyCode?: string | null
+ customFields?: Json | null
+ invoiceSupplierContactId?: string | null
+ invoiceSupplierId?: string | null
+ invoiceSupplierLocationId?: string | null
+ paymentTermId?: string | null
supplierId: string
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Update: {
companyId?: string
- id?: string
+ currencyCode?: string | null
+ customFields?: Json | null
+ invoiceSupplierContactId?: string | null
+ invoiceSupplierId?: string | null
+ invoiceSupplierLocationId?: string | null
+ paymentTermId?: string | null
supplierId?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierAccount_companyId_fkey"
+ foreignKeyName: "supplierPayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierAccount_companyId_fkey"
+ foreignKeyName: "supplierPayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierAccount_companyId_fkey"
+ foreignKeyName: "supplierPayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierAccount_companyId_fkey"
+ foreignKeyName: "supplierPayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierAccount_id_fkey"
- columns: ["id"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierAccount_id_fkey"
- columns: ["id"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierAccount_id_fkey"
- columns: ["id"]
+ foreignKeyName: "supplierPayment_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "supplierAccount_id_fkey"
- columns: ["id"]
+ foreignKeyName: "supplierPayment_invoiceSupplierContactId_fkey"
+ columns: ["invoiceSupplierContactId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "supplierContact"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierAccount_id_fkey"
- columns: ["id"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
referencedRelation: "contractors"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
referencedRelation: "partners"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
referencedRelation: "suppliers"
referencedColumns: ["id"]
},
- ]
- }
- supplierContact: {
- Row: {
- contactId: string
- customFields: Json | null
- id: string
- supplierId: string
- supplierLocationId: string | null
- userId: string | null
- }
- Insert: {
- contactId: string
- customFields?: Json | null
- id?: string
- supplierId: string
- supplierLocationId?: string | null
- userId?: string | null
- }
- Update: {
- contactId?: string
- customFields?: Json | null
- id?: string
- supplierId?: string
- supplierLocationId?: string | null
- userId?: string | null
- }
- Relationships: [
{
- foreignKeyName: "supplierContact_contactId_fkey"
- columns: ["contactId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierLocationId_fkey"
+ columns: ["invoiceSupplierLocationId"]
isOneToOne: false
- referencedRelation: "contact"
+ referencedRelation: "supplierLocation"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierPayment_paymentTermId_fkey"
+ columns: ["paymentTermId"]
isOneToOne: false
+ referencedRelation: "paymentTerm"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierPayment_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: true
referencedRelation: "contractors"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
+ foreignKeyName: "supplierPayment_supplierId_fkey"
columns: ["supplierId"]
- isOneToOne: false
+ isOneToOne: true
referencedRelation: "partners"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
+ foreignKeyName: "supplierPayment_supplierId_fkey"
columns: ["supplierId"]
- isOneToOne: false
+ isOneToOne: true
referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
+ foreignKeyName: "supplierPayment_supplierId_fkey"
columns: ["supplierId"]
- isOneToOne: false
+ isOneToOne: true
referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
+ foreignKeyName: "supplierPayment_supplierId_fkey"
columns: ["supplierId"]
- isOneToOne: false
+ isOneToOne: true
referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_supplierLocationId_fkey"
- columns: ["supplierLocationId"]
- isOneToOne: false
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierContact_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "supplierPayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "supplierPayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "supplierPayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "supplierPayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "supplierPayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- supplierLedger: {
+ supplierProcess: {
Row: {
- amount: number
companyId: string
createdAt: string
- documentId: string | null
- documentType:
- | Database["public"]["Enums"]["supplierLedgerDocumentType"]
- | null
- entryNumber: number
- externalDocumentId: string | null
+ createdBy: string
+ customFields: Json | null
id: string
- postingDate: string
+ leadTime: number
+ minimumCost: number
+ processId: string
supplierId: string
+ unitCost: number
+ updatedAt: string | null
+ updatedBy: string | null
}
Insert: {
- amount: number
companyId: string
createdAt?: string
- documentId?: string | null
- documentType?:
- | Database["public"]["Enums"]["supplierLedgerDocumentType"]
- | null
- entryNumber?: number
- externalDocumentId?: string | null
+ createdBy: string
+ customFields?: Json | null
id?: string
- postingDate?: string
+ leadTime?: number
+ minimumCost?: number
+ processId: string
supplierId: string
+ unitCost?: number
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Update: {
- amount?: number
companyId?: string
createdAt?: string
- documentId?: string | null
- documentType?:
- | Database["public"]["Enums"]["supplierLedgerDocumentType"]
- | null
- entryNumber?: number
- externalDocumentId?: string | null
+ createdBy?: string
+ customFields?: Json | null
id?: string
- postingDate?: string
+ leadTime?: number
+ minimumCost?: number
+ processId?: string
supplierId?: string
+ unitCost?: number
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierLedger_companyId_fkey"
+ foreignKeyName: "supplierProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLedger_companyId_fkey"
+ foreignKeyName: "supplierProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLedger_companyId_fkey"
+ foreignKeyName: "supplierProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierLedger_companyId_fkey"
+ foreignKeyName: "supplierProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
+ foreignKeyName: "supplierProcess_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierProcess_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierProcess_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierProcess_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierProcess_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "supplierProcess_processId_fkey"
+ columns: ["processId"]
+ isOneToOne: false
+ referencedRelation: "process"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierProcess_processId_fkey"
+ columns: ["processId"]
+ isOneToOne: false
+ referencedRelation: "processes"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierProcess_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "contractors"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
+ foreignKeyName: "supplierProcess_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "partners"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
+ foreignKeyName: "supplierProcess_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
+ foreignKeyName: "supplierProcess_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
+ foreignKeyName: "supplierProcess_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "suppliers"
referencedColumns: ["id"]
},
- ]
- }
- supplierLocation: {
- Row: {
- addressId: string
- customFields: Json | null
- id: string
- name: string
- supplierId: string
- }
- Insert: {
- addressId: string
- customFields?: Json | null
- id?: string
- name: string
- supplierId: string
- }
- Update: {
- addressId?: string
- customFields?: Json | null
- id?: string
- name?: string
- supplierId?: string
- }
- Relationships: [
{
- foreignKeyName: "supplierLocation_addressId_fkey"
- columns: ["addressId"]
+ foreignKeyName: "supplierProcess_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "address"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
- isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
- },
- {
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierProcess_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierProcess_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierProcess_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "supplier"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierProcess_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
]
}
- supplierPayment: {
+ supplierShipping: {
Row: {
companyId: string
- currencyCode: string | null
customFields: Json | null
- invoiceSupplierContactId: string | null
- invoiceSupplierId: string | null
- invoiceSupplierLocationId: string | null
- paymentTermId: string | null
+ shippingMethodId: string | null
+ shippingSupplierContactId: string | null
+ shippingSupplierId: string | null
+ shippingSupplierLocationId: string | null
+ shippingTermId: string | null
supplierId: string
updatedAt: string | null
updatedBy: string | null
}
Insert: {
companyId: string
- currencyCode?: string | null
customFields?: Json | null
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentTermId?: string | null
+ shippingMethodId?: string | null
+ shippingSupplierContactId?: string | null
+ shippingSupplierId?: string | null
+ shippingSupplierLocationId?: string | null
+ shippingTermId?: string | null
supplierId: string
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
companyId?: string
- currencyCode?: string | null
customFields?: Json | null
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentTermId?: string | null
+ shippingMethodId?: string | null
+ shippingSupplierContactId?: string | null
+ shippingSupplierId?: string | null
+ shippingSupplierLocationId?: string | null
+ shippingTermId?: string | null
supplierId?: string
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierPayment_companyId_fkey"
+ foreignKeyName: "supplierShipping_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_companyId_fkey"
+ foreignKeyName: "supplierShipping_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_companyId_fkey"
+ foreignKeyName: "supplierShipping_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierPayment_companyId_fkey"
+ foreignKeyName: "supplierShipping_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierPayment_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
+ foreignKeyName: "supplierShipping_shippingMethodId_fkey"
+ columns: ["shippingMethodId"]
isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "shippingMethod"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierContactId_fkey"
- columns: ["invoiceSupplierContactId"]
+ foreignKeyName: "supplierShipping_shippingSupplierContactId_fkey"
+ columns: ["shippingSupplierContactId"]
isOneToOne: false
referencedRelation: "supplierContact"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
+ columns: ["shippingSupplierId"]
isOneToOne: false
referencedRelation: "contractors"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
+ columns: ["shippingSupplierId"]
isOneToOne: false
referencedRelation: "partners"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
+ columns: ["shippingSupplierId"]
isOneToOne: false
referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
+ columns: ["shippingSupplierId"]
isOneToOne: false
referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
+ columns: ["shippingSupplierId"]
isOneToOne: false
referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierLocationId_fkey"
- columns: ["invoiceSupplierLocationId"]
+ foreignKeyName: "supplierShipping_shippingSupplierLocationId_fkey"
+ columns: ["shippingSupplierLocationId"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_paymentTermId_fkey"
- columns: ["paymentTermId"]
+ foreignKeyName: "supplierShipping_shippingTermId_fkey"
+ columns: ["shippingTermId"]
isOneToOne: false
- referencedRelation: "paymentTerm"
+ referencedRelation: "shippingTerm"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
+ foreignKeyName: "supplierShipping_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: true
referencedRelation: "contractors"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
+ foreignKeyName: "supplierShipping_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: true
referencedRelation: "partners"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
+ foreignKeyName: "supplierShipping_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: true
referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
+ foreignKeyName: "supplierShipping_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: true
referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
+ foreignKeyName: "supplierShipping_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: true
referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_updatedBy_fkey"
+ foreignKeyName: "supplierShipping_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_updatedBy_fkey"
+ foreignKeyName: "supplierShipping_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_updatedBy_fkey"
+ foreignKeyName: "supplierShipping_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_updatedBy_fkey"
+ foreignKeyName: "supplierShipping_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_updatedBy_fkey"
+ foreignKeyName: "supplierShipping_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -18582,18 +19564,14 @@ export type Database = {
},
]
}
- supplierProcess: {
+ supplierStatus: {
Row: {
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
id: string
- leadTime: number
- minimumCost: number
- processId: string
- supplierId: string
- unitCost: number
+ name: string
updatedAt: string | null
updatedBy: string | null
}
@@ -18603,11 +19581,7 @@ export type Database = {
createdBy: string
customFields?: Json | null
id?: string
- leadTime?: number
- minimumCost?: number
- processId: string
- supplierId: string
- unitCost?: number
+ name: string
updatedAt?: string | null
updatedBy?: string | null
}
@@ -18617,157 +19591,104 @@ export type Database = {
createdBy?: string
customFields?: Json | null
id?: string
- leadTime?: number
- minimumCost?: number
- processId?: string
- supplierId?: string
- unitCost?: number
+ name?: string
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierProcess_companyId_fkey"
+ foreignKeyName: "supplierStatus_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierProcess_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "supplierProcess_companyId_fkey"
+ foreignKeyName: "supplierStatus_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "supplierProcess_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierProcess_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierProcess_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierProcess_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierProcess_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "supplierProcess_processId_fkey"
- columns: ["processId"]
- isOneToOne: false
- referencedRelation: "process"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "supplierStatus_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "processes"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierProcess_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierStatus_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierProcess_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierStatus_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierStatus_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierStatus_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "supplier"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierStatus_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "suppliers"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_updatedBy_fkey"
+ foreignKeyName: "supplierStatus_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "supplierStatus_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_updatedBy_fkey"
+ foreignKeyName: "supplierStatus_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_updatedBy_fkey"
+ foreignKeyName: "supplierStatus_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_updatedBy_fkey"
+ foreignKeyName: "supplierStatus_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_updatedBy_fkey"
+ foreignKeyName: "supplierStatus_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -18775,200 +19696,222 @@ export type Database = {
},
]
}
- supplierShipping: {
+ supplierType: {
Row: {
companyId: string
+ createdAt: string
+ createdBy: string
customFields: Json | null
- shippingMethodId: string | null
- shippingSupplierContactId: string | null
- shippingSupplierId: string | null
- shippingSupplierLocationId: string | null
- shippingTermId: string | null
- supplierId: string
+ id: string
+ name: string
+ protected: boolean
updatedAt: string | null
updatedBy: string | null
}
Insert: {
companyId: string
+ createdAt?: string
+ createdBy: string
customFields?: Json | null
- shippingMethodId?: string | null
- shippingSupplierContactId?: string | null
- shippingSupplierId?: string | null
- shippingSupplierLocationId?: string | null
- shippingTermId?: string | null
- supplierId: string
+ id?: string
+ name: string
+ protected?: boolean
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
companyId?: string
+ createdAt?: string
+ createdBy?: string
customFields?: Json | null
- shippingMethodId?: string | null
- shippingSupplierContactId?: string | null
- shippingSupplierId?: string | null
- shippingSupplierLocationId?: string | null
- shippingTermId?: string | null
- supplierId?: string
+ id?: string
+ name?: string
+ protected?: boolean
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierShipping_companyId_fkey"
+ foreignKeyName: "supplierType_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_companyId_fkey"
+ foreignKeyName: "supplierType_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_companyId_fkey"
+ foreignKeyName: "supplierType_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierShipping_companyId_fkey"
+ foreignKeyName: "supplierType_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierShipping_shippingMethodId_fkey"
- columns: ["shippingMethodId"]
+ foreignKeyName: "supplierType_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "shippingMethod"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierContactId_fkey"
- columns: ["shippingSupplierContactId"]
+ foreignKeyName: "supplierType_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "supplierContact"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
+ foreignKeyName: "supplierType_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
+ foreignKeyName: "supplierType_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
+ foreignKeyName: "supplierType_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
+ foreignKeyName: "supplierType_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "supplier"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
+ foreignKeyName: "supplierType_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "suppliers"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierLocationId_fkey"
- columns: ["shippingSupplierLocationId"]
+ foreignKeyName: "supplierType_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "supplierLocation"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingTermId_fkey"
- columns: ["shippingTermId"]
+ foreignKeyName: "supplierType_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "shippingTerm"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
- isOneToOne: true
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierType_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
+ ]
+ }
+ terms: {
+ Row: {
+ id: string
+ purchasingTerms: Json | null
+ salesTerms: Json | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ id?: string
+ purchasingTerms?: Json | null
+ salesTerms?: Json | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ id?: string
+ purchasingTerms?: Json | null
+ salesTerms?: Json | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "terms_id_fkey"
+ columns: ["id"]
isOneToOne: true
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "terms_id_fkey"
+ columns: ["id"]
isOneToOne: true
- referencedRelation: "purchaseOrderSuppliers"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "terms_id_fkey"
+ columns: ["id"]
isOneToOne: true
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "terms_id_fkey"
+ columns: ["id"]
isOneToOne: true
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierShipping_updatedBy_fkey"
+ foreignKeyName: "terms_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_updatedBy_fkey"
+ foreignKeyName: "terms_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_updatedBy_fkey"
+ foreignKeyName: "terms_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_updatedBy_fkey"
+ foreignKeyName: "terms_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_updatedBy_fkey"
+ foreignKeyName: "terms_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -18976,131 +19919,186 @@ export type Database = {
},
]
}
- supplierStatus: {
+ tool: {
Row: {
+ approved: boolean
+ approvedBy: string | null
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
id: string
- name: string
+ itemId: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
+ approved?: boolean
+ approvedBy?: string | null
companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
- id?: string
- name: string
+ id: string
+ itemId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
+ approved?: boolean
+ approvedBy?: string | null
companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
id?: string
- name?: string
+ itemId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierStatus_companyId_fkey"
+ foreignKeyName: "tool_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "tool_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "tool_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "tool_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "tool_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "tool_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_companyId_fkey"
+ foreignKeyName: "tool_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_companyId_fkey"
+ foreignKeyName: "tool_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierStatus_companyId_fkey"
+ foreignKeyName: "tool_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierStatus_createdBy_fkey"
+ foreignKeyName: "tool_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_createdBy_fkey"
+ foreignKeyName: "tool_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_createdBy_fkey"
+ foreignKeyName: "tool_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_createdBy_fkey"
+ foreignKeyName: "tool_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_createdBy_fkey"
+ foreignKeyName: "tool_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "supplierStatus_updatedBy_fkey"
+ foreignKeyName: "tool_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "tool_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "tool_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_updatedBy_fkey"
+ foreignKeyName: "tool_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_updatedBy_fkey"
+ foreignKeyName: "tool_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_updatedBy_fkey"
+ foreignKeyName: "tool_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_updatedBy_fkey"
+ foreignKeyName: "tool_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -19108,134 +20106,137 @@ export type Database = {
},
]
}
- supplierType: {
+ unitOfMeasure: {
Row: {
+ active: boolean
+ code: string
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
id: string
name: string
- protected: boolean
updatedAt: string | null
updatedBy: string | null
}
Insert: {
+ active?: boolean
+ code: string
companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
id?: string
name: string
- protected?: boolean
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
+ active?: boolean
+ code?: string
companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
id?: string
name?: string
- protected?: boolean
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierType_companyId_fkey"
+ foreignKeyName: "unitOfMeasure_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_companyId_fkey"
+ foreignKeyName: "unitOfMeasure_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_companyId_fkey"
+ foreignKeyName: "unitOfMeasure_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierType_companyId_fkey"
+ foreignKeyName: "unitOfMeasure_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierType_createdBy_fkey"
+ foreignKeyName: "unitOfMeasure_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_createdBy_fkey"
+ foreignKeyName: "unitOfMeasure_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_createdBy_fkey"
+ foreignKeyName: "unitOfMeasure_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_createdBy_fkey"
+ foreignKeyName: "unitOfMeasure_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_createdBy_fkey"
+ foreignKeyName: "unitOfMeasure_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "supplierType_updatedBy_fkey"
+ foreignKeyName: "unitOfMeasure_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_updatedBy_fkey"
+ foreignKeyName: "unitOfMeasure_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_updatedBy_fkey"
+ foreignKeyName: "unitOfMeasure_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_updatedBy_fkey"
+ foreignKeyName: "unitOfMeasure_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_updatedBy_fkey"
+ foreignKeyName: "unitOfMeasure_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -19243,412 +20244,312 @@ export type Database = {
},
]
}
- terms: {
+ user: {
Row: {
+ about: string
+ active: boolean | null
+ admin: boolean | null
+ avatarUrl: string | null
+ createdAt: string
+ developer: boolean | null
+ email: string
+ firstName: string
+ fullName: string | null
id: string
- purchasingTerms: Json | null
- salesTerms: Json | null
+ lastName: string
updatedAt: string | null
- updatedBy: string | null
}
Insert: {
- id?: string
- purchasingTerms?: Json | null
- salesTerms?: Json | null
+ about?: string
+ active?: boolean | null
+ admin?: boolean | null
+ avatarUrl?: string | null
+ createdAt?: string
+ developer?: boolean | null
+ email: string
+ firstName: string
+ fullName?: string | null
+ id: string
+ lastName: string
updatedAt?: string | null
- updatedBy?: string | null
}
Update: {
+ about?: string
+ active?: boolean | null
+ admin?: boolean | null
+ avatarUrl?: string | null
+ createdAt?: string
+ developer?: boolean | null
+ email?: string
+ firstName?: string
+ fullName?: string | null
id?: string
- purchasingTerms?: Json | null
- salesTerms?: Json | null
+ lastName?: string
updatedAt?: string | null
- updatedBy?: string | null
}
- Relationships: [
- {
- foreignKeyName: "terms_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "terms_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "terms_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "terms_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "terms_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "terms_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "terms_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "terms_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "terms_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
+ Relationships: []
}
- tool: {
+ userAttribute: {
Row: {
- approved: boolean
- approvedBy: string | null
- companyId: string
+ active: boolean | null
+ attributeDataTypeId: number
+ canSelfManage: boolean | null
createdAt: string
createdBy: string
- customFields: Json | null
id: string
- itemId: string | null
+ listOptions: string[] | null
+ name: string
+ sortOrder: number
updatedAt: string | null
updatedBy: string | null
+ userAttributeCategoryId: string
}
Insert: {
- approved?: boolean
- approvedBy?: string | null
- companyId: string
+ active?: boolean | null
+ attributeDataTypeId: number
+ canSelfManage?: boolean | null
createdAt?: string
createdBy: string
- customFields?: Json | null
- id: string
- itemId?: string | null
+ id?: string
+ listOptions?: string[] | null
+ name: string
+ sortOrder?: number
updatedAt?: string | null
updatedBy?: string | null
- }
- Update: {
- approved?: boolean
- approvedBy?: string | null
- companyId?: string
+ userAttributeCategoryId: string
+ }
+ Update: {
+ active?: boolean | null
+ attributeDataTypeId?: number
+ canSelfManage?: boolean | null
createdAt?: string
createdBy?: string
- customFields?: Json | null
id?: string
- itemId?: string | null
+ listOptions?: string[] | null
+ name?: string
+ sortOrder?: number
updatedAt?: string | null
updatedBy?: string | null
+ userAttributeCategoryId?: string
}
Relationships: [
{
- foreignKeyName: "tool_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "tool_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "tool_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "tool_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "tool_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "tool_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "tool_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "userAttribute_attributeDataTypeId_fkey"
+ columns: ["attributeDataTypeId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "attributeDataType"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "tool_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "tool_createdBy_fkey"
+ foreignKeyName: "userAttribute_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_createdBy_fkey"
+ foreignKeyName: "userAttribute_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_createdBy_fkey"
+ foreignKeyName: "userAttribute_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_createdBy_fkey"
+ foreignKeyName: "userAttribute_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_createdBy_fkey"
+ foreignKeyName: "userAttribute_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "tool_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "tool_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
- },
- {
- foreignKeyName: "tool_updatedBy_fkey"
+ foreignKeyName: "userAttribute_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_updatedBy_fkey"
+ foreignKeyName: "userAttribute_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_updatedBy_fkey"
+ foreignKeyName: "userAttribute_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_updatedBy_fkey"
+ foreignKeyName: "userAttribute_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_updatedBy_fkey"
+ foreignKeyName: "userAttribute_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "userAttribute_userAttributeCategoryId_fkey"
+ columns: ["userAttributeCategoryId"]
+ isOneToOne: false
+ referencedRelation: "userAttributeCategory"
+ referencedColumns: ["id"]
+ },
]
}
- unitOfMeasure: {
+ userAttributeCategory: {
Row: {
- active: boolean
- code: string
- companyId: string
+ active: boolean | null
+ companyId: string | null
createdAt: string
createdBy: string
- customFields: Json | null
id: string
name: string
+ protected: boolean | null
+ public: boolean | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- active?: boolean
- code: string
- companyId: string
+ active?: boolean | null
+ companyId?: string | null
createdAt?: string
createdBy: string
- customFields?: Json | null
id?: string
name: string
+ protected?: boolean | null
+ public?: boolean | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- active?: boolean
- code?: string
- companyId?: string
+ active?: boolean | null
+ companyId?: string | null
createdAt?: string
createdBy?: string
- customFields?: Json | null
id?: string
name?: string
+ protected?: boolean | null
+ public?: boolean | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "unitOfMeasure_companyId_fkey"
+ foreignKeyName: "userAttributeCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_companyId_fkey"
+ foreignKeyName: "userAttributeCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_companyId_fkey"
+ foreignKeyName: "userAttributeCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "unitOfMeasure_companyId_fkey"
+ foreignKeyName: "userAttributeCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "unitOfMeasure_createdBy_fkey"
+ foreignKeyName: "userAttributeCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_createdBy_fkey"
+ foreignKeyName: "userAttributeCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_createdBy_fkey"
+ foreignKeyName: "userAttributeCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_createdBy_fkey"
+ foreignKeyName: "userAttributeCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_createdBy_fkey"
+ foreignKeyName: "userAttributeCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "unitOfMeasure_updatedBy_fkey"
+ foreignKeyName: "userAttributeCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_updatedBy_fkey"
+ foreignKeyName: "userAttributeCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_updatedBy_fkey"
+ foreignKeyName: "userAttributeCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_updatedBy_fkey"
+ foreignKeyName: "userAttributeCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_updatedBy_fkey"
+ foreignKeyName: "userAttributeCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -19656,1007 +20557,994 @@ export type Database = {
},
]
}
- user: {
- Row: {
- about: string
- active: boolean | null
- admin: boolean | null
- avatarUrl: string | null
- createdAt: string
- developer: boolean | null
- email: string
- firstName: string
- fullName: string | null
- id: string
- lastName: string
- updatedAt: string | null
- }
- Insert: {
- about?: string
- active?: boolean | null
- admin?: boolean | null
- avatarUrl?: string | null
- createdAt?: string
- developer?: boolean | null
- email: string
- firstName: string
- fullName?: string | null
- id: string
- lastName: string
- updatedAt?: string | null
- }
- Update: {
- about?: string
- active?: boolean | null
- admin?: boolean | null
- avatarUrl?: string | null
- createdAt?: string
- developer?: boolean | null
- email?: string
- firstName?: string
- fullName?: string | null
- id?: string
- lastName?: string
- updatedAt?: string | null
- }
- Relationships: []
- }
- userAttribute: {
+ userAttributeValue: {
Row: {
- active: boolean | null
- attributeDataTypeId: number
- canSelfManage: boolean | null
createdAt: string
createdBy: string
id: string
- listOptions: string[] | null
- name: string
- sortOrder: number
updatedAt: string | null
updatedBy: string | null
- userAttributeCategoryId: string
+ userAttributeId: string
+ userId: string
+ valueBoolean: boolean | null
+ valueDate: string | null
+ valueNumeric: number | null
+ valueText: string | null
+ valueUser: string | null
}
Insert: {
- active?: boolean | null
- attributeDataTypeId: number
- canSelfManage?: boolean | null
createdAt?: string
createdBy: string
id?: string
- listOptions?: string[] | null
- name: string
- sortOrder?: number
updatedAt?: string | null
updatedBy?: string | null
- userAttributeCategoryId: string
+ userAttributeId: string
+ userId: string
+ valueBoolean?: boolean | null
+ valueDate?: string | null
+ valueNumeric?: number | null
+ valueText?: string | null
+ valueUser?: string | null
}
Update: {
- active?: boolean | null
- attributeDataTypeId?: number
- canSelfManage?: boolean | null
createdAt?: string
createdBy?: string
id?: string
- listOptions?: string[] | null
- name?: string
- sortOrder?: number
updatedAt?: string | null
updatedBy?: string | null
- userAttributeCategoryId?: string
+ userAttributeId?: string
+ userId?: string
+ valueBoolean?: boolean | null
+ valueDate?: string | null
+ valueNumeric?: number | null
+ valueText?: string | null
+ valueUser?: string | null
}
Relationships: [
{
- foreignKeyName: "userAttribute_attributeDataTypeId_fkey"
- columns: ["attributeDataTypeId"]
- isOneToOne: false
- referencedRelation: "attributeDataType"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "userAttribute_createdBy_fkey"
+ foreignKeyName: "userAttributeValue_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_createdBy_fkey"
+ foreignKeyName: "userAttributeValue_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_createdBy_fkey"
+ foreignKeyName: "userAttributeValue_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_createdBy_fkey"
+ foreignKeyName: "userAttributeValue_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_createdBy_fkey"
+ foreignKeyName: "userAttributeValue_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "userAttribute_updatedBy_fkey"
+ foreignKeyName: "userAttributeValue_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_updatedBy_fkey"
+ foreignKeyName: "userAttributeValue_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_updatedBy_fkey"
+ foreignKeyName: "userAttributeValue_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_updatedBy_fkey"
+ foreignKeyName: "userAttributeValue_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_updatedBy_fkey"
+ foreignKeyName: "userAttributeValue_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "userAttribute_userAttributeCategoryId_fkey"
- columns: ["userAttributeCategoryId"]
+ foreignKeyName: "userAttributeValue_userAttributeId_fkey"
+ columns: ["userAttributeId"]
isOneToOne: false
- referencedRelation: "userAttributeCategory"
+ referencedRelation: "userAttribute"
referencedColumns: ["id"]
},
- ]
- }
- userAttributeCategory: {
- Row: {
- active: boolean | null
- companyId: string | null
- createdAt: string
- createdBy: string
- id: string
- name: string
- protected: boolean | null
- public: boolean | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- active?: boolean | null
- companyId?: string | null
- createdAt?: string
- createdBy: string
- id?: string
- name: string
- protected?: boolean | null
- public?: boolean | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- active?: boolean | null
- companyId?: string | null
- createdAt?: string
- createdBy?: string
- id?: string
- name?: string
- protected?: boolean | null
- public?: boolean | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
{
- foreignKeyName: "userAttributeCategory_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "userAttributeValue_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "userAttributeValue_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "userAttributeValue_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "userAttributeValue_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userAttributeValue_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "userAttributeValue_valueUser_fkey"
+ columns: ["valueUser"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userAttributeValue_valueUser_fkey"
+ columns: ["valueUser"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userAttributeValue_valueUser_fkey"
+ columns: ["valueUser"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userAttributeValue_valueUser_fkey"
+ columns: ["valueUser"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userAttributeValue_valueUser_fkey"
+ columns: ["valueUser"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ userPermission: {
+ Row: {
+ id: string
+ permissions: Json | null
+ }
+ Insert: {
+ id: string
+ permissions?: Json | null
+ }
+ Update: {
+ id?: string
+ permissions?: Json | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "userPermission_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
{
- foreignKeyName: "userAttributeCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "userPermission_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "userPermission_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "userPermission_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "userPermission_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ userToCompany: {
+ Row: {
+ companyId: string
+ role: Database["public"]["Enums"]["role"]
+ userId: string
+ }
+ Insert: {
+ companyId: string
+ role: Database["public"]["Enums"]["role"]
+ userId: string
+ }
+ Update: {
+ companyId?: string
+ role?: Database["public"]["Enums"]["role"]
+ userId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "userToCompany_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "userToCompany_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "userToCompany_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "userToCompany_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- userAttributeValue: {
+ warehouse: {
Row: {
+ active: boolean
+ companyId: string
createdAt: string
createdBy: string
id: string
+ locationId: string
+ name: string
+ requiresBin: boolean
+ requiresPick: boolean
+ requiresPutAway: boolean
+ requiresReceive: boolean
+ requiresShipment: boolean
updatedAt: string | null
updatedBy: string | null
- userAttributeId: string
- userId: string
- valueBoolean: boolean | null
- valueDate: string | null
- valueNumeric: number | null
- valueText: string | null
- valueUser: string | null
}
Insert: {
+ active?: boolean
+ companyId: string
createdAt?: string
createdBy: string
id?: string
+ locationId: string
+ name: string
+ requiresBin?: boolean
+ requiresPick?: boolean
+ requiresPutAway?: boolean
+ requiresReceive?: boolean
+ requiresShipment?: boolean
updatedAt?: string | null
updatedBy?: string | null
- userAttributeId: string
- userId: string
- valueBoolean?: boolean | null
- valueDate?: string | null
- valueNumeric?: number | null
- valueText?: string | null
- valueUser?: string | null
}
Update: {
+ active?: boolean
+ companyId?: string
createdAt?: string
createdBy?: string
id?: string
+ locationId?: string
+ name?: string
+ requiresBin?: boolean
+ requiresPick?: boolean
+ requiresPutAway?: boolean
+ requiresReceive?: boolean
+ requiresShipment?: boolean
updatedAt?: string | null
updatedBy?: string | null
- userAttributeId?: string
- userId?: string
- valueBoolean?: boolean | null
- valueDate?: string | null
- valueNumeric?: number | null
- valueText?: string | null
- valueUser?: string | null
}
Relationships: [
{
- foreignKeyName: "userAttributeValue_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "warehouse_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "warehouse_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "warehouse_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "userAttributeValue_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "warehouse_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "userAttributeValue_createdBy_fkey"
+ foreignKeyName: "warehouse_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "userAttributeValue_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "warehouse_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "warehouse_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "warehouse_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "warehouse_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "userAttributeValue_userAttributeId_fkey"
- columns: ["userAttributeId"]
- isOneToOne: false
- referencedRelation: "userAttribute"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "userAttributeValue_userId_fkey"
- columns: ["userId"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "userAttributeValue_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "warehouse_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "userAttributeValue_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "warehouse_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "warehouse_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "userAttributeValue_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "warehouse_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "userAttributeValue_valueUser_fkey"
- columns: ["valueUser"]
+ foreignKeyName: "warehouse_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_valueUser_fkey"
- columns: ["valueUser"]
+ foreignKeyName: "warehouse_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_valueUser_fkey"
- columns: ["valueUser"]
+ foreignKeyName: "warehouse_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_valueUser_fkey"
- columns: ["valueUser"]
+ foreignKeyName: "warehouse_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_valueUser_fkey"
- columns: ["valueUser"]
+ foreignKeyName: "warehouse_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- userPermission: {
+ workCenter: {
Row: {
+ active: boolean
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ defaultStandardFactor: Database["public"]["Enums"]["factor"]
+ description: string | null
id: string
- permissions: Json | null
+ laborRate: number
+ locationId: string | null
+ machineRate: number
+ name: string
+ overheadRate: number
+ requiredAbilityId: string | null
+ updatedAt: string | null
+ updatedBy: string | null
}
Insert: {
- id: string
- permissions?: Json | null
+ active?: boolean
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ defaultStandardFactor?: Database["public"]["Enums"]["factor"]
+ description?: string | null
+ id?: string
+ laborRate?: number
+ locationId?: string | null
+ machineRate?: number
+ name: string
+ overheadRate?: number
+ requiredAbilityId?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Update: {
+ active?: boolean
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ defaultStandardFactor?: Database["public"]["Enums"]["factor"]
+ description?: string | null
id?: string
- permissions?: Json | null
+ laborRate?: number
+ locationId?: string | null
+ machineRate?: number
+ name?: string
+ overheadRate?: number
+ requiredAbilityId?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "userPermission_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "workCenter_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "workCenter_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "workCenter_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "workCenter_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "workCenter_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userPermission_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "workCenter_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userPermission_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "workCenter_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userPermission_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "workCenter_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userPermission_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "workCenter_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- userToCompany: {
- Row: {
- companyId: string
- role: Database["public"]["Enums"]["role"]
- userId: string
- }
- Insert: {
- companyId: string
- role: Database["public"]["Enums"]["role"]
- userId: string
- }
- Update: {
- companyId?: string
- role?: Database["public"]["Enums"]["role"]
- userId?: string
- }
- Relationships: [
{
- foreignKeyName: "userToCompany_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "workCenter_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "workCenter_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "workCenter_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "workCenter_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "workCenter_requiredAbilityId_fkey"
+ columns: ["requiredAbilityId"]
+ isOneToOne: false
+ referencedRelation: "ability"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "workCenter_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "workCenter_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "workCenter_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "workCenter_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "workCenter_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- warehouse: {
+ workCenterProcess: {
Row: {
- active: boolean
companyId: string
createdAt: string
createdBy: string
- id: string
- locationId: string
- name: string
- requiresBin: boolean
- requiresPick: boolean
- requiresPutAway: boolean
- requiresReceive: boolean
- requiresShipment: boolean
+ processId: string
updatedAt: string | null
updatedBy: string | null
+ workCenterId: string
}
Insert: {
- active?: boolean
companyId: string
createdAt?: string
createdBy: string
- id?: string
- locationId: string
- name: string
- requiresBin?: boolean
- requiresPick?: boolean
- requiresPutAway?: boolean
- requiresReceive?: boolean
- requiresShipment?: boolean
+ processId: string
updatedAt?: string | null
updatedBy?: string | null
+ workCenterId: string
}
Update: {
- active?: boolean
companyId?: string
createdAt?: string
createdBy?: string
- id?: string
- locationId?: string
- name?: string
- requiresBin?: boolean
- requiresPick?: boolean
- requiresPutAway?: boolean
- requiresReceive?: boolean
- requiresShipment?: boolean
+ processId?: string
updatedAt?: string | null
updatedBy?: string | null
+ workCenterId?: string
}
Relationships: [
{
- foreignKeyName: "warehouse_companyId_fkey"
+ foreignKeyName: "workCenterProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_companyId_fkey"
+ foreignKeyName: "workCenterProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_companyId_fkey"
+ foreignKeyName: "workCenterProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "warehouse_companyId_fkey"
+ foreignKeyName: "workCenterProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "warehouse_createdBy_fkey"
+ foreignKeyName: "workCenterProcess_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_createdBy_fkey"
+ foreignKeyName: "workCenterProcess_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_createdBy_fkey"
+ foreignKeyName: "workCenterProcess_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_createdBy_fkey"
+ foreignKeyName: "workCenterProcess_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_createdBy_fkey"
+ foreignKeyName: "workCenterProcess_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "warehouse_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "warehouse_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "workCenterProcess_processId_fkey"
+ columns: ["processId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "process"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "warehouse_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "workCenterProcess_processId_fkey"
+ columns: ["processId"]
isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "processes"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_updatedBy_fkey"
+ foreignKeyName: "workCenterProcess_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_updatedBy_fkey"
+ foreignKeyName: "workCenterProcess_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_updatedBy_fkey"
+ foreignKeyName: "workCenterProcess_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_updatedBy_fkey"
+ foreignKeyName: "workCenterProcess_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_updatedBy_fkey"
+ foreignKeyName: "workCenterProcess_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "workCenterProcess_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenter"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "workCenterProcess_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenters"
+ referencedColumns: ["id"]
+ },
]
}
- workCenter: {
+ }
+ Views: {
+ accountCategories: {
Row: {
- active: boolean
- companyId: string
- createdAt: string
- createdBy: string
+ category: string | null
+ class: Database["public"]["Enums"]["glAccountClass"] | null
+ companyId: string | null
+ createdAt: string | null
+ createdBy: string | null
customFields: Json | null
- defaultStandardFactor: Database["public"]["Enums"]["factor"]
- description: string | null
- id: string
- laborRate: number
- locationId: string | null
- machineRate: number
- name: string
- overheadRate: number
- requiredAbilityId: string | null
+ id: string | null
+ incomeBalance: Database["public"]["Enums"]["glIncomeBalance"] | null
+ subCategoriesCount: number | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- active?: boolean
- companyId: string
- createdAt?: string
- createdBy: string
+ category?: string | null
+ class?: Database["public"]["Enums"]["glAccountClass"] | null
+ companyId?: string | null
+ createdAt?: string | null
+ createdBy?: string | null
customFields?: Json | null
- defaultStandardFactor?: Database["public"]["Enums"]["factor"]
- description?: string | null
- id?: string
- laborRate?: number
- locationId?: string | null
- machineRate?: number
- name: string
- overheadRate?: number
- requiredAbilityId?: string | null
+ id?: string | null
+ incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
+ subCategoriesCount?: never
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- active?: boolean
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- defaultStandardFactor?: Database["public"]["Enums"]["factor"]
- description?: string | null
- id?: string
- laborRate?: number
- locationId?: string | null
- machineRate?: number
- name?: string
- overheadRate?: number
- requiredAbilityId?: string | null
+ category?: string | null
+ class?: Database["public"]["Enums"]["glAccountClass"] | null
+ companyId?: string | null
+ createdAt?: string | null
+ createdBy?: string | null
+ customFields?: Json | null
+ id?: string | null
+ incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
+ subCategoriesCount?: never
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "workCenter_companyId_fkey"
+ foreignKeyName: "accountCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_companyId_fkey"
+ foreignKeyName: "accountCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_companyId_fkey"
+ foreignKeyName: "accountCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "workCenter_companyId_fkey"
+ foreignKeyName: "accountCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "workCenter_createdBy_fkey"
+ foreignKeyName: "accountCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_createdBy_fkey"
+ foreignKeyName: "accountCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_createdBy_fkey"
+ foreignKeyName: "accountCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_createdBy_fkey"
+ foreignKeyName: "accountCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_createdBy_fkey"
+ foreignKeyName: "accountCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "workCenter_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "workCenter_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "workCenter_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "workCenter_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "workCenter_requiredAbilityId_fkey"
- columns: ["requiredAbilityId"]
- isOneToOne: false
- referencedRelation: "ability"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "workCenter_updatedBy_fkey"
+ foreignKeyName: "accountCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_updatedBy_fkey"
+ foreignKeyName: "accountCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_updatedBy_fkey"
+ foreignKeyName: "accountCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_updatedBy_fkey"
+ foreignKeyName: "accountCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_updatedBy_fkey"
+ foreignKeyName: "accountCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -20664,1339 +21552,1497 @@ export type Database = {
},
]
}
- workCenterProcess: {
+ accounts: {
Row: {
- companyId: string
- createdAt: string
- createdBy: string
- processId: string
+ accountCategory: string | null
+ accountCategoryId: string | null
+ accountSubCategory: string | null
+ accountSubcategoryId: string | null
+ active: boolean | null
+ class: Database["public"]["Enums"]["glAccountClass"] | null
+ companyId: string | null
+ consolidatedRate:
+ | Database["public"]["Enums"]["glConsolidatedRate"]
+ | null
+ createdAt: string | null
+ createdBy: string | null
+ customFields: Json | null
+ directPosting: boolean | null
+ id: string | null
+ incomeBalance: Database["public"]["Enums"]["glIncomeBalance"] | null
+ name: string | null
+ number: string | null
+ type: Database["public"]["Enums"]["glAccountType"] | null
updatedAt: string | null
updatedBy: string | null
- workCenterId: string
}
Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- processId: string
+ accountCategory?: never
+ accountCategoryId?: string | null
+ accountSubCategory?: never
+ accountSubcategoryId?: string | null
+ active?: boolean | null
+ class?: Database["public"]["Enums"]["glAccountClass"] | null
+ companyId?: string | null
+ consolidatedRate?:
+ | Database["public"]["Enums"]["glConsolidatedRate"]
+ | null
+ createdAt?: string | null
+ createdBy?: string | null
+ customFields?: Json | null
+ directPosting?: boolean | null
+ id?: string | null
+ incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
+ name?: string | null
+ number?: string | null
+ type?: Database["public"]["Enums"]["glAccountType"] | null
updatedAt?: string | null
updatedBy?: string | null
- workCenterId: string
}
Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- processId?: string
+ accountCategory?: never
+ accountCategoryId?: string | null
+ accountSubCategory?: never
+ accountSubcategoryId?: string | null
+ active?: boolean | null
+ class?: Database["public"]["Enums"]["glAccountClass"] | null
+ companyId?: string | null
+ consolidatedRate?:
+ | Database["public"]["Enums"]["glConsolidatedRate"]
+ | null
+ createdAt?: string | null
+ createdBy?: string | null
+ customFields?: Json | null
+ directPosting?: boolean | null
+ id?: string | null
+ incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
+ name?: string | null
+ number?: string | null
+ type?: Database["public"]["Enums"]["glAccountType"] | null
updatedAt?: string | null
updatedBy?: string | null
- workCenterId?: string
}
Relationships: [
{
- foreignKeyName: "workCenterProcess_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "account_accountCategoryId_fkey"
+ columns: ["accountCategoryId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "accountCategory"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_companyId_fkey"
+ foreignKeyName: "account_accountCategoryId_fkey"
+ columns: ["accountCategoryId"]
+ isOneToOne: false
+ referencedRelation: "accountCategories"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "account_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_companyId_fkey"
+ foreignKeyName: "account_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "account_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "workCenterProcess_companyId_fkey"
+ foreignKeyName: "account_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "workCenterProcess_createdBy_fkey"
+ foreignKeyName: "account_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_createdBy_fkey"
+ foreignKeyName: "account_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_createdBy_fkey"
+ foreignKeyName: "account_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_createdBy_fkey"
+ foreignKeyName: "account_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_createdBy_fkey"
+ foreignKeyName: "account_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "workCenterProcess_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "account_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "process"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "account_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "processes"
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "account_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "account_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_updatedBy_fkey"
+ foreignKeyName: "account_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ companies: {
+ Row: {
+ addressLine1: string | null
+ addressLine2: string | null
+ city: string | null
+ companyId: string | null
+ countryCode: string | null
+ email: string | null
+ employeeType: string | null
+ fax: string | null
+ id: string | null
+ logo: string | null
+ name: string | null
+ phone: string | null
+ postalCode: string | null
+ role: Database["public"]["Enums"]["role"] | null
+ state: string | null
+ taxId: string | null
+ updatedBy: string | null
+ userId: string | null
+ website: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "accountDefault_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_updatedBy_fkey"
+ foreignKeyName: "accountDefault_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_updatedBy_fkey"
+ foreignKeyName: "accountDefault_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_updatedBy_fkey"
+ foreignKeyName: "accountDefault_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_updatedBy_fkey"
+ foreignKeyName: "accountDefault_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "workCenterProcess_workCenterId_fkey"
- columns: ["workCenterId"]
- isOneToOne: false
- referencedRelation: "workCenter"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "workCenterProcess_workCenterId_fkey"
- columns: ["workCenterId"]
- isOneToOne: false
- referencedRelation: "workCenters"
- referencedColumns: ["id"]
- },
- ]
- }
- }
- Views: {
- accountCategories: {
- Row: {
- category: string | null
- class: Database["public"]["Enums"]["glAccountClass"] | null
- companyId: string | null
- createdAt: string | null
- createdBy: string | null
- customFields: Json | null
- id: string | null
- incomeBalance: Database["public"]["Enums"]["glIncomeBalance"] | null
- subCategoriesCount: number | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- category?: string | null
- class?: Database["public"]["Enums"]["glAccountClass"] | null
- companyId?: string | null
- createdAt?: string | null
- createdBy?: string | null
- customFields?: Json | null
- id?: string | null
- incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
- subCategoriesCount?: never
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- category?: string | null
- class?: Database["public"]["Enums"]["glAccountClass"] | null
- companyId?: string | null
- createdAt?: string | null
- createdBy?: string | null
- customFields?: Json | null
- id?: string | null
- incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
- subCategoriesCount?: never
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "accountCategory_companyId_fkey"
+ foreignKeyName: "userToCompany_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_companyId_fkey"
+ foreignKeyName: "userToCompany_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_companyId_fkey"
+ foreignKeyName: "userToCompany_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "accountCategory_companyId_fkey"
+ foreignKeyName: "userToCompany_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ consumables: {
+ Row: {
+ active: boolean | null
+ approved: boolean | null
+ approvedBy: string | null
+ assignee: string | null
+ companyId: string | null
+ createdAt: string | null
+ createdBy: string | null
+ customFields: Json | null
+ defaultMethodType: Database["public"]["Enums"]["methodType"] | null
+ description: string | null
+ id: string | null
+ itemId: string | null
+ itemTrackingType:
+ | Database["public"]["Enums"]["itemTrackingType"]
+ | null
+ name: string | null
+ replenishmentSystem:
+ | Database["public"]["Enums"]["itemReplenishmentSystem"]
+ | null
+ supplierIds: string[] | null
+ unitOfMeasure: string | null
+ unitOfMeasureCode: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "consumable_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "consumable_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "consumable_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "consumable_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "consumable_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- accounts: {
- Row: {
- accountCategory: string | null
- accountCategoryId: string | null
- accountSubCategory: string | null
- accountSubcategoryId: string | null
- active: boolean | null
- class: Database["public"]["Enums"]["glAccountClass"] | null
- companyId: string | null
- consolidatedRate:
- | Database["public"]["Enums"]["glConsolidatedRate"]
- | null
- createdAt: string | null
- createdBy: string | null
- customFields: Json | null
- directPosting: boolean | null
- id: string | null
- incomeBalance: Database["public"]["Enums"]["glIncomeBalance"] | null
- name: string | null
- number: string | null
- type: Database["public"]["Enums"]["glAccountType"] | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- accountCategory?: never
- accountCategoryId?: string | null
- accountSubCategory?: never
- accountSubcategoryId?: string | null
- active?: boolean | null
- class?: Database["public"]["Enums"]["glAccountClass"] | null
- companyId?: string | null
- consolidatedRate?:
- | Database["public"]["Enums"]["glConsolidatedRate"]
- | null
- createdAt?: string | null
- createdBy?: string | null
- customFields?: Json | null
- directPosting?: boolean | null
- id?: string | null
- incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
- name?: string | null
- number?: string | null
- type?: Database["public"]["Enums"]["glAccountType"] | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- accountCategory?: never
- accountCategoryId?: string | null
- accountSubCategory?: never
- accountSubcategoryId?: string | null
- active?: boolean | null
- class?: Database["public"]["Enums"]["glAccountClass"] | null
- companyId?: string | null
- consolidatedRate?:
- | Database["public"]["Enums"]["glConsolidatedRate"]
- | null
- createdAt?: string | null
- createdBy?: string | null
- customFields?: Json | null
- directPosting?: boolean | null
- id?: string | null
- incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
- name?: string | null
- number?: string | null
- type?: Database["public"]["Enums"]["glAccountType"] | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "account_accountCategoryId_fkey"
- columns: ["accountCategoryId"]
- isOneToOne: false
- referencedRelation: "accountCategory"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "account_accountCategoryId_fkey"
- columns: ["accountCategoryId"]
- isOneToOne: false
- referencedRelation: "accountCategories"
- referencedColumns: ["id"]
- },
{
- foreignKeyName: "account_companyId_fkey"
+ foreignKeyName: "consumable_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_companyId_fkey"
+ foreignKeyName: "consumable_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_companyId_fkey"
+ foreignKeyName: "consumable_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "account_companyId_fkey"
+ foreignKeyName: "consumable_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "account_createdBy_fkey"
+ foreignKeyName: "consumable_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_createdBy_fkey"
+ foreignKeyName: "consumable_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_createdBy_fkey"
+ foreignKeyName: "consumable_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_createdBy_fkey"
+ foreignKeyName: "consumable_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_createdBy_fkey"
+ foreignKeyName: "consumable_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "account_updatedBy_fkey"
+ foreignKeyName: "consumable_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "consumable_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "consumable_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_updatedBy_fkey"
+ foreignKeyName: "consumable_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_updatedBy_fkey"
+ foreignKeyName: "consumable_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_updatedBy_fkey"
+ foreignKeyName: "consumable_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_updatedBy_fkey"
+ foreignKeyName: "consumable_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
]
}
- companies: {
+ contractors: {
Row: {
- addressLine1: string | null
- addressLine2: string | null
- city: string | null
+ abilityIds: string[] | null
+ active: boolean | null
companyId: string | null
- countryCode: string | null
+ customFields: Json | null
email: string | null
- employeeType: string | null
- fax: string | null
+ firstName: string | null
+ hoursPerWeek: number | null
+ lastName: string | null
+ supplierContactId: string | null
+ supplierId: string | null
+ supplierName: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "contractor_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "contractor_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "contractor_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "contractor_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "contractor_id_fkey"
+ columns: ["supplierContactId"]
+ isOneToOne: true
+ referencedRelation: "supplierContact"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
+ customers: {
+ Row: {
+ accountManagerId: string | null
+ assignee: string | null
+ companyId: string | null
+ createdAt: string | null
+ createdBy: string | null
+ customerStatusId: string | null
+ customerTypeId: string | null
+ customFields: Json | null
id: string | null
logo: string | null
name: string | null
- phone: string | null
- postalCode: string | null
- role: Database["public"]["Enums"]["role"] | null
- state: string | null
+ orderCount: number | null
+ status: string | null
taxId: string | null
+ type: string | null
+ updatedAt: string | null
updatedBy: string | null
- userId: string | null
- website: string | null
}
Relationships: [
{
- foreignKeyName: "accountDefault_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "customer_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountDefault_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "customer_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountDefault_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "customer_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountDefault_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "customer_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountDefault_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "customer_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
+ foreignKeyName: "customer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "customer_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
+ foreignKeyName: "customer_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "customer_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "customer_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "customer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "customer_customerStatusId_fkey"
+ columns: ["customerStatusId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "customerStatus"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "customer_customerTypeId_fkey"
+ columns: ["customerTypeId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "customerType"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "customer_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "customer_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "customer_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "customer_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "customer_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- consumables: {
+ customFieldTables: {
Row: {
- active: boolean | null
- approved: boolean | null
- approvedBy: string | null
- assignee: string | null
companyId: string | null
- createdAt: string | null
- createdBy: string | null
- customFields: Json | null
- defaultMethodType: Database["public"]["Enums"]["methodType"] | null
- description: string | null
- id: string | null
- itemId: string | null
- itemTrackingType:
- | Database["public"]["Enums"]["itemTrackingType"]
- | null
+ fields: Json | null
+ module: Database["public"]["Enums"]["module"] | null
name: string | null
- replenishmentSystem:
- | Database["public"]["Enums"]["itemReplenishmentSystem"]
- | null
- supplierIds: string[] | null
- unitOfMeasure: string | null
- unitOfMeasureCode: string | null
- updatedAt: string | null
- updatedBy: string | null
+ table: string | null
+ }
+ Relationships: []
+ }
+ documentExtensions: {
+ Row: {
+ extension: string | null
+ }
+ Relationships: []
+ }
+ documentLabels: {
+ Row: {
+ label: string | null
+ userId: string | null
}
Relationships: [
{
- foreignKeyName: "consumable_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "documentLabels_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "documentLabels_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "documentLabels_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "documentLabels_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "documentLabels_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ documents: {
+ Row: {
+ active: boolean | null
+ companyId: string | null
+ createdAt: string | null
+ createdBy: string | null
+ description: string | null
+ extension: string | null
+ favorite: boolean | null
+ id: string | null
+ labels: string[] | null
+ lastActivityAt: string | null
+ name: string | null
+ path: string | null
+ readGroups: string[] | null
+ size: number | null
+ sourceDocument:
+ | Database["public"]["Enums"]["documentSourceType"]
+ | null
+ sourceDocumentId: string | null
+ type: Database["public"]["Enums"]["documentType"] | null
+ updatedAt: string | null
+ updatedBy: string | null
+ writeGroups: string[] | null
+ }
+ Relationships: [
{
- foreignKeyName: "consumable_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "consumable_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "consumable_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "consumable_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "consumable_createdBy_fkey"
+ foreignKeyName: "document_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_createdBy_fkey"
+ foreignKeyName: "document_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_createdBy_fkey"
+ foreignKeyName: "document_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_createdBy_fkey"
+ foreignKeyName: "document_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_createdBy_fkey"
+ foreignKeyName: "document_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "consumable_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "consumable_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
- },
- {
- foreignKeyName: "consumable_updatedBy_fkey"
+ foreignKeyName: "document_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_updatedBy_fkey"
+ foreignKeyName: "document_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_updatedBy_fkey"
+ foreignKeyName: "document_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_updatedBy_fkey"
+ foreignKeyName: "document_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_updatedBy_fkey"
+ foreignKeyName: "document_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ employees: {
+ Row: {
+ active: boolean | null
+ avatarUrl: string | null
+ companyId: string | null
+ email: string | null
+ employeeTypeId: string | null
+ firstName: string | null
+ id: string | null
+ lastName: string | null
+ name: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "employee_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "employee_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "employee_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "employee_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "employee_employeeTypeId_fkey"
+ columns: ["employeeTypeId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "employeeType"
+ referencedColumns: ["id"]
},
]
}
- contractors: {
+ employeesAcrossCompanies: {
Row: {
- abilityIds: string[] | null
active: boolean | null
- companyId: string | null
- customFields: Json | null
+ avatarUrl: string | null
+ companyId: string[] | null
email: string | null
firstName: string | null
- hoursPerWeek: number | null
+ id: string | null
lastName: string | null
- supplierContactId: string | null
- supplierId: string | null
- supplierName: string | null
+ name: string | null
+ }
+ Relationships: []
+ }
+ employeeSummary: {
+ Row: {
+ avatarUrl: string | null
+ companyId: string | null
+ departmentName: string | null
+ id: string | null
+ locationName: string | null
+ managerName: string | null
+ name: string | null
+ startDate: string | null
+ title: string | null
}
Relationships: [
{
- foreignKeyName: "contractor_companyId_fkey"
+ foreignKeyName: "employee_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "contractor_companyId_fkey"
+ foreignKeyName: "employee_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "contractor_companyId_fkey"
+ foreignKeyName: "employee_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "contractor_companyId_fkey"
+ foreignKeyName: "employee_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
- {
- foreignKeyName: "contractor_id_fkey"
- columns: ["supplierContactId"]
- isOneToOne: true
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
- },
]
}
- customers: {
+ fixtures: {
Row: {
- accountManagerId: string | null
+ active: boolean | null
+ approved: boolean | null
+ approvedBy: string | null
assignee: string | null
+ autodeskUrn: string | null
companyId: string | null
createdAt: string | null
createdBy: string | null
- customerStatusId: string | null
- customerTypeId: string | null
+ customer: string | null
+ customerId: string | null
customFields: Json | null
+ defaultMethodType: Database["public"]["Enums"]["methodType"] | null
+ description: string | null
id: string | null
- logo: string | null
+ itemId: string | null
+ itemTrackingType:
+ | Database["public"]["Enums"]["itemTrackingType"]
+ | null
+ modelId: string | null
+ modelName: string | null
+ modelPath: string | null
+ modelSize: number | null
name: string | null
- orderCount: number | null
- status: string | null
- taxId: string | null
- type: string | null
+ replenishmentSystem:
+ | Database["public"]["Enums"]["itemReplenishmentSystem"]
+ | null
+ supplierIds: string[] | null
+ thumbnailPath: string | null
updatedAt: string | null
updatedBy: string | null
}
Relationships: [
{
- foreignKeyName: "customer_accountManagerId_fkey"
- columns: ["accountManagerId"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "customer_accountManagerId_fkey"
- columns: ["accountManagerId"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "customer_accountManagerId_fkey"
- columns: ["accountManagerId"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "customer_accountManagerId_fkey"
- columns: ["accountManagerId"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "customer_accountManagerId_fkey"
- columns: ["accountManagerId"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "customer_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "fixture_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "fixture_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "fixture_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "fixture_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "fixture_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "customer_companyId_fkey"
+ foreignKeyName: "fixture_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_companyId_fkey"
+ foreignKeyName: "fixture_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_companyId_fkey"
+ foreignKeyName: "fixture_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "customer_companyId_fkey"
+ foreignKeyName: "fixture_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "customer_createdBy_fkey"
+ foreignKeyName: "fixture_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_createdBy_fkey"
+ foreignKeyName: "fixture_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_createdBy_fkey"
+ foreignKeyName: "fixture_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_createdBy_fkey"
+ foreignKeyName: "fixture_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_createdBy_fkey"
+ foreignKeyName: "fixture_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "customer_customerStatusId_fkey"
- columns: ["customerStatusId"]
+ foreignKeyName: "fixture_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "customerStatus"
+ referencedRelation: "customer"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_customerTypeId_fkey"
- columns: ["customerTypeId"]
+ foreignKeyName: "fixture_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "customerType"
+ referencedRelation: "customers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_updatedBy_fkey"
+ foreignKeyName: "fixture_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderCustomers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixture_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixture_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "fixture_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_updatedBy_fkey"
+ foreignKeyName: "fixture_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_updatedBy_fkey"
+ foreignKeyName: "fixture_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_updatedBy_fkey"
+ foreignKeyName: "fixture_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_updatedBy_fkey"
+ foreignKeyName: "fixture_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- customFieldTables: {
- Row: {
- companyId: string | null
- fields: Json | null
- module: Database["public"]["Enums"]["module"] | null
- name: string | null
- table: string | null
- }
- Relationships: []
- }
- documentExtensions: {
- Row: {
- extension: string | null
- }
- Relationships: []
- }
- documentLabels: {
- Row: {
- label: string | null
- userId: string | null
- }
- Relationships: [
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- documents: {
+ groupMembers: {
Row: {
- active: boolean | null
companyId: string | null
- createdAt: string | null
- createdBy: string | null
- description: string | null
- extension: string | null
- favorite: boolean | null
- id: string | null
- labels: string[] | null
- lastActivityAt: string | null
+ groupId: string | null
+ id: number | null
+ isCustomerOrgGroup: boolean | null
+ isCustomerTypeGroup: boolean | null
+ isEmployeeTypeGroup: boolean | null
+ isIdentityGroup: boolean | null
+ isSupplierOrgGroup: boolean | null
+ isSupplierTypeGroup: boolean | null
+ memberGroupId: string | null
+ memberUserId: string | null
name: string | null
- path: string | null
- readGroups: string[] | null
- size: number | null
- sourceDocument:
- | Database["public"]["Enums"]["documentSourceType"]
- | null
- sourceDocumentId: string | null
- type: Database["public"]["Enums"]["documentType"] | null
- updatedAt: string | null
- updatedBy: string | null
- writeGroups: string[] | null
+ user: Json | null
}
Relationships: [
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "group_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "group_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "group_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "group_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "membership_groupId_fkey"
+ columns: ["groupId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "group"
referencedColumns: ["id"]
},
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "membership_memberGroupId_fkey"
+ columns: ["memberGroupId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "group"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- employees: {
+ groups: {
Row: {
- active: boolean | null
- avatarUrl: string | null
companyId: string | null
- email: string | null
- employeeTypeId: string | null
- firstName: string | null
id: string | null
- lastName: string | null
+ isCustomerOrgGroup: boolean | null
+ isCustomerTypeGroup: boolean | null
+ isEmployeeTypeGroup: boolean | null
+ isSupplierOrgGroup: boolean | null
+ isSupplierTypeGroup: boolean | null
+ name: string | null
+ parentId: string | null
+ users: Json | null
+ }
+ Relationships: []
+ }
+ groups_recursive: {
+ Row: {
+ companyId: string | null
+ groupId: string | null
+ isCustomerOrgGroup: boolean | null
+ isCustomerTypeGroup: boolean | null
+ isEmployeeTypeGroup: boolean | null
+ isIdentityGroup: boolean | null
+ isSupplierOrgGroup: boolean | null
+ isSupplierTypeGroup: boolean | null
name: string | null
+ parentId: string | null
+ user: Json | null
+ }
+ Relationships: []
+ }
+ holidayYears: {
+ Row: {
+ companyId: string | null
+ year: number | null
}
Relationships: [
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "holiday_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "holiday_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "holiday_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "holiday_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
- {
- foreignKeyName: "employee_employeeTypeId_fkey"
- columns: ["employeeTypeId"]
- isOneToOne: false
- referencedRelation: "employeeType"
- referencedColumns: ["id"]
- },
]
}
- employeesAcrossCompanies: {
+ integrations: {
Row: {
active: boolean | null
- avatarUrl: string | null
- companyId: string[] | null
- email: string | null
- firstName: string | null
+ companyId: string | null
+ description: string | null
id: string | null
- lastName: string | null
- name: string | null
+ jsonschema: Json | null
+ logoPath: string | null
+ metadata: Json | null
+ title: string | null
+ visible: boolean | null
}
Relationships: []
}
- employeeSummary: {
+ itemQuantities: {
Row: {
- avatarUrl: string | null
companyId: string | null
- departmentName: string | null
- id: string | null
- locationName: string | null
- managerName: string | null
- name: string | null
- startDate: string | null
- title: string | null
+ itemId: string | null
+ locationId: string | null
+ quantityAvailable: number | null
+ quantityOnHand: number | null
+ quantityOnProdOrder: number | null
+ quantityOnPurchaseOrder: number | null
+ quantityOnSalesOrder: number | null
}
Relationships: [
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "item_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "item_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "item_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "item_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
@@ -22004,461 +23050,329 @@ export type Database = {
},
]
}
- fixtures: {
+ jobs: {
Row: {
active: boolean | null
- approved: boolean | null
- approvedBy: string | null
assignee: string | null
autodeskUrn: string | null
companyId: string | null
createdAt: string | null
createdBy: string | null
- customer: string | null
customerId: string | null
customFields: Json | null
- defaultMethodType: Database["public"]["Enums"]["methodType"] | null
+ deadlineType: Database["public"]["Enums"]["deadlineType"] | null
description: string | null
+ dueDate: string | null
id: string | null
itemId: string | null
+ itemReadableId: string | null
itemTrackingType:
| Database["public"]["Enums"]["itemTrackingType"]
| null
+ itemType: Database["public"]["Enums"]["itemType"] | null
+ jobId: string | null
+ locationId: string | null
modelId: string | null
modelName: string | null
modelPath: string | null
modelSize: number | null
+ modelUploadId: string | null
name: string | null
+ notes: Json | null
+ productionQuantity: number | null
+ quantity: number | null
+ quantityComplete: number | null
+ quantityReceivedToInventory: number | null
+ quantityShipped: number | null
+ quoteId: string | null
+ quoteLineId: string | null
+ quoteReadableId: string | null
replenishmentSystem:
| Database["public"]["Enums"]["itemReplenishmentSystem"]
| null
- supplierIds: string[] | null
+ salesOrderId: string | null
+ salesOrderLineId: string | null
+ salesOrderReadableId: string | null
+ scrapQuantity: number | null
+ status: Database["public"]["Enums"]["jobStatus"] | null
thumbnailPath: string | null
+ unitOfMeasureCode: string | null
updatedAt: string | null
updatedBy: string | null
}
Relationships: [
{
- foreignKeyName: "fixture_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "fixture_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "fixture_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "fixture_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_createdBy_fkey"
+ foreignKeyName: "job_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "fixture_customerId_fkey"
- columns: ["customerId"]
- isOneToOne: false
- referencedRelation: "customer"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_customerId_fkey"
- columns: ["customerId"]
- isOneToOne: false
- referencedRelation: "customers"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_customerId_fkey"
- columns: ["customerId"]
- isOneToOne: false
- referencedRelation: "salesOrderCustomers"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
- },
- {
- foreignKeyName: "fixture_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "job_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "customer"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "job_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "customers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "job_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "salesOrderCustomers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "job_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "job_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
- ]
- }
- groupMembers: {
- Row: {
- companyId: string | null
- groupId: string | null
- id: number | null
- isCustomerOrgGroup: boolean | null
- isCustomerTypeGroup: boolean | null
- isEmployeeTypeGroup: boolean | null
- isIdentityGroup: boolean | null
- isSupplierOrgGroup: boolean | null
- isSupplierTypeGroup: boolean | null
- memberGroupId: string | null
- memberUserId: string | null
- name: string | null
- user: Json | null
- }
- Relationships: [
{
- foreignKeyName: "group_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "group_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "group_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "group_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "membership_groupId_fkey"
- columns: ["groupId"]
+ foreignKeyName: "job_quoteId_fkey"
+ columns: ["quoteId"]
isOneToOne: false
- referencedRelation: "group"
+ referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberGroupId_fkey"
- columns: ["memberGroupId"]
+ foreignKeyName: "job_quoteId_fkey"
+ columns: ["quoteId"]
isOneToOne: false
- referencedRelation: "group"
+ referencedRelation: "quoteCustomerDetails"
+ referencedColumns: ["quoteId"]
+ },
+ {
+ foreignKeyName: "job_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "job_quoteLineId_fkey"
+ columns: ["quoteLineId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "quoteLine"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "job_quoteLineId_fkey"
+ columns: ["quoteLineId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "quoteLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "job_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "salesOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "job_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "salesOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "job_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["id"]
},
- ]
- }
- groups: {
- Row: {
- companyId: string | null
- id: string | null
- isCustomerOrgGroup: boolean | null
- isCustomerTypeGroup: boolean | null
- isEmployeeTypeGroup: boolean | null
- isSupplierOrgGroup: boolean | null
- isSupplierTypeGroup: boolean | null
- name: string | null
- parentId: string | null
- users: Json | null
- }
- Relationships: []
- }
- groups_recursive: {
- Row: {
- companyId: string | null
- groupId: string | null
- isCustomerOrgGroup: boolean | null
- isCustomerTypeGroup: boolean | null
- isEmployeeTypeGroup: boolean | null
- isIdentityGroup: boolean | null
- isSupplierOrgGroup: boolean | null
- isSupplierTypeGroup: boolean | null
- name: string | null
- parentId: string | null
- user: Json | null
- }
- Relationships: []
- }
- holidayYears: {
- Row: {
- companyId: string | null
- year: number | null
- }
- Relationships: [
{
- foreignKeyName: "holiday_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "salesOrderLine"
referencedColumns: ["id"]
},
{
- foreignKeyName: "holiday_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "salesOrderLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "holiday_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "holiday_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
- ]
- }
- integrations: {
- Row: {
- active: boolean | null
- companyId: string | null
- description: string | null
- id: string | null
- jsonschema: Json | null
- logoPath: string | null
- metadata: Json | null
- title: string | null
- visible: boolean | null
- }
- Relationships: []
- }
- itemQuantities: {
- Row: {
- companyId: string | null
- itemId: string | null
- locationId: string | null
- quantityAvailable: number | null
- quantityOnHand: number | null
- quantityOnProdOrder: number | null
- quantityOnPurchaseOrder: number | null
- quantityOnSalesOrder: number | null
- }
- Relationships: [
{
- foreignKeyName: "item_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "item_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
]
}
@@ -22793,14 +23707,14 @@ export type Database = {
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["id"]
+ columns: ["supplierLocationId"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["supplierLocationId"]
+ columns: ["id"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
@@ -23672,14 +24586,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["supplierCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["id"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["supplierCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["id"]
@@ -24450,6 +25364,7 @@ export type Database = {
updatedAt: string | null
updatedBy: string | null
workCenterId: string | null
+ workInstruction: Json | null
}
Relationships: [
{
@@ -25441,14 +26356,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["paymentCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["id"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["paymentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["id"]
@@ -27585,6 +28500,7 @@ export type Database = {
| "Indirect Cost"
| "Variance"
| "Total"
+ deadlineType: "No Deadline" | "ASAP" | "Soft Deadline" | "Hard Deadline"
documentSourceType:
| "Job"
| "Part"
@@ -27699,6 +28615,13 @@ export type Database = {
| "Service"
| "Consumable"
| "Fixture"
+ jobStatus:
+ | "Draft"
+ | "Ready"
+ | "In Progress"
+ | "Paused"
+ | "Completed"
+ | "Cancelled"
journalLineDocumentType:
| "Receipt"
| "Invoice"
@@ -27712,18 +28635,16 @@ export type Database = {
| "Documents"
| "Invoicing"
| "Inventory"
- | "Jobs"
+ | "Items"
| "Messaging"
| "Parts"
+ | "People"
+ | "Production"
| "Purchasing"
| "Resources"
- | "People"
| "Sales"
| "Settings"
- | "Scheduling"
- | "Timecards"
| "Users"
- | "Items"
month:
| "January"
| "February"
diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.ts
index 3fc96f4992..b5e9ac6807 100644
--- a/packages/database/supabase/functions/lib/types.ts
+++ b/packages/database/supabase/functions/lib/types.ts
@@ -5075,7 +5075,7 @@ export type Database = {
}
Relationships: [
{
- foreignKeyName: "employeeTypePermission_employeeTypeId_fkey"
+ foreignKeyName: "employeeTypePermission_new_employeeTypeId_fkey"
columns: ["employeeTypeId"]
isOneToOne: false
referencedRelation: "employeeType"
@@ -6482,6 +6482,7 @@ export type Database = {
purchasingLeadTime: number
purchasingUnitOfMeasureCode: string | null
requiresConfiguration: boolean
+ scrapPercentage: number
updatedAt: string | null
updatedBy: string | null
}
@@ -6499,6 +6500,7 @@ export type Database = {
purchasingLeadTime?: number
purchasingUnitOfMeasureCode?: string | null
requiresConfiguration?: boolean
+ scrapPercentage?: number
updatedAt?: string | null
updatedBy?: string | null
}
@@ -6516,6 +6518,7 @@ export type Database = {
purchasingLeadTime?: number
purchasingUnitOfMeasureCode?: string | null
requiresConfiguration?: boolean
+ scrapPercentage?: number
updatedAt?: string | null
updatedBy?: string | null
}
@@ -6851,584 +6854,366 @@ export type Database = {
},
]
}
- journal: {
+ job: {
Row: {
- accountingPeriodId: string | null
+ assignee: string | null
companyId: string
createdAt: string
+ createdBy: string
+ customerId: string | null
customFields: Json | null
- description: string | null
- id: number
- postingDate: string
+ deadlineType: Database["public"]["Enums"]["deadlineType"]
+ dueDate: string | null
+ id: string
+ itemId: string
+ jobId: string
+ locationId: string
+ modelUploadId: string | null
+ notes: Json | null
+ productionQuantity: number | null
+ quantity: number
+ quantityComplete: number
+ quantityReceivedToInventory: number
+ quantityShipped: number
+ quoteId: string | null
+ quoteLineId: string | null
+ salesOrderId: string | null
+ salesOrderLineId: string | null
+ scrapQuantity: number
+ status: Database["public"]["Enums"]["jobStatus"]
+ unitOfMeasureCode: string
+ updatedAt: string | null
+ updatedBy: string | null
}
Insert: {
- accountingPeriodId?: string | null
+ assignee?: string | null
companyId: string
createdAt?: string
+ createdBy: string
+ customerId?: string | null
customFields?: Json | null
- description?: string | null
- id?: number
- postingDate?: string
+ deadlineType?: Database["public"]["Enums"]["deadlineType"]
+ dueDate?: string | null
+ id?: string
+ itemId: string
+ jobId: string
+ locationId: string
+ modelUploadId?: string | null
+ notes?: Json | null
+ productionQuantity?: number | null
+ quantity?: number
+ quantityComplete?: number
+ quantityReceivedToInventory?: number
+ quantityShipped?: number
+ quoteId?: string | null
+ quoteLineId?: string | null
+ salesOrderId?: string | null
+ salesOrderLineId?: string | null
+ scrapQuantity?: number
+ status?: Database["public"]["Enums"]["jobStatus"]
+ unitOfMeasureCode: string
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Update: {
- accountingPeriodId?: string | null
+ assignee?: string | null
companyId?: string
createdAt?: string
+ createdBy?: string
+ customerId?: string | null
customFields?: Json | null
- description?: string | null
- id?: number
- postingDate?: string
+ deadlineType?: Database["public"]["Enums"]["deadlineType"]
+ dueDate?: string | null
+ id?: string
+ itemId?: string
+ jobId?: string
+ locationId?: string
+ modelUploadId?: string | null
+ notes?: Json | null
+ productionQuantity?: number | null
+ quantity?: number
+ quantityComplete?: number
+ quantityReceivedToInventory?: number
+ quantityShipped?: number
+ quoteId?: string | null
+ quoteLineId?: string | null
+ salesOrderId?: string | null
+ salesOrderLineId?: string | null
+ scrapQuantity?: number
+ status?: Database["public"]["Enums"]["jobStatus"]
+ unitOfMeasureCode?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "journal_accountPeriodId_fkey"
- columns: ["accountingPeriodId"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "accountingPeriod"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "journal_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "journal_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "journal_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "journal_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- ]
- }
- journalLine: {
- Row: {
- accountNumber: string
- accrual: boolean
- amount: number
- companyId: string
- createdAt: string
- customFields: Json | null
- description: string | null
- documentId: string | null
- documentLineReference: string | null
- documentType:
- | Database["public"]["Enums"]["journalLineDocumentType"]
- | null
- externalDocumentId: string | null
- id: string
- journalId: number
- journalLineReference: string
- quantity: number
- }
- Insert: {
- accountNumber: string
- accrual?: boolean
- amount: number
- companyId: string
- createdAt?: string
- customFields?: Json | null
- description?: string | null
- documentId?: string | null
- documentLineReference?: string | null
- documentType?:
- | Database["public"]["Enums"]["journalLineDocumentType"]
- | null
- externalDocumentId?: string | null
- id?: string
- journalId: number
- journalLineReference: string
- quantity?: number
- }
- Update: {
- accountNumber?: string
- accrual?: boolean
- amount?: number
- companyId?: string
- createdAt?: string
- customFields?: Json | null
- description?: string | null
- documentId?: string | null
- documentLineReference?: string | null
- documentType?:
- | Database["public"]["Enums"]["journalLineDocumentType"]
- | null
- externalDocumentId?: string | null
- id?: string
- journalId?: number
- journalLineReference?: string
- quantity?: number
- }
- Relationships: [
- {
- foreignKeyName: "journalLine_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "journalLine_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "journalLine_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "journalLine_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "journalLine_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "journalLine_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
- ]
- }
- location: {
- Row: {
- addressLine1: string
- addressLine2: string | null
- city: string
- companyId: string
- countryCode: string | null
- createdAt: string
- createdBy: string
- customFields: Json | null
- id: string
- latitude: number | null
- longitude: number | null
- name: string
- postalCode: string
- state: string
- timezone: string
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- addressLine1: string
- addressLine2?: string | null
- city: string
- companyId: string
- countryCode?: string | null
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- id?: string
- latitude?: number | null
- longitude?: number | null
- name: string
- postalCode: string
- state: string
- timezone: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- addressLine1?: string
- addressLine2?: string | null
- city?: string
- companyId?: string
- countryCode?: string | null
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- id?: string
- latitude?: number | null
- longitude?: number | null
- name?: string
- postalCode?: string
- state?: string
- timezone?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
{
- foreignKeyName: "location_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "location_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "location_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "location_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- ]
- }
- makeMethod: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- id: string
- itemId: string
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- id?: string
- itemId: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- id?: string
- itemId?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "method_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "method_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "method_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "method_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "method_createdBy_fkey"
+ foreignKeyName: "job_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "method_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "customer"
referencedColumns: ["id"]
},
{
- foreignKeyName: "method_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "customers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "method_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "salesOrderCustomers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "method_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "method_itemId_fkey"
+ foreignKeyName: "job_itemId_fkey"
columns: ["itemId"]
isOneToOne: false
referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "method_itemId_fkey"
+ foreignKeyName: "job_itemId_fkey"
columns: ["itemId"]
isOneToOne: false
referencedRelation: "itemQuantities"
referencedColumns: ["itemId"]
},
- ]
- }
- material: {
- Row: {
- approved: boolean
- approvedBy: string | null
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- dimensions: string | null
- finish: string | null
- grade: string | null
- id: string
- itemId: string | null
- materialFormId: string
- materialSubstanceId: string
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- approved?: boolean
- approvedBy?: string | null
- companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- dimensions?: string | null
- finish?: string | null
- grade?: string | null
- id: string
- itemId?: string | null
- materialFormId: string
- materialSubstanceId: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- approved?: boolean
- approvedBy?: string | null
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- dimensions?: string | null
- finish?: string | null
- grade?: string | null
- id?: string
- itemId?: string | null
- materialFormId?: string
- materialSubstanceId?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "material_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "material_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
{
- foreignKeyName: "material_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "material_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "material_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "material_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_quoteId_fkey"
+ columns: ["quoteId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "material_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_quoteId_fkey"
+ columns: ["quoteId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "quoteCustomerDetails"
+ referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "material_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_quoteId_fkey"
+ columns: ["quoteId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_quoteLineId_fkey"
+ columns: ["quoteLineId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "quoteLine"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_quoteLineId_fkey"
+ columns: ["quoteLineId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "quoteLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "salesOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "job_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "salesOrderLocations"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "material_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "job_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "item"
+ referencedRelation: "salesOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "job_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedRelation: "salesOrderLine"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "material_materialFormId_fkey"
- columns: ["materialFormId"]
+ foreignKeyName: "job_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
isOneToOne: false
- referencedRelation: "materialForm"
+ referencedRelation: "salesOrderLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_materialSubstanceId_fkey"
- columns: ["materialSubstanceId"]
+ foreignKeyName: "job_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
isOneToOne: false
- referencedRelation: "materialSubstance"
- referencedColumns: ["id"]
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "material_updatedBy_fkey"
+ foreignKeyName: "job_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_updatedBy_fkey"
+ foreignKeyName: "job_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_updatedBy_fkey"
+ foreignKeyName: "job_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_updatedBy_fkey"
+ foreignKeyName: "job_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "material_updatedBy_fkey"
+ foreignKeyName: "job_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -7436,131 +7221,203 @@ export type Database = {
},
]
}
- materialForm: {
+ jobMaterial: {
Row: {
- companyId: string | null
+ companyId: string
createdAt: string
createdBy: string
customFields: Json | null
+ description: string
id: string
- name: string
+ itemId: string
+ itemReadableId: string
+ itemType: string
+ jobId: string
+ jobOperationId: string | null
+ methodType: Database["public"]["Enums"]["methodType"]
+ order: number
+ quantity: number
+ unitCost: number
+ unitOfMeasureCode: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- companyId?: string | null
+ companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
+ description: string
id?: string
- name: string
+ itemId: string
+ itemReadableId: string
+ itemType?: string
+ jobId: string
+ jobOperationId?: string | null
+ methodType?: Database["public"]["Enums"]["methodType"]
+ order?: number
+ quantity?: number
+ unitCost?: number
+ unitOfMeasureCode?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- companyId?: string | null
+ companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
+ description?: string
id?: string
- name?: string
+ itemId?: string
+ itemReadableId?: string
+ itemType?: string
+ jobId?: string
+ jobOperationId?: string | null
+ methodType?: Database["public"]["Enums"]["methodType"]
+ order?: number
+ quantity?: number
+ unitCost?: number
+ unitOfMeasureCode?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "materialForm_companyId_fkey"
+ foreignKeyName: "jobMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_companyId_fkey"
+ foreignKeyName: "jobMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_companyId_fkey"
+ foreignKeyName: "jobMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "materialForm_companyId_fkey"
+ foreignKeyName: "jobMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "materialForm_createdBy_fkey"
+ foreignKeyName: "jobMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_createdBy_fkey"
+ foreignKeyName: "jobMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_createdBy_fkey"
+ foreignKeyName: "jobMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_createdBy_fkey"
+ foreignKeyName: "jobMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_createdBy_fkey"
+ foreignKeyName: "jobMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "materialForm_updatedBy_fkey"
+ foreignKeyName: "jobMaterial_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobMaterial_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "jobMaterial_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "job"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobMaterial_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "jobs"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobMaterial_jobOperationId_fkey"
+ columns: ["jobOperationId"]
+ isOneToOne: false
+ referencedRelation: "jobOperation"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobMaterial_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "jobMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_updatedBy_fkey"
+ foreignKeyName: "jobMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_updatedBy_fkey"
+ foreignKeyName: "jobMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_updatedBy_fkey"
+ foreignKeyName: "jobMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialForm_updatedBy_fkey"
+ foreignKeyName: "jobMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -7568,226 +7425,491 @@ export type Database = {
},
]
}
- materialSubstance: {
+ jobOperation: {
Row: {
- companyId: string | null
+ companyId: string
createdAt: string
createdBy: string
customFields: Json | null
+ description: string | null
id: string
- name: string
+ jobId: string
+ laborRate: number
+ laborTime: number
+ laborUnit: Database["public"]["Enums"]["factor"]
+ machineTime: number
+ machineUnit: Database["public"]["Enums"]["factor"]
+ operationOrder: Database["public"]["Enums"]["methodOperationOrder"]
+ order: number
+ overheadRate: number
+ processId: string
+ quotingRate: number
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
updatedAt: string | null
updatedBy: string | null
+ workCenterId: string | null
+ workInstruction: Json
}
Insert: {
- companyId?: string | null
+ companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
+ description?: string | null
id?: string
- name: string
+ jobId: string
+ laborRate?: number
+ laborTime?: number
+ laborUnit?: Database["public"]["Enums"]["factor"]
+ machineTime?: number
+ machineUnit?: Database["public"]["Enums"]["factor"]
+ operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
+ order?: number
+ overheadRate?: number
+ processId: string
+ quotingRate?: number
+ setupTime?: number
+ setupUnit?: Database["public"]["Enums"]["factor"]
updatedAt?: string | null
updatedBy?: string | null
+ workCenterId?: string | null
+ workInstruction?: Json
}
Update: {
- companyId?: string | null
+ companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
+ description?: string | null
id?: string
- name?: string
+ jobId?: string
+ laborRate?: number
+ laborTime?: number
+ laborUnit?: Database["public"]["Enums"]["factor"]
+ machineTime?: number
+ machineUnit?: Database["public"]["Enums"]["factor"]
+ operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
+ order?: number
+ overheadRate?: number
+ processId?: string
+ quotingRate?: number
+ setupTime?: number
+ setupUnit?: Database["public"]["Enums"]["factor"]
updatedAt?: string | null
updatedBy?: string | null
+ workCenterId?: string | null
+ workInstruction?: Json
}
Relationships: [
{
- foreignKeyName: "materialSubstance_companyId_fkey"
+ foreignKeyName: "jobOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_companyId_fkey"
+ foreignKeyName: "jobOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_companyId_fkey"
+ foreignKeyName: "jobOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "materialSubstance_companyId_fkey"
+ foreignKeyName: "jobOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "materialSubstance_createdBy_fkey"
+ foreignKeyName: "jobOperation_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_createdBy_fkey"
+ foreignKeyName: "jobOperation_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_createdBy_fkey"
+ foreignKeyName: "jobOperation_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_createdBy_fkey"
+ foreignKeyName: "jobOperation_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_createdBy_fkey"
+ foreignKeyName: "jobOperation_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "materialSubstance_updatedBy_fkey"
+ foreignKeyName: "jobOperation_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "job"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobOperation_jobId_fkey"
+ columns: ["jobId"]
+ isOneToOne: false
+ referencedRelation: "jobs"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobOperation_processId_fkey"
+ columns: ["processId"]
+ isOneToOne: false
+ referencedRelation: "process"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobOperation_processId_fkey"
+ columns: ["processId"]
+ isOneToOne: false
+ referencedRelation: "processes"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_updatedBy_fkey"
+ foreignKeyName: "jobOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_updatedBy_fkey"
+ foreignKeyName: "jobOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_updatedBy_fkey"
+ foreignKeyName: "jobOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "materialSubstance_updatedBy_fkey"
+ foreignKeyName: "jobOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "jobOperation_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenter"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "jobOperation_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenters"
+ referencedColumns: ["id"]
+ },
]
}
- membership: {
+ journal: {
Row: {
- groupId: string
+ accountingPeriodId: string | null
+ companyId: string
+ createdAt: string
+ customFields: Json | null
+ description: string | null
id: number
- memberGroupId: string | null
- memberUserId: string | null
+ postingDate: string
}
Insert: {
- groupId: string
+ accountingPeriodId?: string | null
+ companyId: string
+ createdAt?: string
+ customFields?: Json | null
+ description?: string | null
id?: number
- memberGroupId?: string | null
- memberUserId?: string | null
+ postingDate?: string
}
Update: {
- groupId?: string
+ accountingPeriodId?: string | null
+ companyId?: string
+ createdAt?: string
+ customFields?: Json | null
+ description?: string | null
id?: number
- memberGroupId?: string | null
- memberUserId?: string | null
+ postingDate?: string
}
Relationships: [
{
- foreignKeyName: "membership_groupId_fkey"
- columns: ["groupId"]
- isOneToOne: false
- referencedRelation: "group"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "membership_memberGroupId_fkey"
- columns: ["memberGroupId"]
- isOneToOne: false
- referencedRelation: "group"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "journal_accountPeriodId_fkey"
+ columns: ["accountingPeriodId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "accountingPeriod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "journal_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "journal_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "journal_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "journal_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
]
}
- methodMaterial: {
+ journalLine: {
Row: {
- companyId: string
+ accountNumber: string
+ accrual: boolean
+ amount: number
+ companyId: string
+ createdAt: string
+ customFields: Json | null
+ description: string | null
+ documentId: string | null
+ documentLineReference: string | null
+ documentType:
+ | Database["public"]["Enums"]["journalLineDocumentType"]
+ | null
+ externalDocumentId: string | null
+ id: string
+ journalId: number
+ journalLineReference: string
+ quantity: number
+ }
+ Insert: {
+ accountNumber: string
+ accrual?: boolean
+ amount: number
+ companyId: string
+ createdAt?: string
+ customFields?: Json | null
+ description?: string | null
+ documentId?: string | null
+ documentLineReference?: string | null
+ documentType?:
+ | Database["public"]["Enums"]["journalLineDocumentType"]
+ | null
+ externalDocumentId?: string | null
+ id?: string
+ journalId: number
+ journalLineReference: string
+ quantity?: number
+ }
+ Update: {
+ accountNumber?: string
+ accrual?: boolean
+ amount?: number
+ companyId?: string
+ createdAt?: string
+ customFields?: Json | null
+ description?: string | null
+ documentId?: string | null
+ documentLineReference?: string | null
+ documentType?:
+ | Database["public"]["Enums"]["journalLineDocumentType"]
+ | null
+ externalDocumentId?: string | null
+ id?: string
+ journalId?: number
+ journalLineReference?: string
+ quantity?: number
+ }
+ Relationships: [
+ {
+ foreignKeyName: "journalLine_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
+ },
+ {
+ foreignKeyName: "journalLine_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
+ },
+ {
+ foreignKeyName: "journalLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "journalLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "journalLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "journalLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ ]
+ }
+ location: {
+ Row: {
+ addressLine1: string
+ addressLine2: string | null
+ city: string
+ companyId: string
+ countryCode: string | null
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ id: string
+ latitude: number | null
+ longitude: number | null
+ name: string
+ postalCode: string
+ state: string
+ timezone: string
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ addressLine1: string
+ addressLine2?: string | null
+ city: string
+ companyId: string
+ countryCode?: string | null
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ id?: string
+ latitude?: number | null
+ longitude?: number | null
+ name: string
+ postalCode: string
+ state: string
+ timezone: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ addressLine1?: string
+ addressLine2?: string | null
+ city?: string
+ companyId?: string
+ countryCode?: string | null
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ id?: string
+ latitude?: number | null
+ longitude?: number | null
+ name?: string
+ postalCode?: string
+ state?: string
+ timezone?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "location_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "location_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "location_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "location_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ ]
+ }
+ makeMethod: {
+ Row: {
+ companyId: string
createdAt: string
createdBy: string
customFields: Json | null
id: string
itemId: string
- itemReadableId: string
- itemType: string
- makeMethodId: string
- materialMakeMethodId: string | null
- methodOperationId: string | null
- methodType: Database["public"]["Enums"]["methodType"]
- order: number
- quantity: number
- unitOfMeasureCode: string
updatedAt: string | null
updatedBy: string | null
}
@@ -7798,15 +7920,6 @@ export type Database = {
customFields?: Json | null
id?: string
itemId: string
- itemReadableId: string
- itemType?: string
- makeMethodId: string
- materialMakeMethodId?: string | null
- methodOperationId?: string | null
- methodType?: Database["public"]["Enums"]["methodType"]
- order?: number
- quantity: number
- unitOfMeasureCode: string
updatedAt?: string | null
updatedBy?: string | null
}
@@ -7817,503 +7930,430 @@ export type Database = {
customFields?: Json | null
id?: string
itemId?: string
- itemReadableId?: string
- itemType?: string
- makeMethodId?: string
- materialMakeMethodId?: string | null
- methodOperationId?: string | null
- methodType?: Database["public"]["Enums"]["methodType"]
- order?: number
- quantity?: number
- unitOfMeasureCode?: string
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "methodMaterial_companyId_fkey"
+ foreignKeyName: "method_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_companyId_fkey"
+ foreignKeyName: "method_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_companyId_fkey"
+ foreignKeyName: "method_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "methodMaterial_companyId_fkey"
+ foreignKeyName: "method_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "methodMaterial_createdBy_fkey"
+ foreignKeyName: "method_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_createdBy_fkey"
+ foreignKeyName: "method_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_createdBy_fkey"
+ foreignKeyName: "method_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_createdBy_fkey"
+ foreignKeyName: "method_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_createdBy_fkey"
+ foreignKeyName: "method_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "methodMaterial_itemId_fkey"
+ foreignKeyName: "method_itemId_fkey"
columns: ["itemId"]
isOneToOne: false
referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodMaterial_itemId_fkey"
+ foreignKeyName: "method_itemId_fkey"
columns: ["itemId"]
isOneToOne: false
referencedRelation: "itemQuantities"
referencedColumns: ["itemId"]
},
- {
- foreignKeyName: "methodMaterial_materialMakeMethodId_fkey"
- columns: ["materialMakeMethodId"]
- isOneToOne: false
- referencedRelation: "makeMethod"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_materialMakeMethodId_fkey"
- columns: ["materialMakeMethodId"]
- isOneToOne: false
- referencedRelation: "quoteOperationsWithMakeMethods"
- referencedColumns: ["makeMethodId"]
- },
- {
- foreignKeyName: "methodMaterial_methodId_fkey"
- columns: ["makeMethodId"]
- isOneToOne: false
- referencedRelation: "makeMethod"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_methodId_fkey"
- columns: ["makeMethodId"]
- isOneToOne: false
- referencedRelation: "quoteOperationsWithMakeMethods"
- referencedColumns: ["makeMethodId"]
- },
- {
- foreignKeyName: "methodMaterial_methodOperation_fkey"
- columns: ["methodOperationId"]
- isOneToOne: false
- referencedRelation: "methodOperation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode", "companyId"]
- isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
- },
- {
- foreignKeyName: "methodMaterial_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodMaterial_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
]
}
- methodOperation: {
+ material: {
Row: {
+ approved: boolean
+ approvedBy: string | null
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
- description: string
+ dimensions: string | null
+ finish: string | null
+ grade: string | null
id: string
- laborTime: number
- laborUnit: Database["public"]["Enums"]["factor"]
- machineTime: number
- machineUnit: Database["public"]["Enums"]["factor"]
- makeMethodId: string
- operationOrder: Database["public"]["Enums"]["methodOperationOrder"]
- operationSupplierProcessId: string | null
- operationType: Database["public"]["Enums"]["operationType"]
- order: number
- processId: string
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
+ itemId: string | null
+ materialFormId: string
+ materialSubstanceId: string
updatedAt: string | null
updatedBy: string | null
- workCenterId: string | null
}
Insert: {
+ approved?: boolean
+ approvedBy?: string | null
companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
- description: string
- id?: string
- laborTime?: number
- laborUnit?: Database["public"]["Enums"]["factor"]
- machineTime?: number
- machineUnit?: Database["public"]["Enums"]["factor"]
- makeMethodId: string
- operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
- operationSupplierProcessId?: string | null
- operationType?: Database["public"]["Enums"]["operationType"]
- order?: number
- processId: string
- setupTime?: number
- setupUnit?: Database["public"]["Enums"]["factor"]
+ dimensions?: string | null
+ finish?: string | null
+ grade?: string | null
+ id: string
+ itemId?: string | null
+ materialFormId: string
+ materialSubstanceId: string
updatedAt?: string | null
updatedBy?: string | null
- workCenterId?: string | null
}
Update: {
+ approved?: boolean
+ approvedBy?: string | null
companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
- description?: string
+ dimensions?: string | null
+ finish?: string | null
+ grade?: string | null
id?: string
- laborTime?: number
- laborUnit?: Database["public"]["Enums"]["factor"]
- machineTime?: number
- machineUnit?: Database["public"]["Enums"]["factor"]
- makeMethodId?: string
- operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
- operationSupplierProcessId?: string | null
- operationType?: Database["public"]["Enums"]["operationType"]
- order?: number
- processId?: string
- setupTime?: number
- setupUnit?: Database["public"]["Enums"]["factor"]
+ itemId?: string | null
+ materialFormId?: string
+ materialSubstanceId?: string
updatedAt?: string | null
updatedBy?: string | null
- workCenterId?: string | null
}
Relationships: [
{
- foreignKeyName: "methodOperation_companyId_fkey"
+ foreignKeyName: "material_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "material_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "material_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "material_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "material_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "material_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_companyId_fkey"
+ foreignKeyName: "material_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_companyId_fkey"
+ foreignKeyName: "material_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "methodOperation_companyId_fkey"
+ foreignKeyName: "material_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "methodOperation_createdBy_fkey"
+ foreignKeyName: "material_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_createdBy_fkey"
+ foreignKeyName: "material_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_createdBy_fkey"
+ foreignKeyName: "material_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_createdBy_fkey"
+ foreignKeyName: "material_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_createdBy_fkey"
+ foreignKeyName: "material_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "methodOperation_methodId_fkey"
- columns: ["makeMethodId"]
+ foreignKeyName: "material_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "makeMethod"
+ referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_methodId_fkey"
- columns: ["makeMethodId"]
+ foreignKeyName: "material_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "quoteOperationsWithMakeMethods"
- referencedColumns: ["makeMethodId"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
{
- foreignKeyName: "methodOperation_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "material_materialFormId_fkey"
+ columns: ["materialFormId"]
isOneToOne: false
- referencedRelation: "process"
+ referencedRelation: "materialForm"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "material_materialSubstanceId_fkey"
+ columns: ["materialSubstanceId"]
isOneToOne: false
- referencedRelation: "processes"
+ referencedRelation: "materialSubstance"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_updatedBy_fkey"
+ foreignKeyName: "material_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_updatedBy_fkey"
+ foreignKeyName: "material_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_updatedBy_fkey"
+ foreignKeyName: "material_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_updatedBy_fkey"
+ foreignKeyName: "material_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperation_updatedBy_fkey"
+ foreignKeyName: "material_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "methodOperation_workCenterId_fkey"
- columns: ["workCenterId"]
- isOneToOne: false
- referencedRelation: "workCenter"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodOperation_workCenterId_fkey"
- columns: ["workCenterId"]
- isOneToOne: false
- referencedRelation: "workCenters"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
- columns: ["operationSupplierProcessId"]
- isOneToOne: false
- referencedRelation: "supplierProcess"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
- columns: ["operationSupplierProcessId"]
- isOneToOne: false
- referencedRelation: "supplierProcesses"
- referencedColumns: ["id"]
- },
]
}
- methodOperationWorkInstruction: {
+ materialForm: {
Row: {
- companyId: string
- content: Json | null
+ companyId: string | null
createdAt: string
createdBy: string
- methodOperationId: string
+ customFields: Json | null
+ id: string
+ name: string
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- companyId: string
- content?: Json | null
+ companyId?: string | null
createdAt?: string
createdBy: string
- methodOperationId: string
+ customFields?: Json | null
+ id?: string
+ name: string
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- companyId?: string
- content?: Json | null
+ companyId?: string | null
createdAt?: string
createdBy?: string
- methodOperationId?: string
+ customFields?: Json | null
+ id?: string
+ name?: string
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "methodOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "materialForm_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "materialForm_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "materialForm_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "materialForm_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "materialForm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "materialForm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "materialForm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "materialForm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "materialForm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_methodOperationId_fkey"
- columns: ["methodOperationId"]
- isOneToOne: true
- referencedRelation: "methodOperation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "methodOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "materialForm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "materialForm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "materialForm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "materialForm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "methodOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "materialForm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -8321,140 +8361,131 @@ export type Database = {
},
]
}
- modelUpload: {
+ materialSubstance: {
Row: {
- autodeskUrn: string | null
- companyId: string
- createdAt: string | null
+ companyId: string | null
+ createdAt: string
createdBy: string
+ customFields: Json | null
id: string
- modelPath: string
- name: string | null
- size: number | null
- thumbnailPath: string | null
+ name: string
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- autodeskUrn?: string | null
- companyId: string
- createdAt?: string | null
+ companyId?: string | null
+ createdAt?: string
createdBy: string
+ customFields?: Json | null
id?: string
- modelPath: string
- name?: string | null
- size?: number | null
- thumbnailPath?: string | null
+ name: string
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- autodeskUrn?: string | null
- companyId?: string
- createdAt?: string | null
+ companyId?: string | null
+ createdAt?: string
createdBy?: string
+ customFields?: Json | null
id?: string
- modelPath?: string
- name?: string | null
- size?: number | null
- thumbnailPath?: string | null
+ name?: string
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "modelUpload_companyId_fkey"
+ foreignKeyName: "materialSubstance_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_companyId_fkey"
+ foreignKeyName: "materialSubstance_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_companyId_fkey"
+ foreignKeyName: "materialSubstance_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "modelUpload_companyId_fkey"
+ foreignKeyName: "materialSubstance_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "modelUpload_createdBy_fkey"
+ foreignKeyName: "materialSubstance_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_createdBy_fkey"
+ foreignKeyName: "materialSubstance_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_createdBy_fkey"
+ foreignKeyName: "materialSubstance_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_createdBy_fkey"
+ foreignKeyName: "materialSubstance_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_createdBy_fkey"
+ foreignKeyName: "materialSubstance_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "modelUpload_updatedBy_fkey"
+ foreignKeyName: "materialSubstance_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_updatedBy_fkey"
+ foreignKeyName: "materialSubstance_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_updatedBy_fkey"
+ foreignKeyName: "materialSubstance_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_updatedBy_fkey"
+ foreignKeyName: "materialSubstance_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "modelUpload_updatedBy_fkey"
+ foreignKeyName: "materialSubstance_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -8462,648 +8493,662 @@ export type Database = {
},
]
}
- note: {
+ membership: {
+ Row: {
+ groupId: string
+ id: number
+ memberGroupId: string | null
+ memberUserId: string | null
+ }
+ Insert: {
+ groupId: string
+ id?: number
+ memberGroupId?: string | null
+ memberUserId?: string | null
+ }
+ Update: {
+ groupId?: string
+ id?: number
+ memberGroupId?: string | null
+ memberUserId?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "membership_groupId_fkey"
+ columns: ["groupId"]
+ isOneToOne: false
+ referencedRelation: "group"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "membership_memberGroupId_fkey"
+ columns: ["memberGroupId"]
+ isOneToOne: false
+ referencedRelation: "group"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ methodMaterial: {
Row: {
- active: boolean
companyId: string
createdAt: string
createdBy: string
- documentId: string
+ customFields: Json | null
id: string
- note: string
- noteRichText: Json
+ itemId: string
+ itemReadableId: string
+ itemType: string
+ makeMethodId: string
+ materialMakeMethodId: string | null
+ methodOperationId: string | null
+ methodType: Database["public"]["Enums"]["methodType"]
+ order: number
+ productionQuantity: number | null
+ quantity: number
+ scrapQuantity: number
+ unitOfMeasureCode: string
updatedAt: string | null
+ updatedBy: string | null
}
Insert: {
- active?: boolean
companyId: string
createdAt?: string
createdBy: string
- documentId: string
+ customFields?: Json | null
id?: string
- note: string
- noteRichText?: Json
+ itemId: string
+ itemReadableId: string
+ itemType?: string
+ makeMethodId: string
+ materialMakeMethodId?: string | null
+ methodOperationId?: string | null
+ methodType?: Database["public"]["Enums"]["methodType"]
+ order?: number
+ productionQuantity?: number | null
+ quantity: number
+ scrapQuantity?: number
+ unitOfMeasureCode: string
updatedAt?: string | null
+ updatedBy?: string | null
}
Update: {
- active?: boolean
companyId?: string
createdAt?: string
createdBy?: string
- documentId?: string
+ customFields?: Json | null
id?: string
- note?: string
- noteRichText?: Json
+ itemId?: string
+ itemReadableId?: string
+ itemType?: string
+ makeMethodId?: string
+ materialMakeMethodId?: string | null
+ methodOperationId?: string | null
+ methodType?: Database["public"]["Enums"]["methodType"]
+ order?: number
+ productionQuantity?: number | null
+ quantity?: number
+ scrapQuantity?: number
+ unitOfMeasureCode?: string
updatedAt?: string | null
+ updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "notes_companyId_fkey"
+ foreignKeyName: "methodMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "notes_companyId_fkey"
+ foreignKeyName: "methodMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "notes_companyId_fkey"
+ foreignKeyName: "methodMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "notes_companyId_fkey"
+ foreignKeyName: "methodMaterial_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "notes_createdBy_fkey"
+ foreignKeyName: "methodMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "notes_createdBy_fkey"
+ foreignKeyName: "methodMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "notes_createdBy_fkey"
+ foreignKeyName: "methodMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "notes_createdBy_fkey"
+ foreignKeyName: "methodMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "notes_createdBy_fkey"
+ foreignKeyName: "methodMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- oauthClient: {
- Row: {
- clientId: string
- clientSecret: string
- companyId: string
- createdAt: string | null
- id: string
- name: string
- redirectUris: string[]
- updatedAt: string | null
- }
- Insert: {
- clientId: string
- clientSecret: string
- companyId: string
- createdAt?: string | null
- id?: string
- name: string
- redirectUris?: string[]
- updatedAt?: string | null
- }
- Update: {
- clientId?: string
- clientSecret?: string
- companyId?: string
- createdAt?: string | null
- id?: string
- name?: string
- redirectUris?: string[]
- updatedAt?: string | null
- }
- Relationships: []
- }
- oauthCode: {
- Row: {
- clientId: string
- code: string
- companyId: string
- createdAt: string | null
- expiresAt: string
- id: string
- redirectUri: string
- userId: string
- }
- Insert: {
- clientId: string
- code: string
- companyId: string
- createdAt?: string | null
- expiresAt: string
- id?: string
- redirectUri: string
- userId: string
- }
- Update: {
- clientId?: string
- code?: string
- companyId?: string
- createdAt?: string | null
- expiresAt?: string
- id?: string
- redirectUri?: string
- userId?: string
- }
- Relationships: [
{
- foreignKeyName: "oauthCode_clientId_fkey"
- columns: ["clientId"]
+ foreignKeyName: "methodMaterial_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "oauthClient"
- referencedColumns: ["clientId"]
+ referencedRelation: "item"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodMaterial_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "methodMaterial_materialMakeMethodId_fkey"
+ columns: ["materialMakeMethodId"]
+ isOneToOne: false
+ referencedRelation: "makeMethod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodMaterial_materialMakeMethodId_fkey"
+ columns: ["materialMakeMethodId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "quoteOperationsWithMakeMethods"
+ referencedColumns: ["makeMethodId"]
+ },
+ {
+ foreignKeyName: "methodMaterial_methodId_fkey"
+ columns: ["makeMethodId"]
+ isOneToOne: false
+ referencedRelation: "makeMethod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodMaterial_methodId_fkey"
+ columns: ["makeMethodId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "quoteOperationsWithMakeMethods"
+ referencedColumns: ["makeMethodId"]
},
{
- foreignKeyName: "oauthCode_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodMaterial_methodOperation_fkey"
+ columns: ["methodOperationId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "methodOperation"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodMaterial_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "methodMaterial_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodMaterial_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodMaterial_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodMaterial_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthCode_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodMaterial_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- oauthToken: {
+ methodOperation: {
Row: {
- accessToken: string
- clientId: string
companyId: string
- createdAt: string | null
- expiresAt: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ description: string
id: string
- refreshToken: string
- userId: string
+ laborTime: number
+ laborUnit: Database["public"]["Enums"]["factor"]
+ machineTime: number
+ machineUnit: Database["public"]["Enums"]["factor"]
+ makeMethodId: string
+ operationOrder: Database["public"]["Enums"]["methodOperationOrder"]
+ operationSupplierProcessId: string | null
+ operationType: Database["public"]["Enums"]["operationType"]
+ order: number
+ processId: string
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
+ updatedAt: string | null
+ updatedBy: string | null
+ workCenterId: string | null
+ workInstruction: Json
}
Insert: {
- accessToken: string
- clientId: string
companyId: string
- createdAt?: string | null
- expiresAt: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ description: string
id?: string
- refreshToken: string
- userId: string
+ laborTime?: number
+ laborUnit?: Database["public"]["Enums"]["factor"]
+ machineTime?: number
+ machineUnit?: Database["public"]["Enums"]["factor"]
+ makeMethodId: string
+ operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
+ operationSupplierProcessId?: string | null
+ operationType?: Database["public"]["Enums"]["operationType"]
+ order?: number
+ processId: string
+ setupTime?: number
+ setupUnit?: Database["public"]["Enums"]["factor"]
+ updatedAt?: string | null
+ updatedBy?: string | null
+ workCenterId?: string | null
+ workInstruction?: Json
}
Update: {
- accessToken?: string
- clientId?: string
companyId?: string
- createdAt?: string | null
- expiresAt?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ description?: string
id?: string
- refreshToken?: string
- userId?: string
+ laborTime?: number
+ laborUnit?: Database["public"]["Enums"]["factor"]
+ machineTime?: number
+ machineUnit?: Database["public"]["Enums"]["factor"]
+ makeMethodId?: string
+ operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
+ operationSupplierProcessId?: string | null
+ operationType?: Database["public"]["Enums"]["operationType"]
+ order?: number
+ processId?: string
+ setupTime?: number
+ setupUnit?: Database["public"]["Enums"]["factor"]
+ updatedAt?: string | null
+ updatedBy?: string | null
+ workCenterId?: string | null
+ workInstruction?: Json
}
Relationships: [
{
- foreignKeyName: "oauthToken_clientId_fkey"
- columns: ["clientId"]
- isOneToOne: false
- referencedRelation: "oauthClient"
- referencedColumns: ["clientId"]
- },
- {
- foreignKeyName: "oauthToken_companyId_fkey"
+ foreignKeyName: "methodOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthToken_companyId_fkey"
+ foreignKeyName: "methodOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthToken_companyId_fkey"
+ foreignKeyName: "methodOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "oauthToken_companyId_fkey"
+ foreignKeyName: "methodOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "oauthToken_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthToken_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthToken_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthToken_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "oauthToken_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "methodOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- opportunity: {
- Row: {
- companyId: string
- id: string
- purchaseOrderDocumentPath: string | null
- quoteId: string | null
- requestForQuoteDocumentPath: string | null
- salesOrderId: string | null
- salesRfqId: string | null
- }
- Insert: {
- companyId: string
- id?: string
- purchaseOrderDocumentPath?: string | null
- quoteId?: string | null
- requestForQuoteDocumentPath?: string | null
- salesOrderId?: string | null
- salesRfqId?: string | null
- }
- Update: {
- companyId?: string
- id?: string
- purchaseOrderDocumentPath?: string | null
- quoteId?: string | null
- requestForQuoteDocumentPath?: string | null
- salesOrderId?: string | null
- salesRfqId?: string | null
- }
- Relationships: [
{
- foreignKeyName: "opportunity_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodOperation_methodId_fkey"
+ columns: ["makeMethodId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "makeMethod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodOperation_methodId_fkey"
+ columns: ["makeMethodId"]
isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
+ referencedRelation: "quoteOperationsWithMakeMethods"
+ referencedColumns: ["makeMethodId"]
},
{
- foreignKeyName: "opportunity_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodOperation_processId_fkey"
+ columns: ["processId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "process"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "methodOperation_processId_fkey"
+ columns: ["processId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "processes"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "methodOperation_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "quote"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "methodOperation_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "quoteCustomerDetails"
- referencedColumns: ["quoteId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "methodOperation_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "quotes"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "methodOperation_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "salesOrder"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "methodOperation_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "salesOrderLocations"
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "methodOperation_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenter"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "methodOperation_workCenterId_fkey"
+ columns: ["workCenterId"]
isOneToOne: false
- referencedRelation: "salesOrders"
+ referencedRelation: "workCenters"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_salesRfqId_fkey"
- columns: ["salesRfqId"]
+ foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
+ columns: ["operationSupplierProcessId"]
isOneToOne: false
- referencedRelation: "salesRfq"
+ referencedRelation: "supplierProcess"
referencedColumns: ["id"]
},
{
- foreignKeyName: "opportunity_salesRfqId_fkey"
- columns: ["salesRfqId"]
+ foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
+ columns: ["operationSupplierProcessId"]
isOneToOne: false
- referencedRelation: "salesRfqs"
+ referencedRelation: "supplierProcesses"
referencedColumns: ["id"]
},
]
}
- part: {
+ modelUpload: {
Row: {
- approved: boolean
- approvedBy: string | null
+ autodeskUrn: string | null
companyId: string
- createdAt: string
+ createdAt: string | null
createdBy: string
- customFields: Json | null
- fromDate: string | null
id: string
- itemId: string
- toDate: string | null
+ modelPath: string
+ name: string | null
+ size: number | null
+ thumbnailPath: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- approved?: boolean
- approvedBy?: string | null
+ autodeskUrn?: string | null
companyId: string
- createdAt?: string
+ createdAt?: string | null
createdBy: string
- customFields?: Json | null
- fromDate?: string | null
- id: string
- itemId: string
- toDate?: string | null
+ id?: string
+ modelPath: string
+ name?: string | null
+ size?: number | null
+ thumbnailPath?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- approved?: boolean
- approvedBy?: string | null
+ autodeskUrn?: string | null
companyId?: string
- createdAt?: string
+ createdAt?: string | null
createdBy?: string
- customFields?: Json | null
- fromDate?: string | null
id?: string
- itemId?: string
- toDate?: string | null
+ modelPath?: string
+ name?: string | null
+ size?: number | null
+ thumbnailPath?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "part_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "part_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "part_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "part_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "part_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "part_companyId_fkey"
+ foreignKeyName: "modelUpload_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_companyId_fkey"
+ foreignKeyName: "modelUpload_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_companyId_fkey"
+ foreignKeyName: "modelUpload_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "part_companyId_fkey"
+ foreignKeyName: "modelUpload_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "part_createdBy_fkey"
+ foreignKeyName: "modelUpload_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_createdBy_fkey"
+ foreignKeyName: "modelUpload_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_createdBy_fkey"
+ foreignKeyName: "modelUpload_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_createdBy_fkey"
+ foreignKeyName: "modelUpload_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_createdBy_fkey"
+ foreignKeyName: "modelUpload_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "part_id_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "part_id_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
- },
- {
- foreignKeyName: "part_updatedBy_fkey"
+ foreignKeyName: "modelUpload_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_updatedBy_fkey"
+ foreignKeyName: "modelUpload_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_updatedBy_fkey"
+ foreignKeyName: "modelUpload_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_updatedBy_fkey"
+ foreignKeyName: "modelUpload_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "part_updatedBy_fkey"
+ foreignKeyName: "modelUpload_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -9111,482 +9156,648 @@ export type Database = {
},
]
}
- partner: {
+ note: {
Row: {
- abilityId: string
active: boolean
companyId: string
createdAt: string
createdBy: string
- customFields: Json | null
- hoursPerWeek: number
+ documentId: string
id: string
+ note: string
+ noteRichText: Json
updatedAt: string | null
- updatedBy: string | null
}
Insert: {
- abilityId: string
active?: boolean
companyId: string
createdAt?: string
createdBy: string
- customFields?: Json | null
- hoursPerWeek?: number
- id: string
+ documentId: string
+ id?: string
+ note: string
+ noteRichText?: Json
updatedAt?: string | null
- updatedBy?: string | null
}
Update: {
- abilityId?: string
active?: boolean
companyId?: string
createdAt?: string
createdBy?: string
- customFields?: Json | null
- hoursPerWeek?: number
+ documentId?: string
id?: string
+ note?: string
+ noteRichText?: Json
updatedAt?: string | null
- updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "partner_abilityId_fkey"
- columns: ["abilityId"]
- isOneToOne: false
- referencedRelation: "ability"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "partner_companyId_fkey"
+ foreignKeyName: "notes_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_companyId_fkey"
+ foreignKeyName: "notes_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_companyId_fkey"
+ foreignKeyName: "notes_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "partner_companyId_fkey"
+ foreignKeyName: "notes_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "partner_createdBy_fkey"
+ foreignKeyName: "notes_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_createdBy_fkey"
+ foreignKeyName: "notes_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_createdBy_fkey"
+ foreignKeyName: "notes_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_createdBy_fkey"
+ foreignKeyName: "notes_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_createdBy_fkey"
+ foreignKeyName: "notes_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ oauthClient: {
+ Row: {
+ clientId: string
+ clientSecret: string
+ companyId: string
+ createdAt: string | null
+ id: string
+ name: string
+ redirectUris: string[]
+ updatedAt: string | null
+ }
+ Insert: {
+ clientId: string
+ clientSecret: string
+ companyId: string
+ createdAt?: string | null
+ id?: string
+ name: string
+ redirectUris?: string[]
+ updatedAt?: string | null
+ }
+ Update: {
+ clientId?: string
+ clientSecret?: string
+ companyId?: string
+ createdAt?: string | null
+ id?: string
+ name?: string
+ redirectUris?: string[]
+ updatedAt?: string | null
+ }
+ Relationships: []
+ }
+ oauthCode: {
+ Row: {
+ clientId: string
+ code: string
+ companyId: string
+ createdAt: string | null
+ expiresAt: string
+ id: string
+ redirectUri: string
+ userId: string
+ }
+ Insert: {
+ clientId: string
+ code: string
+ companyId: string
+ createdAt?: string | null
+ expiresAt: string
+ id?: string
+ redirectUri: string
+ userId: string
+ }
+ Update: {
+ clientId?: string
+ code?: string
+ companyId?: string
+ createdAt?: string | null
+ expiresAt?: string
+ id?: string
+ redirectUri?: string
+ userId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "oauthCode_clientId_fkey"
+ columns: ["clientId"]
+ isOneToOne: false
+ referencedRelation: "oauthClient"
+ referencedColumns: ["clientId"]
+ },
{
- foreignKeyName: "partner_id_fkey"
- columns: ["id"]
+ foreignKeyName: "oauthCode_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "supplierLocation"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "oauthCode_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "oauthCode_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "oauthCode_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "oauthCode_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "oauthCode_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "oauthCode_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "oauthCode_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "partner_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "oauthCode_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- paymentTerm: {
+ oauthToken: {
Row: {
- active: boolean
- calculationMethod: Database["public"]["Enums"]["paymentTermCalculationMethod"]
+ accessToken: string
+ clientId: string
companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- daysDiscount: number
- daysDue: number
- discountPercentage: number
+ createdAt: string | null
+ expiresAt: string
id: string
- name: string
- updatedAt: string | null
- updatedBy: string | null
+ refreshToken: string
+ userId: string
}
Insert: {
- active?: boolean
- calculationMethod?: Database["public"]["Enums"]["paymentTermCalculationMethod"]
+ accessToken: string
+ clientId: string
companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- daysDiscount?: number
- daysDue?: number
- discountPercentage?: number
+ createdAt?: string | null
+ expiresAt: string
id?: string
- name: string
- updatedAt?: string | null
- updatedBy?: string | null
+ refreshToken: string
+ userId: string
}
Update: {
- active?: boolean
- calculationMethod?: Database["public"]["Enums"]["paymentTermCalculationMethod"]
+ accessToken?: string
+ clientId?: string
companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- daysDiscount?: number
- daysDue?: number
- discountPercentage?: number
+ createdAt?: string | null
+ expiresAt?: string
id?: string
- name?: string
- updatedAt?: string | null
- updatedBy?: string | null
+ refreshToken?: string
+ userId?: string
}
Relationships: [
{
- foreignKeyName: "paymentTerm_companyId_fkey"
+ foreignKeyName: "oauthToken_clientId_fkey"
+ columns: ["clientId"]
+ isOneToOne: false
+ referencedRelation: "oauthClient"
+ referencedColumns: ["clientId"]
+ },
+ {
+ foreignKeyName: "oauthToken_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_companyId_fkey"
+ foreignKeyName: "oauthToken_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_companyId_fkey"
+ foreignKeyName: "oauthToken_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "paymentTerm_companyId_fkey"
+ foreignKeyName: "oauthToken_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "paymentTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "oauthToken_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "oauthToken_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "oauthToken_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "oauthToken_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "oauthToken_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "paymentTerm_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "paymentTerm_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "paymentTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ ]
+ }
+ opportunity: {
+ Row: {
+ companyId: string
+ id: string
+ purchaseOrderDocumentPath: string | null
+ quoteId: string | null
+ requestForQuoteDocumentPath: string | null
+ salesOrderId: string | null
+ salesRfqId: string | null
+ }
+ Insert: {
+ companyId: string
+ id?: string
+ purchaseOrderDocumentPath?: string | null
+ quoteId?: string | null
+ requestForQuoteDocumentPath?: string | null
+ salesOrderId?: string | null
+ salesRfqId?: string | null
+ }
+ Update: {
+ companyId?: string
+ id?: string
+ purchaseOrderDocumentPath?: string | null
+ quoteId?: string | null
+ requestForQuoteDocumentPath?: string | null
+ salesOrderId?: string | null
+ salesRfqId?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "opportunity_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "opportunity_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "paymentTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "opportunity_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "opportunity_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "opportunity_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quote"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "opportunity_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quoteCustomerDetails"
+ referencedColumns: ["quoteId"]
+ },
+ {
+ foreignKeyName: "opportunity_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quotes"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "opportunity_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrder"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "opportunity_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderLocations"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "opportunity_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "opportunity_salesRfqId_fkey"
+ columns: ["salesRfqId"]
+ isOneToOne: false
+ referencedRelation: "salesRfq"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "opportunity_salesRfqId_fkey"
+ columns: ["salesRfqId"]
+ isOneToOne: false
+ referencedRelation: "salesRfqs"
+ referencedColumns: ["id"]
},
]
}
- pickMethod: {
+ part: {
Row: {
+ approved: boolean
+ approvedBy: string | null
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
- defaultShelfId: string | null
+ fromDate: string | null
+ id: string
itemId: string
- locationId: string
+ toDate: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
+ approved?: boolean
+ approvedBy?: string | null
companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
- defaultShelfId?: string | null
+ fromDate?: string | null
+ id: string
itemId: string
- locationId: string
+ toDate?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
+ approved?: boolean
+ approvedBy?: string | null
companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
- defaultShelfId?: string | null
+ fromDate?: string | null
+ id?: string
itemId?: string
- locationId?: string
+ toDate?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "pickMethod_companyId_fkey"
+ foreignKeyName: "part_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "part_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "part_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "part_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "part_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "part_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_companyId_fkey"
+ foreignKeyName: "part_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_companyId_fkey"
+ foreignKeyName: "part_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "pickMethod_companyId_fkey"
+ foreignKeyName: "part_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "pickMethod_createdBy_fkey"
+ foreignKeyName: "part_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_createdBy_fkey"
+ foreignKeyName: "part_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_createdBy_fkey"
+ foreignKeyName: "part_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_createdBy_fkey"
+ foreignKeyName: "part_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_createdBy_fkey"
+ foreignKeyName: "part_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "pickMethod_itemId_fkey"
+ foreignKeyName: "part_id_fkey"
columns: ["itemId"]
isOneToOne: false
referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_itemId_fkey"
+ foreignKeyName: "part_id_fkey"
columns: ["itemId"]
isOneToOne: false
referencedRelation: "itemQuantities"
referencedColumns: ["itemId"]
},
{
- foreignKeyName: "pickMethod_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "pickMethod_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "pickMethod_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "pickMethod_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "pickMethod_shelfId_fkey"
- columns: ["defaultShelfId", "locationId"]
- isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
- },
- {
- foreignKeyName: "pickMethod_updatedBy_fkey"
+ foreignKeyName: "part_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_updatedBy_fkey"
+ foreignKeyName: "part_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_updatedBy_fkey"
+ foreignKeyName: "part_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_updatedBy_fkey"
+ foreignKeyName: "part_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "pickMethod_updatedBy_fkey"
+ foreignKeyName: "part_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -9594,536 +9805,482 @@ export type Database = {
},
]
}
- postingGroupInventory: {
+ partner: {
Row: {
- capacityVarianceAccount: string
+ abilityId: string
+ active: boolean
companyId: string
- costOfGoodsSoldAccount: string
- directCostAppliedAccount: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ hoursPerWeek: number
id: string
- inventoryAccount: string
- inventoryAdjustmentVarianceAccount: string
- inventoryInterimAccrualAccount: string
- inventoryInvoicedNotReceivedAccount: string
- inventoryReceivedNotInvoicedAccount: string
- inventoryShippedNotInvoicedAccount: string
- itemPostingGroupId: string | null
- locationId: string | null
- materialVarianceAccount: string
- overheadAccount: string
- overheadCostAppliedAccount: string
- purchaseVarianceAccount: string
+ updatedAt: string | null
updatedBy: string | null
- workInProgressAccount: string
}
Insert: {
- capacityVarianceAccount: string
+ abilityId: string
+ active?: boolean
companyId: string
- costOfGoodsSoldAccount: string
- directCostAppliedAccount: string
- id?: string
- inventoryAccount: string
- inventoryAdjustmentVarianceAccount: string
- inventoryInterimAccrualAccount: string
- inventoryInvoicedNotReceivedAccount: string
- inventoryReceivedNotInvoicedAccount: string
- inventoryShippedNotInvoicedAccount: string
- itemPostingGroupId?: string | null
- locationId?: string | null
- materialVarianceAccount: string
- overheadAccount: string
- overheadCostAppliedAccount: string
- purchaseVarianceAccount: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ hoursPerWeek?: number
+ id: string
+ updatedAt?: string | null
updatedBy?: string | null
- workInProgressAccount: string
}
Update: {
- capacityVarianceAccount?: string
+ abilityId?: string
+ active?: boolean
companyId?: string
- costOfGoodsSoldAccount?: string
- directCostAppliedAccount?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ hoursPerWeek?: number
id?: string
- inventoryAccount?: string
- inventoryAdjustmentVarianceAccount?: string
- inventoryInterimAccrualAccount?: string
- inventoryInvoicedNotReceivedAccount?: string
- inventoryReceivedNotInvoicedAccount?: string
- inventoryShippedNotInvoicedAccount?: string
- itemPostingGroupId?: string | null
- locationId?: string | null
- materialVarianceAccount?: string
- overheadAccount?: string
- overheadCostAppliedAccount?: string
- purchaseVarianceAccount?: string
+ updatedAt?: string | null
updatedBy?: string | null
- workInProgressAccount?: string
}
Relationships: [
{
- foreignKeyName: "postingGroupInventory_capacityVarianceAccount_fkey"
- columns: ["capacityVarianceAccount", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "postingGroupInventory_capacityVarianceAccount_fkey"
- columns: ["capacityVarianceAccount", "companyId"]
+ foreignKeyName: "partner_abilityId_fkey"
+ columns: ["abilityId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "ability"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_costOfGoodsSoldAccount_fkey"
- columns: ["costOfGoodsSoldAccount", "companyId"]
+ foreignKeyName: "partner_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_costOfGoodsSoldAccount_fkey"
- columns: ["costOfGoodsSoldAccount", "companyId"]
+ foreignKeyName: "partner_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "company"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_directCostAppliedAccount_fkey"
- columns: ["directCostAppliedAccount", "companyId"]
+ foreignKeyName: "partner_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "postingGroupInventory_directCostAppliedAccount_fkey"
- columns: ["directCostAppliedAccount", "companyId"]
+ foreignKeyName: "partner_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryAccount_fkey"
- columns: ["inventoryAccount", "companyId"]
+ foreignKeyName: "partner_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryAccount_fkey"
- columns: ["inventoryAccount", "companyId"]
+ foreignKeyName: "partner_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryAdjustmentVarianceAccount_fkey"
- columns: ["inventoryAdjustmentVarianceAccount", "companyId"]
+ foreignKeyName: "partner_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryAdjustmentVarianceAccount_fkey"
- columns: ["inventoryAdjustmentVarianceAccount", "companyId"]
+ foreignKeyName: "partner_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryInterimAccrualAccount_fkey"
- columns: ["inventoryInterimAccrualAccount", "companyId"]
+ foreignKeyName: "partner_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryInterimAccrualAccount_fkey"
- columns: ["inventoryInterimAccrualAccount", "companyId"]
+ foreignKeyName: "partner_id_fkey"
+ columns: ["id"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "supplierLocation"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryInvoicedNotReceivedAccount_fkey"
- columns: ["inventoryInvoicedNotReceivedAccount", "companyId"]
+ foreignKeyName: "partner_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryInvoicedNotReceivedAccount_fkey"
- columns: ["inventoryInvoicedNotReceivedAccount", "companyId"]
+ foreignKeyName: "partner_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryReceivedNotInvoicedAccount_fkey"
- columns: ["inventoryReceivedNotInvoicedAccount", "companyId"]
+ foreignKeyName: "partner_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryReceivedNotInvoicedAccount_fkey"
- columns: ["inventoryReceivedNotInvoicedAccount", "companyId"]
+ foreignKeyName: "partner_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_inventoryShippedNotInvoicedAccount_fkey"
- columns: ["inventoryShippedNotInvoicedAccount", "companyId"]
+ foreignKeyName: "partner_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
+ ]
+ }
+ paymentTerm: {
+ Row: {
+ active: boolean
+ calculationMethod: Database["public"]["Enums"]["paymentTermCalculationMethod"]
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ daysDiscount: number
+ daysDue: number
+ discountPercentage: number
+ id: string
+ name: string
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ active?: boolean
+ calculationMethod?: Database["public"]["Enums"]["paymentTermCalculationMethod"]
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ daysDiscount?: number
+ daysDue?: number
+ discountPercentage?: number
+ id?: string
+ name: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ active?: boolean
+ calculationMethod?: Database["public"]["Enums"]["paymentTermCalculationMethod"]
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ daysDiscount?: number
+ daysDue?: number
+ discountPercentage?: number
+ id?: string
+ name?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "postingGroupInventory_inventoryShippedNotInvoicedAccount_fkey"
- columns: ["inventoryShippedNotInvoicedAccount", "companyId"]
+ foreignKeyName: "paymentTerm_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_itemPostingGroupId_fkey"
- columns: ["itemPostingGroupId"]
+ foreignKeyName: "paymentTerm_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "itemPostingGroup"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "postingGroupInventory_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "postingGroupInventory_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "postingGroupInventory_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "postingGroupInventory_materialVarianceAccount_fkey"
- columns: ["materialVarianceAccount", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "postingGroupInventory_materialVarianceAccount_fkey"
- columns: ["materialVarianceAccount", "companyId"]
+ foreignKeyName: "paymentTerm_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "postingGroupInventory_overheadAccount_fkey"
- columns: ["overheadAccount", "companyId"]
+ foreignKeyName: "paymentTerm_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "postingGroupInventory_overheadAccount_fkey"
- columns: ["overheadAccount", "companyId"]
+ foreignKeyName: "paymentTerm_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_overheadCostAppliedAccount_fkey"
- columns: ["overheadCostAppliedAccount", "companyId"]
+ foreignKeyName: "paymentTerm_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_overheadCostAppliedAccount_fkey"
- columns: ["overheadCostAppliedAccount", "companyId"]
+ foreignKeyName: "paymentTerm_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_purchaseVarianceAccount_fkey"
- columns: ["purchaseVarianceAccount", "companyId"]
+ foreignKeyName: "paymentTerm_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_purchaseVarianceAccount_fkey"
- columns: ["purchaseVarianceAccount", "companyId"]
+ foreignKeyName: "paymentTerm_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "postingGroupInventory_updatedBy_fkey"
+ foreignKeyName: "paymentTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_updatedBy_fkey"
+ foreignKeyName: "paymentTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_updatedBy_fkey"
+ foreignKeyName: "paymentTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_updatedBy_fkey"
+ foreignKeyName: "paymentTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupInventory_updatedBy_fkey"
+ foreignKeyName: "paymentTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "postingGroupInventory_workInProgressAccount_fkey"
- columns: ["workInProgressAccount", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "postingGroupInventory_workInProgressAccount_fkey"
- columns: ["workInProgressAccount", "companyId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
- },
]
}
- postingGroupPurchasing: {
+ pickMethod: {
Row: {
companyId: string
- id: string
- itemPostingGroupId: string | null
- payablesAccount: string
- purchaseAccount: string
- purchaseCreditAccount: string
- purchaseDiscountAccount: string
- purchasePrepaymentAccount: string
- purchaseTaxPayableAccount: string
- supplierTypeId: string | null
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ defaultShelfId: string | null
+ itemId: string
+ locationId: string
+ updatedAt: string | null
updatedBy: string | null
}
Insert: {
companyId: string
- id?: string
- itemPostingGroupId?: string | null
- payablesAccount: string
- purchaseAccount: string
- purchaseCreditAccount: string
- purchaseDiscountAccount: string
- purchasePrepaymentAccount: string
- purchaseTaxPayableAccount: string
- supplierTypeId?: string | null
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ defaultShelfId?: string | null
+ itemId: string
+ locationId: string
+ updatedAt?: string | null
updatedBy?: string | null
}
Update: {
companyId?: string
- id?: string
- itemPostingGroupId?: string | null
- payablesAccount?: string
- purchaseAccount?: string
- purchaseCreditAccount?: string
- purchaseDiscountAccount?: string
- purchasePrepaymentAccount?: string
- purchaseTaxPayableAccount?: string
- supplierTypeId?: string | null
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ defaultShelfId?: string | null
+ itemId?: string
+ locationId?: string
+ updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "postingGroupPurchasing_companyId_fkey"
+ foreignKeyName: "pickMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_companyId_fkey"
+ foreignKeyName: "pickMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_companyId_fkey"
+ foreignKeyName: "pickMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "postingGroupPurchasing_companyId_fkey"
+ foreignKeyName: "pickMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "postingGroupPurchasing_itemPostingGroupId_fkey"
- columns: ["itemPostingGroupId"]
+ foreignKeyName: "pickMethod_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "itemPostingGroup"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_payablesAccount_fkey"
- columns: ["payablesAccount", "companyId"]
+ foreignKeyName: "pickMethod_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_payablesAccount_fkey"
- columns: ["payablesAccount", "companyId"]
+ foreignKeyName: "pickMethod_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseAccount_fkey"
- columns: ["purchaseAccount", "companyId"]
+ foreignKeyName: "pickMethod_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseAccount_fkey"
- columns: ["purchaseAccount", "companyId"]
+ foreignKeyName: "pickMethod_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseCreditAccount_fkey"
- columns: ["purchaseCreditAccount", "companyId"]
+ foreignKeyName: "pickMethod_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "item"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseCreditAccount_fkey"
- columns: ["purchaseCreditAccount", "companyId"]
+ foreignKeyName: "pickMethod_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseDiscountAccount_fkey"
- columns: ["purchaseDiscountAccount", "companyId"]
+ foreignKeyName: "pickMethod_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseDiscountAccount_fkey"
- columns: ["purchaseDiscountAccount", "companyId"]
+ foreignKeyName: "pickMethod_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "location"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchasePrepaymentAccount_fkey"
- columns: ["purchasePrepaymentAccount", "companyId"]
+ foreignKeyName: "pickMethod_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "postingGroupPurchasing_purchasePrepaymentAccount_fkey"
- columns: ["purchasePrepaymentAccount", "companyId"]
+ foreignKeyName: "pickMethod_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "postingGroupPurchasing_purchaseTaxPayableAccount_fkey"
- columns: ["purchaseTaxPayableAccount", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "postingGroupPurchasing_purchaseTaxPayableAccount_fkey"
- columns: ["purchaseTaxPayableAccount", "companyId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "postingGroupPurchasing_supplierTypeId_fkey"
- columns: ["supplierTypeId"]
+ foreignKeyName: "pickMethod_shelfId_fkey"
+ columns: ["defaultShelfId", "locationId"]
isOneToOne: false
- referencedRelation: "supplierType"
- referencedColumns: ["id"]
+ referencedRelation: "shelf"
+ referencedColumns: ["id", "locationId"]
},
{
- foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
+ foreignKeyName: "pickMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
+ foreignKeyName: "pickMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
+ foreignKeyName: "pickMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
+ foreignKeyName: "pickMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
+ foreignKeyName: "pickMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -10131,663 +10288,536 @@ export type Database = {
},
]
}
- postingGroupSales: {
+ postingGroupInventory: {
Row: {
+ capacityVarianceAccount: string
companyId: string
- customerTypeId: string | null
+ costOfGoodsSoldAccount: string
+ directCostAppliedAccount: string
id: string
+ inventoryAccount: string
+ inventoryAdjustmentVarianceAccount: string
+ inventoryInterimAccrualAccount: string
+ inventoryInvoicedNotReceivedAccount: string
+ inventoryReceivedNotInvoicedAccount: string
+ inventoryShippedNotInvoicedAccount: string
itemPostingGroupId: string | null
- receivablesAccount: string
- salesAccount: string
- salesCreditAccount: string
- salesDiscountAccount: string
- salesPrepaymentAccount: string
- salesTaxPayableAccount: string
+ locationId: string | null
+ materialVarianceAccount: string
+ overheadAccount: string
+ overheadCostAppliedAccount: string
+ purchaseVarianceAccount: string
updatedBy: string | null
+ workInProgressAccount: string
}
Insert: {
+ capacityVarianceAccount: string
companyId: string
- customerTypeId?: string | null
+ costOfGoodsSoldAccount: string
+ directCostAppliedAccount: string
id?: string
+ inventoryAccount: string
+ inventoryAdjustmentVarianceAccount: string
+ inventoryInterimAccrualAccount: string
+ inventoryInvoicedNotReceivedAccount: string
+ inventoryReceivedNotInvoicedAccount: string
+ inventoryShippedNotInvoicedAccount: string
itemPostingGroupId?: string | null
- receivablesAccount: string
- salesAccount: string
- salesCreditAccount: string
- salesDiscountAccount: string
- salesPrepaymentAccount: string
- salesTaxPayableAccount: string
+ locationId?: string | null
+ materialVarianceAccount: string
+ overheadAccount: string
+ overheadCostAppliedAccount: string
+ purchaseVarianceAccount: string
updatedBy?: string | null
+ workInProgressAccount: string
}
Update: {
+ capacityVarianceAccount?: string
companyId?: string
- customerTypeId?: string | null
+ costOfGoodsSoldAccount?: string
+ directCostAppliedAccount?: string
id?: string
+ inventoryAccount?: string
+ inventoryAdjustmentVarianceAccount?: string
+ inventoryInterimAccrualAccount?: string
+ inventoryInvoicedNotReceivedAccount?: string
+ inventoryReceivedNotInvoicedAccount?: string
+ inventoryShippedNotInvoicedAccount?: string
itemPostingGroupId?: string | null
- receivablesAccount?: string
- salesAccount?: string
- salesCreditAccount?: string
- salesDiscountAccount?: string
- salesPrepaymentAccount?: string
- salesTaxPayableAccount?: string
+ locationId?: string | null
+ materialVarianceAccount?: string
+ overheadAccount?: string
+ overheadCostAppliedAccount?: string
+ purchaseVarianceAccount?: string
updatedBy?: string | null
+ workInProgressAccount?: string
}
Relationships: [
{
- foreignKeyName: "postingGroupSales_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_capacityVarianceAccount_fkey"
+ columns: ["capacityVarianceAccount", "companyId"]
isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_capacityVarianceAccount_fkey"
+ columns: ["capacityVarianceAccount", "companyId"]
isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_costOfGoodsSoldAccount_fkey"
+ columns: ["costOfGoodsSoldAccount", "companyId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_costOfGoodsSoldAccount_fkey"
+ columns: ["costOfGoodsSoldAccount", "companyId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_customerTypeId_fkey"
- columns: ["customerTypeId"]
+ foreignKeyName: "postingGroupInventory_directCostAppliedAccount_fkey"
+ columns: ["directCostAppliedAccount", "companyId"]
isOneToOne: false
- referencedRelation: "customerType"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_itemPostingGroupId_fkey"
- columns: ["itemPostingGroupId"]
+ foreignKeyName: "postingGroupInventory_directCostAppliedAccount_fkey"
+ columns: ["directCostAppliedAccount", "companyId"]
isOneToOne: false
- referencedRelation: "itemPostingGroup"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_receivablesAccount_fkey"
- columns: ["receivablesAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryAccount_fkey"
+ columns: ["inventoryAccount", "companyId"]
isOneToOne: false
referencedRelation: "account"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_receivablesAccount_fkey"
- columns: ["receivablesAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryAccount_fkey"
+ columns: ["inventoryAccount", "companyId"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesAccount_fkey"
- columns: ["salesAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryAdjustmentVarianceAccount_fkey"
+ columns: ["inventoryAdjustmentVarianceAccount", "companyId"]
isOneToOne: false
referencedRelation: "account"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesAccount_fkey"
- columns: ["salesAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryAdjustmentVarianceAccount_fkey"
+ columns: ["inventoryAdjustmentVarianceAccount", "companyId"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesCreditAccount_fkey"
- columns: ["salesCreditAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryInterimAccrualAccount_fkey"
+ columns: ["inventoryInterimAccrualAccount", "companyId"]
isOneToOne: false
referencedRelation: "account"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesCreditAccount_fkey"
- columns: ["salesCreditAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryInterimAccrualAccount_fkey"
+ columns: ["inventoryInterimAccrualAccount", "companyId"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesDiscountAccount_fkey"
- columns: ["salesDiscountAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryInvoicedNotReceivedAccount_fkey"
+ columns: ["inventoryInvoicedNotReceivedAccount", "companyId"]
isOneToOne: false
referencedRelation: "account"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesDiscountAccount_fkey"
- columns: ["salesDiscountAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryInvoicedNotReceivedAccount_fkey"
+ columns: ["inventoryInvoicedNotReceivedAccount", "companyId"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesPrepaymentAccount_fkey"
- columns: ["salesPrepaymentAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryReceivedNotInvoicedAccount_fkey"
+ columns: ["inventoryReceivedNotInvoicedAccount", "companyId"]
isOneToOne: false
referencedRelation: "account"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesPrepaymentAccount_fkey"
- columns: ["salesPrepaymentAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryReceivedNotInvoicedAccount_fkey"
+ columns: ["inventoryReceivedNotInvoicedAccount", "companyId"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesTaxPayableAccount_fkey"
- columns: ["salesTaxPayableAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryShippedNotInvoicedAccount_fkey"
+ columns: ["inventoryShippedNotInvoicedAccount", "companyId"]
isOneToOne: false
referencedRelation: "account"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_salesTaxPayableAccount_fkey"
- columns: ["salesTaxPayableAccount", "companyId"]
+ foreignKeyName: "postingGroupInventory_inventoryShippedNotInvoicedAccount_fkey"
+ columns: ["inventoryShippedNotInvoicedAccount", "companyId"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "postingGroupSales_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "postingGroupInventory_itemPostingGroupId_fkey"
+ columns: ["itemPostingGroupId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "itemPostingGroup"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupSales_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "postingGroupInventory_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "postingGroupSales_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "postingGroupInventory_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "postingGroupSales_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "postingGroupInventory_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "postingGroupSales_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "postingGroupInventory_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
- process: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- defaultStandardFactor: Database["public"]["Enums"]["factor"]
- id: string
- name: string
- processType: Database["public"]["Enums"]["processType"]
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- defaultStandardFactor: Database["public"]["Enums"]["factor"]
- id?: string
- name: string
- processType?: Database["public"]["Enums"]["processType"]
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- defaultStandardFactor?: Database["public"]["Enums"]["factor"]
- id?: string
- name?: string
- processType?: Database["public"]["Enums"]["processType"]
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "process_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "process_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_materialVarianceAccount_fkey"
+ columns: ["materialVarianceAccount", "companyId"]
isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_materialVarianceAccount_fkey"
+ columns: ["materialVarianceAccount", "companyId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupInventory_overheadAccount_fkey"
+ columns: ["overheadAccount", "companyId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupInventory_overheadAccount_fkey"
+ columns: ["overheadAccount", "companyId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupInventory_overheadCostAppliedAccount_fkey"
+ columns: ["overheadCostAppliedAccount", "companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupInventory_overheadCostAppliedAccount_fkey"
+ columns: ["overheadCostAppliedAccount", "companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupInventory_purchaseVarianceAccount_fkey"
+ columns: ["purchaseVarianceAccount", "companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupInventory_purchaseVarianceAccount_fkey"
+ columns: ["purchaseVarianceAccount", "companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "process_updatedBy_fkey"
+ foreignKeyName: "postingGroupInventory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "process_updatedBy_fkey"
+ foreignKeyName: "postingGroupInventory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "process_updatedBy_fkey"
+ foreignKeyName: "postingGroupInventory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "process_updatedBy_fkey"
+ foreignKeyName: "postingGroupInventory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "process_updatedBy_fkey"
+ foreignKeyName: "postingGroupInventory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "postingGroupInventory_workInProgressAccount_fkey"
+ columns: ["workInProgressAccount", "companyId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
+ },
+ {
+ foreignKeyName: "postingGroupInventory_workInProgressAccount_fkey"
+ columns: ["workInProgressAccount", "companyId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
+ },
]
}
- purchaseInvoice: {
+ postingGroupPurchasing: {
Row: {
- assignee: string | null
- balance: number
companyId: string
- createdAt: string
- createdBy: string
- currencyCode: string
- customFields: Json | null
- dateDue: string | null
- dateIssued: string | null
- datePaid: string | null
- exchangeRate: number
id: string
- invoiceId: string
- invoiceSupplierContactId: string | null
- invoiceSupplierId: string | null
- invoiceSupplierLocationId: string | null
- paymentTermId: string | null
- postingDate: string | null
- status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- subtotal: number
- supplierId: string | null
- supplierReference: string | null
- totalAmount: number
- totalDiscount: number
- totalTax: number
- updatedAt: string | null
+ itemPostingGroupId: string | null
+ payablesAccount: string
+ purchaseAccount: string
+ purchaseCreditAccount: string
+ purchaseDiscountAccount: string
+ purchasePrepaymentAccount: string
+ purchaseTaxPayableAccount: string
+ supplierTypeId: string | null
updatedBy: string | null
}
Insert: {
- assignee?: string | null
- balance?: number
companyId: string
- createdAt?: string
- createdBy: string
- currencyCode: string
- customFields?: Json | null
- dateDue?: string | null
- dateIssued?: string | null
- datePaid?: string | null
- exchangeRate?: number
id?: string
- invoiceId: string
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentTermId?: string | null
- postingDate?: string | null
- status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- subtotal?: number
- supplierId?: string | null
- supplierReference?: string | null
- totalAmount?: number
- totalDiscount?: number
- totalTax?: number
- updatedAt?: string | null
+ itemPostingGroupId?: string | null
+ payablesAccount: string
+ purchaseAccount: string
+ purchaseCreditAccount: string
+ purchaseDiscountAccount: string
+ purchasePrepaymentAccount: string
+ purchaseTaxPayableAccount: string
+ supplierTypeId?: string | null
updatedBy?: string | null
}
Update: {
- assignee?: string | null
- balance?: number
companyId?: string
- createdAt?: string
- createdBy?: string
- currencyCode?: string
- customFields?: Json | null
- dateDue?: string | null
- dateIssued?: string | null
- datePaid?: string | null
- exchangeRate?: number
id?: string
- invoiceId?: string
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentTermId?: string | null
- postingDate?: string | null
- status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- subtotal?: number
- supplierId?: string | null
- supplierReference?: string | null
- totalAmount?: number
- totalDiscount?: number
- totalTax?: number
- updatedAt?: string | null
+ itemPostingGroupId?: string | null
+ payablesAccount?: string
+ purchaseAccount?: string
+ purchaseCreditAccount?: string
+ purchaseDiscountAccount?: string
+ purchasePrepaymentAccount?: string
+ purchaseTaxPayableAccount?: string
+ supplierTypeId?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchaseInvoice_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "purchaseInvoice_companyId_fkey"
+ foreignKeyName: "postingGroupPurchasing_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_companyId_fkey"
+ foreignKeyName: "postingGroupPurchasing_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_companyId_fkey"
+ foreignKeyName: "postingGroupPurchasing_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseInvoice_companyId_fkey"
+ foreignKeyName: "postingGroupPurchasing_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupPurchasing_itemPostingGroupId_fkey"
+ columns: ["itemPostingGroupId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "itemPostingGroup"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "purchaseInvoice_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
- isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
- },
- {
- foreignKeyName: "purchaseInvoice_invoiceSupplierContactId_fkey"
- columns: ["invoiceSupplierContactId"]
+ foreignKeyName: "postingGroupPurchasing_payablesAccount_fkey"
+ columns: ["payablesAccount", "companyId"]
isOneToOne: false
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "postingGroupPurchasing_payablesAccount_fkey"
+ columns: ["payablesAccount", "companyId"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseAccount_fkey"
+ columns: ["purchaseAccount", "companyId"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseAccount_fkey"
+ columns: ["purchaseAccount", "companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseCreditAccount_fkey"
+ columns: ["purchaseCreditAccount", "companyId"]
isOneToOne: false
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseCreditAccount_fkey"
+ columns: ["purchaseCreditAccount", "companyId"]
isOneToOne: false
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierLocationId_fkey"
- columns: ["invoiceSupplierLocationId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseDiscountAccount_fkey"
+ columns: ["purchaseDiscountAccount", "companyId"]
isOneToOne: false
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_paymentTermId_fkey"
- columns: ["paymentTermId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseDiscountAccount_fkey"
+ columns: ["purchaseDiscountAccount", "companyId"]
isOneToOne: false
- referencedRelation: "paymentTerm"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchasePrepaymentAccount_fkey"
+ columns: ["purchasePrepaymentAccount", "companyId"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchasePrepaymentAccount_fkey"
+ columns: ["purchasePrepaymentAccount", "companyId"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseTaxPayableAccount_fkey"
+ columns: ["purchaseTaxPayableAccount", "companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "postingGroupPurchasing_purchaseTaxPayableAccount_fkey"
+ columns: ["purchaseTaxPayableAccount", "companyId"]
isOneToOne: false
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "postingGroupPurchasing_supplierTypeId_fkey"
+ columns: ["supplierTypeId"]
isOneToOne: false
- referencedRelation: "suppliers"
+ referencedRelation: "supplierType"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
+ foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
+ foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
+ foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
+ foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
+ foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -10795,451 +10825,341 @@ export type Database = {
},
]
}
- purchaseInvoiceLine: {
+ postingGroupSales: {
Row: {
- accountNumber: string | null
- assetId: string | null
companyId: string
- conversionFactor: number | null
- createdAt: string
- createdBy: string
- currencyCode: string
- customFields: Json | null
- description: string | null
- exchangeRate: number
+ customerTypeId: string | null
id: string
- inventoryUnitOfMeasureCode: string | null
- invoiceId: string
- invoiceLineType: Database["public"]["Enums"]["payableLineType"]
- itemId: string | null
- itemReadableId: string | null
- locationId: string | null
- purchaseOrderId: string | null
- purchaseOrderLineId: string | null
- purchaseUnitOfMeasureCode: string | null
- quantity: number
- serviceId: string | null
- shelfId: string | null
- totalAmount: number | null
- unitPrice: number
- updatedAt: string | null
+ itemPostingGroupId: string | null
+ receivablesAccount: string
+ salesAccount: string
+ salesCreditAccount: string
+ salesDiscountAccount: string
+ salesPrepaymentAccount: string
+ salesTaxPayableAccount: string
updatedBy: string | null
}
Insert: {
- accountNumber?: string | null
- assetId?: string | null
companyId: string
- conversionFactor?: number | null
- createdAt?: string
- createdBy: string
- currencyCode: string
- customFields?: Json | null
- description?: string | null
- exchangeRate?: number
+ customerTypeId?: string | null
id?: string
- inventoryUnitOfMeasureCode?: string | null
- invoiceId: string
- invoiceLineType: Database["public"]["Enums"]["payableLineType"]
- itemId?: string | null
- itemReadableId?: string | null
- locationId?: string | null
- purchaseOrderId?: string | null
- purchaseOrderLineId?: string | null
- purchaseUnitOfMeasureCode?: string | null
- quantity?: number
- serviceId?: string | null
- shelfId?: string | null
- totalAmount?: number | null
- unitPrice?: number
- updatedAt?: string | null
+ itemPostingGroupId?: string | null
+ receivablesAccount: string
+ salesAccount: string
+ salesCreditAccount: string
+ salesDiscountAccount: string
+ salesPrepaymentAccount: string
+ salesTaxPayableAccount: string
updatedBy?: string | null
}
Update: {
- accountNumber?: string | null
- assetId?: string | null
companyId?: string
- conversionFactor?: number | null
- createdAt?: string
- createdBy?: string
- currencyCode?: string
- customFields?: Json | null
- description?: string | null
- exchangeRate?: number
+ customerTypeId?: string | null
id?: string
- inventoryUnitOfMeasureCode?: string | null
- invoiceId?: string
- invoiceLineType?: Database["public"]["Enums"]["payableLineType"]
- itemId?: string | null
- itemReadableId?: string | null
- locationId?: string | null
- purchaseOrderId?: string | null
- purchaseOrderLineId?: string | null
- purchaseUnitOfMeasureCode?: string | null
- quantity?: number
- serviceId?: string | null
- shelfId?: string | null
- totalAmount?: number | null
- unitPrice?: number
- updatedAt?: string | null
+ itemPostingGroupId?: string | null
+ receivablesAccount?: string
+ salesAccount?: string
+ salesCreditAccount?: string
+ salesDiscountAccount?: string
+ salesPrepaymentAccount?: string
+ salesTaxPayableAccount?: string
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchaseInvoiceLines_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "purchaseInvoiceLines_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "postingGroupSales_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ foreignKeyName: "postingGroupSales_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ foreignKeyName: "postingGroupSales_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ foreignKeyName: "postingGroupSales_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupSales_customerTypeId_fkey"
+ columns: ["customerTypeId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "customerType"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupSales_itemPostingGroupId_fkey"
+ columns: ["itemPostingGroupId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "itemPostingGroup"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupSales_receivablesAccount_fkey"
+ columns: ["receivablesAccount", "companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupSales_receivablesAccount_fkey"
+ columns: ["receivablesAccount", "companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "postingGroupSales_salesAccount_fkey"
+ columns: ["salesAccount", "companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
+ foreignKeyName: "postingGroupSales_salesAccount_fkey"
+ columns: ["salesAccount", "companyId"]
isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_inventoryUnitOfMeasureCode_fkey"
- columns: ["inventoryUnitOfMeasureCode", "companyId"]
+ foreignKeyName: "postingGroupSales_salesCreditAccount_fkey"
+ columns: ["salesCreditAccount", "companyId"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_invoiceId_fkey"
- columns: ["invoiceId"]
+ foreignKeyName: "postingGroupSales_salesCreditAccount_fkey"
+ columns: ["salesCreditAccount", "companyId"]
isOneToOne: false
- referencedRelation: "purchaseInvoice"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_invoiceId_fkey"
- columns: ["invoiceId"]
+ foreignKeyName: "postingGroupSales_salesDiscountAccount_fkey"
+ columns: ["salesDiscountAccount", "companyId"]
isOneToOne: false
- referencedRelation: "purchaseInvoices"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "postingGroupSales_salesDiscountAccount_fkey"
+ columns: ["salesDiscountAccount", "companyId"]
isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "postingGroupSales_salesPrepaymentAccount_fkey"
+ columns: ["salesPrepaymentAccount", "companyId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "postingGroupSales_salesPrepaymentAccount_fkey"
+ columns: ["salesPrepaymentAccount", "companyId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "postingGroupSales_salesTaxPayableAccount_fkey"
+ columns: ["salesTaxPayableAccount", "companyId"]
isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "postingGroupSales_salesTaxPayableAccount_fkey"
+ columns: ["salesTaxPayableAccount", "companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "postingGroupSales_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "postingGroupSales_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrder"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "postingGroupSales_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrderLocations"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "postingGroupSales_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderLineId_fkey"
- columns: ["purchaseOrderLineId"]
+ foreignKeyName: "postingGroupSales_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrderLine"
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ process: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ defaultStandardFactor: Database["public"]["Enums"]["factor"]
+ id: string
+ name: string
+ processType: Database["public"]["Enums"]["processType"]
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ defaultStandardFactor: Database["public"]["Enums"]["factor"]
+ id?: string
+ name: string
+ processType?: Database["public"]["Enums"]["processType"]
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ defaultStandardFactor?: Database["public"]["Enums"]["factor"]
+ id?: string
+ name?: string
+ processType?: Database["public"]["Enums"]["processType"]
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "process_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderLineId_fkey"
- columns: ["purchaseOrderLineId"]
+ foreignKeyName: "process_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrderLines"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseUnitOfMeasureCode_fkey"
- columns: ["purchaseUnitOfMeasureCode", "companyId"]
+ foreignKeyName: "process_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_shelfId_fkey"
- columns: ["shelfId", "locationId"]
+ foreignKeyName: "process_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "process_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "process_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "process_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "process_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "process_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- purchaseInvoicePaymentRelation: {
- Row: {
- id: string
- invoiceId: string
- paymentId: string
- }
- Insert: {
- id?: string
- invoiceId: string
- paymentId: string
- }
- Update: {
- id?: string
- invoiceId?: string
- paymentId?: string
- }
- Relationships: [
- {
- foreignKeyName: "purchasePayments_invoiceId_fkey"
- columns: ["invoiceId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoice"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchasePayments_invoiceId_fkey"
- columns: ["invoiceId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoices"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchasePayments_paymentId_fkey"
- columns: ["paymentId"]
- isOneToOne: false
- referencedRelation: "purchasePayment"
- referencedColumns: ["id"]
- },
- ]
- }
- purchaseInvoicePriceChange: {
- Row: {
- id: string
- invoiceId: string
- invoiceLineId: string
- newPrice: number
- newQuantity: number
- previousPrice: number
- previousQuantity: number
- updatedBy: string
- }
- Insert: {
- id?: string
- invoiceId: string
- invoiceLineId: string
- newPrice?: number
- newQuantity?: number
- previousPrice?: number
- previousQuantity?: number
- updatedBy: string
- }
- Update: {
- id?: string
- invoiceId?: string
- invoiceLineId?: string
- newPrice?: number
- newQuantity?: number
- previousPrice?: number
- previousQuantity?: number
- updatedBy?: string
- }
- Relationships: [
{
- foreignKeyName: "purchaseInvoicePriceChange_invoiceId_fkey"
- columns: ["invoiceId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoice"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoicePriceChange_invoiceId_fkey"
- columns: ["invoiceId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoices"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoicePriceChange_invoiceLineId_fkey"
- columns: ["invoiceLineId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoiceLine"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ foreignKeyName: "process_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ foreignKeyName: "process_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ foreignKeyName: "process_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ foreignKeyName: "process_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ foreignKeyName: "process_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -11247,322 +11167,321 @@ export type Database = {
},
]
}
- purchaseInvoiceStatusHistory: {
- Row: {
- createdAt: string
- id: string
- invoiceId: string
- status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- }
- Insert: {
- createdAt?: string
- id?: string
- invoiceId: string
- status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- }
- Update: {
- createdAt?: string
- id?: string
- invoiceId?: string
- status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- }
- Relationships: [
- {
- foreignKeyName: "purchaseInvoiceStatusHistory_invoiceId_fkey"
- columns: ["invoiceId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoice"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseInvoiceStatusHistory_invoiceId_fkey"
- columns: ["invoiceId"]
- isOneToOne: false
- referencedRelation: "purchaseInvoices"
- referencedColumns: ["id"]
- },
- ]
- }
- purchaseOrder: {
+ purchaseInvoice: {
Row: {
assignee: string | null
- closedAt: string | null
- closedBy: string | null
+ balance: number
companyId: string
createdAt: string
createdBy: string
+ currencyCode: string
customFields: Json | null
+ dateDue: string | null
+ dateIssued: string | null
+ datePaid: string | null
+ exchangeRate: number
id: string
- notes: string | null
- orderDate: string
- purchaseOrderId: string
- revisionId: number
- status: Database["public"]["Enums"]["purchaseOrderStatus"]
- supplierContactId: string | null
- supplierId: string
- supplierLocationId: string | null
+ invoiceId: string
+ invoiceSupplierContactId: string | null
+ invoiceSupplierId: string | null
+ invoiceSupplierLocationId: string | null
+ paymentTermId: string | null
+ postingDate: string | null
+ status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
+ subtotal: number
+ supplierId: string | null
supplierReference: string | null
- type: Database["public"]["Enums"]["purchaseOrderType"]
+ totalAmount: number
+ totalDiscount: number
+ totalTax: number
updatedAt: string | null
updatedBy: string | null
}
Insert: {
assignee?: string | null
- closedAt?: string | null
- closedBy?: string | null
+ balance?: number
companyId: string
createdAt?: string
createdBy: string
+ currencyCode: string
customFields?: Json | null
+ dateDue?: string | null
+ dateIssued?: string | null
+ datePaid?: string | null
+ exchangeRate?: number
id?: string
- notes?: string | null
- orderDate?: string
- purchaseOrderId: string
- revisionId?: number
- status?: Database["public"]["Enums"]["purchaseOrderStatus"]
- supplierContactId?: string | null
- supplierId: string
- supplierLocationId?: string | null
+ invoiceId: string
+ invoiceSupplierContactId?: string | null
+ invoiceSupplierId?: string | null
+ invoiceSupplierLocationId?: string | null
+ paymentTermId?: string | null
+ postingDate?: string | null
+ status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
+ subtotal?: number
+ supplierId?: string | null
supplierReference?: string | null
- type: Database["public"]["Enums"]["purchaseOrderType"]
+ totalAmount?: number
+ totalDiscount?: number
+ totalTax?: number
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
assignee?: string | null
- closedAt?: string | null
- closedBy?: string | null
+ balance?: number
companyId?: string
createdAt?: string
createdBy?: string
+ currencyCode?: string
customFields?: Json | null
+ dateDue?: string | null
+ dateIssued?: string | null
+ datePaid?: string | null
+ exchangeRate?: number
id?: string
- notes?: string | null
- orderDate?: string
- purchaseOrderId?: string
- revisionId?: number
- status?: Database["public"]["Enums"]["purchaseOrderStatus"]
- supplierContactId?: string | null
- supplierId?: string
- supplierLocationId?: string | null
+ invoiceId?: string
+ invoiceSupplierContactId?: string | null
+ invoiceSupplierId?: string | null
+ invoiceSupplierLocationId?: string | null
+ paymentTermId?: string | null
+ postingDate?: string | null
+ status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
+ subtotal?: number
+ supplierId?: string | null
supplierReference?: string | null
- type?: Database["public"]["Enums"]["purchaseOrderType"]
+ totalAmount?: number
+ totalDiscount?: number
+ totalTax?: number
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchaseOrder_assignee_fkey"
+ foreignKeyName: "purchaseInvoice_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_assignee_fkey"
+ foreignKeyName: "purchaseInvoice_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_assignee_fkey"
+ foreignKeyName: "purchaseInvoice_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_assignee_fkey"
+ foreignKeyName: "purchaseInvoice_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_assignee_fkey"
+ foreignKeyName: "purchaseInvoice_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
+ foreignKeyName: "purchaseInvoice_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
+ foreignKeyName: "purchaseInvoice_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
+ foreignKeyName: "purchaseInvoice_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
+ foreignKeyName: "purchaseInvoice_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseInvoice_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoice_invoiceSupplierContactId_fkey"
+ columns: ["invoiceSupplierContactId"]
+ isOneToOne: false
+ referencedRelation: "supplierContact"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
+ isOneToOne: false
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierLocationId_fkey"
+ columns: ["invoiceSupplierLocationId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "supplierLocation"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_supplierContactId_fkey"
- columns: ["supplierContactId"]
+ foreignKeyName: "purchaseInvoice_paymentTermId_fkey"
+ columns: ["paymentTermId"]
isOneToOne: false
- referencedRelation: "supplierContact"
+ referencedRelation: "paymentTerm"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
+ foreignKeyName: "purchaseInvoice_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "contractors"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
+ foreignKeyName: "purchaseInvoice_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "partners"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
+ foreignKeyName: "purchaseInvoice_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
+ foreignKeyName: "purchaseInvoice_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
+ foreignKeyName: "purchaseInvoice_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_supplierLocationId_fkey"
- columns: ["supplierLocationId"]
- isOneToOne: false
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -11570,183 +11489,321 @@ export type Database = {
},
]
}
- purchaseOrderDelivery: {
+ purchaseInvoiceLine: {
Row: {
+ accountNumber: string | null
+ assetId: string | null
companyId: string
- customerId: string | null
- customerLocationId: string | null
+ conversionFactor: number | null
+ createdAt: string
+ createdBy: string
+ currencyCode: string
customFields: Json | null
- deliveryDate: string | null
- dropShipment: boolean
+ description: string | null
+ exchangeRate: number
id: string
+ inventoryUnitOfMeasureCode: string | null
+ invoiceId: string
+ invoiceLineType: Database["public"]["Enums"]["payableLineType"]
+ itemId: string | null
+ itemReadableId: string | null
locationId: string | null
- notes: string | null
- receiptPromisedDate: string | null
- receiptRequestedDate: string | null
- shippingMethodId: string | null
- shippingTermId: string | null
- trackingNumber: string | null
+ purchaseOrderId: string | null
+ purchaseOrderLineId: string | null
+ purchaseUnitOfMeasureCode: string | null
+ quantity: number
+ serviceId: string | null
+ shelfId: string | null
+ totalAmount: number | null
+ unitPrice: number
updatedAt: string | null
updatedBy: string | null
}
Insert: {
+ accountNumber?: string | null
+ assetId?: string | null
companyId: string
- customerId?: string | null
- customerLocationId?: string | null
+ conversionFactor?: number | null
+ createdAt?: string
+ createdBy: string
+ currencyCode: string
customFields?: Json | null
- deliveryDate?: string | null
- dropShipment?: boolean
- id: string
+ description?: string | null
+ exchangeRate?: number
+ id?: string
+ inventoryUnitOfMeasureCode?: string | null
+ invoiceId: string
+ invoiceLineType: Database["public"]["Enums"]["payableLineType"]
+ itemId?: string | null
+ itemReadableId?: string | null
locationId?: string | null
- notes?: string | null
- receiptPromisedDate?: string | null
- receiptRequestedDate?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- trackingNumber?: string | null
+ purchaseOrderId?: string | null
+ purchaseOrderLineId?: string | null
+ purchaseUnitOfMeasureCode?: string | null
+ quantity?: number
+ serviceId?: string | null
+ shelfId?: string | null
+ totalAmount?: number | null
+ unitPrice?: number
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
+ accountNumber?: string | null
+ assetId?: string | null
companyId?: string
- customerId?: string | null
- customerLocationId?: string | null
+ conversionFactor?: number | null
+ createdAt?: string
+ createdBy?: string
+ currencyCode?: string
customFields?: Json | null
- deliveryDate?: string | null
- dropShipment?: boolean
+ description?: string | null
+ exchangeRate?: number
id?: string
+ inventoryUnitOfMeasureCode?: string | null
+ invoiceId?: string
+ invoiceLineType?: Database["public"]["Enums"]["payableLineType"]
+ itemId?: string | null
+ itemReadableId?: string | null
locationId?: string | null
- notes?: string | null
- receiptPromisedDate?: string | null
- receiptRequestedDate?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- trackingNumber?: string | null
+ purchaseOrderId?: string | null
+ purchaseOrderLineId?: string | null
+ purchaseUnitOfMeasureCode?: string | null
+ quantity?: number
+ serviceId?: string | null
+ shelfId?: string | null
+ totalAmount?: number | null
+ unitPrice?: number
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "purchaseInvoiceLines_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
isOneToOne: false
- referencedRelation: "customer"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "purchaseInvoiceLines_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
isOneToOne: false
- referencedRelation: "customers"
- referencedColumns: ["id"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_customerLocationId_fkey"
- columns: ["customerLocationId"]
+ foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "customerLocation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseOrderDelivery_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "purchaseOrder"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "purchaseOrderLocations"
+ foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "purchaseOrders"
+ foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_inventoryUnitOfMeasureCode_fkey"
+ columns: ["inventoryUnitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_invoiceId_fkey"
+ columns: ["invoiceId"]
+ isOneToOne: false
+ referencedRelation: "purchaseInvoice"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_invoiceId_fkey"
+ columns: ["invoiceId"]
+ isOneToOne: false
+ referencedRelation: "purchaseInvoices"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "itemQuantities"
referencedColumns: ["locationId"]
},
{
- foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "purchaseOrders"
referencedColumns: ["locationId"]
},
{
- foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "salesOrders"
referencedColumns: ["locationId"]
},
{
- foreignKeyName: "purchaseOrderDelivery_shippingMethodId_fkey"
- columns: ["shippingMethodId"]
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "shippingMethod"
+ referencedRelation: "purchaseOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_shippingTermId_fkey"
- columns: ["shippingTermId"]
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "shippingTerm"
+ referencedRelation: "purchaseOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderLineId_fkey"
+ columns: ["purchaseOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderLine"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderLineId_fkey"
+ columns: ["purchaseOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_purchaseUnitOfMeasureCode_fkey"
+ columns: ["purchaseUnitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_shelfId_fkey"
+ columns: ["shelfId", "locationId"]
+ isOneToOne: false
+ referencedRelation: "shelf"
+ referencedColumns: ["id", "locationId"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -11754,308 +11811,452 @@ export type Database = {
},
]
}
- purchaseOrderFavorite: {
+ purchaseInvoicePaymentRelation: {
Row: {
- purchaseOrderId: string
- userId: string
+ id: string
+ invoiceId: string
+ paymentId: string
}
Insert: {
- purchaseOrderId: string
- userId: string
+ id?: string
+ invoiceId: string
+ paymentId: string
}
Update: {
- purchaseOrderId?: string
- userId?: string
+ id?: string
+ invoiceId?: string
+ paymentId?: string
}
Relationships: [
{
- foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "purchasePayments_invoiceId_fkey"
+ columns: ["invoiceId"]
isOneToOne: false
- referencedRelation: "purchaseOrder"
+ referencedRelation: "purchaseInvoice"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "purchasePayments_invoiceId_fkey"
+ columns: ["invoiceId"]
isOneToOne: false
- referencedRelation: "purchaseOrderLocations"
+ referencedRelation: "purchaseInvoices"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "purchasePayments_paymentId_fkey"
+ columns: ["paymentId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
+ referencedRelation: "purchasePayment"
referencedColumns: ["id"]
},
+ ]
+ }
+ purchaseInvoicePriceChange: {
+ Row: {
+ id: string
+ invoiceId: string
+ invoiceLineId: string
+ newPrice: number
+ newQuantity: number
+ previousPrice: number
+ previousQuantity: number
+ updatedBy: string
+ }
+ Insert: {
+ id?: string
+ invoiceId: string
+ invoiceLineId: string
+ newPrice?: number
+ newQuantity?: number
+ previousPrice?: number
+ previousQuantity?: number
+ updatedBy: string
+ }
+ Update: {
+ id?: string
+ invoiceId?: string
+ invoiceLineId?: string
+ newPrice?: number
+ newQuantity?: number
+ previousPrice?: number
+ previousQuantity?: number
+ updatedBy?: string
+ }
+ Relationships: [
{
- foreignKeyName: "purchaseOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchaseInvoicePriceChange_invoiceId_fkey"
+ columns: ["invoiceId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "purchaseInvoice"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchaseInvoicePriceChange_invoiceId_fkey"
+ columns: ["invoiceId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "purchaseInvoices"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchaseInvoicePriceChange_invoiceLineId_fkey"
+ columns: ["invoiceLineId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "purchaseInvoiceLine"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "userDefaults"
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- purchaseOrderLine: {
+ purchaseInvoiceStatusHistory: {
Row: {
- accountNumber: string | null
- assetId: string | null
+ createdAt: string
+ id: string
+ invoiceId: string
+ status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
+ }
+ Insert: {
+ createdAt?: string
+ id?: string
+ invoiceId: string
+ status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
+ }
+ Update: {
+ createdAt?: string
+ id?: string
+ invoiceId?: string
+ status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
+ }
+ Relationships: [
+ {
+ foreignKeyName: "purchaseInvoiceStatusHistory_invoiceId_fkey"
+ columns: ["invoiceId"]
+ isOneToOne: false
+ referencedRelation: "purchaseInvoice"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseInvoiceStatusHistory_invoiceId_fkey"
+ columns: ["invoiceId"]
+ isOneToOne: false
+ referencedRelation: "purchaseInvoices"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
+ purchaseOrder: {
+ Row: {
+ assignee: string | null
+ closedAt: string | null
+ closedBy: string | null
companyId: string
- conversionFactor: number | null
createdAt: string
createdBy: string
customFields: Json | null
- description: string | null
id: string
- inventoryUnitOfMeasureCode: string | null
- invoicedComplete: boolean
- itemId: string | null
- itemReadableId: string | null
- locationId: string | null
+ notes: string | null
+ orderDate: string
purchaseOrderId: string
- purchaseOrderLineType: Database["public"]["Enums"]["purchaseOrderLineType"]
- purchaseQuantity: number | null
- purchaseUnitOfMeasureCode: string | null
- quantityInvoiced: number | null
- quantityReceived: number | null
- quantityToInvoice: number | null
- quantityToReceive: number | null
- receivedComplete: boolean
- requiresInspection: boolean
- setupPrice: number | null
- shelfId: string | null
- unitPrice: number | null
+ revisionId: number
+ status: Database["public"]["Enums"]["purchaseOrderStatus"]
+ supplierContactId: string | null
+ supplierId: string
+ supplierLocationId: string | null
+ supplierReference: string | null
+ type: Database["public"]["Enums"]["purchaseOrderType"]
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- accountNumber?: string | null
- assetId?: string | null
+ assignee?: string | null
+ closedAt?: string | null
+ closedBy?: string | null
companyId: string
- conversionFactor?: number | null
createdAt?: string
createdBy: string
customFields?: Json | null
- description?: string | null
id?: string
- inventoryUnitOfMeasureCode?: string | null
- invoicedComplete?: boolean
- itemId?: string | null
- itemReadableId?: string | null
- locationId?: string | null
+ notes?: string | null
+ orderDate?: string
purchaseOrderId: string
- purchaseOrderLineType: Database["public"]["Enums"]["purchaseOrderLineType"]
- purchaseQuantity?: number | null
- purchaseUnitOfMeasureCode?: string | null
- quantityInvoiced?: number | null
- quantityReceived?: number | null
- quantityToInvoice?: number | null
- quantityToReceive?: number | null
- receivedComplete?: boolean
- requiresInspection?: boolean
- setupPrice?: number | null
- shelfId?: string | null
- unitPrice?: number | null
+ revisionId?: number
+ status?: Database["public"]["Enums"]["purchaseOrderStatus"]
+ supplierContactId?: string | null
+ supplierId: string
+ supplierLocationId?: string | null
+ supplierReference?: string | null
+ type: Database["public"]["Enums"]["purchaseOrderType"]
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- accountNumber?: string | null
- assetId?: string | null
+ assignee?: string | null
+ closedAt?: string | null
+ closedBy?: string | null
companyId?: string
- conversionFactor?: number | null
createdAt?: string
createdBy?: string
customFields?: Json | null
- description?: string | null
id?: string
- inventoryUnitOfMeasureCode?: string | null
- invoicedComplete?: boolean
- itemId?: string | null
- itemReadableId?: string | null
- locationId?: string | null
+ notes?: string | null
+ orderDate?: string
purchaseOrderId?: string
- purchaseOrderLineType?: Database["public"]["Enums"]["purchaseOrderLineType"]
- purchaseQuantity?: number | null
- purchaseUnitOfMeasureCode?: string | null
- quantityInvoiced?: number | null
- quantityReceived?: number | null
- quantityToInvoice?: number | null
- quantityToReceive?: number | null
- receivedComplete?: boolean
- requiresInspection?: boolean
- setupPrice?: number | null
- shelfId?: string | null
- unitPrice?: number | null
+ revisionId?: number
+ status?: Database["public"]["Enums"]["purchaseOrderStatus"]
+ supplierContactId?: string | null
+ supplierId?: string
+ supplierLocationId?: string | null
+ supplierReference?: string | null
+ type?: Database["public"]["Enums"]["purchaseOrderType"]
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchaseOrderLine_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "purchaseOrderLine_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "purchaseOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "purchaseOrderLine_inventoryUnitOfMeasureCode_fkey"
- columns: ["inventoryUnitOfMeasureCode", "companyId"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey"
+ columns: ["closedBy"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey"
+ columns: ["closedBy"]
isOneToOne: false
- referencedRelation: "item"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey"
+ columns: ["closedBy"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey"
+ columns: ["closedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrder"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey"
+ columns: ["closedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrderLocations"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
+ foreignKeyName: "purchaseOrder_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_purchaseUnitOfMeasureCode_fkey"
- columns: ["purchaseUnitOfMeasureCode", "companyId"]
+ foreignKeyName: "purchaseOrder_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "company"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_shelfId_fkey"
- columns: ["shelfId", "locationId"]
+ foreignKeyName: "purchaseOrder_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "purchaseOrder_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
+ foreignKeyName: "purchaseOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierContactId_fkey"
+ columns: ["supplierContactId"]
+ isOneToOne: false
+ referencedRelation: "supplierContact"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: false
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: false
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderSuppliers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: false
+ referencedRelation: "supplier"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: false
+ referencedRelation: "suppliers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_supplierLocationId_fkey"
+ columns: ["supplierLocationId"]
+ isOneToOne: false
+ referencedRelation: "supplierLocation"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrder_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
+ foreignKeyName: "purchaseOrder_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
+ foreignKeyName: "purchaseOrder_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
+ foreignKeyName: "purchaseOrder_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -12063,288 +12264,255 @@ export type Database = {
},
]
}
- purchaseOrderPayment: {
+ purchaseOrderDelivery: {
Row: {
companyId: string
- currencyCode: string
+ customerId: string | null
+ customerLocationId: string | null
customFields: Json | null
+ deliveryDate: string | null
+ dropShipment: boolean
id: string
- invoiceSupplierContactId: string | null
- invoiceSupplierId: string | null
- invoiceSupplierLocationId: string | null
- paymentComplete: boolean
- paymentTermId: string | null
+ locationId: string | null
+ notes: string | null
+ receiptPromisedDate: string | null
+ receiptRequestedDate: string | null
+ shippingMethodId: string | null
+ shippingTermId: string | null
+ trackingNumber: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
companyId: string
- currencyCode?: string
+ customerId?: string | null
+ customerLocationId?: string | null
customFields?: Json | null
+ deliveryDate?: string | null
+ dropShipment?: boolean
id: string
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentComplete?: boolean
- paymentTermId?: string | null
+ locationId?: string | null
+ notes?: string | null
+ receiptPromisedDate?: string | null
+ receiptRequestedDate?: string | null
+ shippingMethodId?: string | null
+ shippingTermId?: string | null
+ trackingNumber?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
companyId?: string
- currencyCode?: string
+ customerId?: string | null
+ customerLocationId?: string | null
customFields?: Json | null
+ deliveryDate?: string | null
+ dropShipment?: boolean
id?: string
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentComplete?: boolean
- paymentTermId?: string | null
+ locationId?: string | null
+ notes?: string | null
+ receiptPromisedDate?: string | null
+ receiptRequestedDate?: string | null
+ shippingMethodId?: string | null
+ shippingTermId?: string | null
+ trackingNumber?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchaseOrderPayment_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
+ foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_id_fkey"
+ foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderCustomers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrderDelivery_customerLocationId_fkey"
+ columns: ["customerLocationId"]
+ isOneToOne: false
+ referencedRelation: "customerLocation"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrderDelivery_id_fkey"
columns: ["id"]
isOneToOne: true
referencedRelation: "purchaseOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_id_fkey"
+ foreignKeyName: "purchaseOrderDelivery_id_fkey"
columns: ["id"]
isOneToOne: true
referencedRelation: "purchaseOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_id_fkey"
+ foreignKeyName: "purchaseOrderDelivery_id_fkey"
columns: ["id"]
isOneToOne: true
referencedRelation: "purchaseOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierContactId_fkey"
- columns: ["invoiceSupplierContactId"]
+ foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "supplierContact"
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "purchaseOrderDelivery_shippingMethodId_fkey"
+ columns: ["shippingMethodId"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
+ referencedRelation: "shippingMethod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "purchaseOrderDelivery_shippingTermId_fkey"
+ columns: ["shippingTermId"]
isOneToOne: false
- referencedRelation: "supplier"
+ referencedRelation: "shippingTerm"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "suppliers"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierLocationId_fkey"
- columns: ["invoiceSupplierLocationId"]
+ foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "supplierLocation"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderPayment_paymentTermId_fkey"
- columns: ["paymentTermId"]
+ foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "paymentTerm"
- referencedColumns: ["id"]
- },
- ]
- }
- purchaseOrderStatusHistory: {
- Row: {
- createdAt: string
- createdBy: string
- id: string
- purchaseOrderId: string
- status: Database["public"]["Enums"]["purchaseOrderStatus"]
- }
- Insert: {
- createdAt?: string
- createdBy: string
- id?: string
- purchaseOrderId: string
- status: Database["public"]["Enums"]["purchaseOrderStatus"]
- }
- Update: {
- createdAt?: string
- createdBy?: string
- id?: string
- purchaseOrderId?: string
- status?: Database["public"]["Enums"]["purchaseOrderStatus"]
- }
- Relationships: [
- {
- foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- isOneToOne: false
- referencedRelation: "purchaseOrder"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- isOneToOne: false
- referencedRelation: "purchaseOrderLocations"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["id"]
- },
]
}
- purchaseOrderTransaction: {
+ purchaseOrderFavorite: {
Row: {
- createdAt: string
- id: string
purchaseOrderId: string
- type: Database["public"]["Enums"]["purchaseOrderTransactionType"]
userId: string
}
Insert: {
- createdAt?: string
- id?: string
purchaseOrderId: string
- type: Database["public"]["Enums"]["purchaseOrderTransactionType"]
userId: string
}
Update: {
- createdAt?: string
- id?: string
purchaseOrderId?: string
- type?: Database["public"]["Enums"]["purchaseOrderTransactionType"]
userId?: string
}
Relationships: [
{
- foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
columns: ["purchaseOrderId"]
isOneToOne: false
referencedRelation: "purchaseOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
columns: ["purchaseOrderId"]
isOneToOne: false
referencedRelation: "purchaseOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
columns: ["purchaseOrderId"]
isOneToOne: false
referencedRelation: "purchaseOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ foreignKeyName: "purchaseOrderFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -12352,188 +12520,236 @@ export type Database = {
},
]
}
- purchasePayment: {
+ purchaseOrderLine: {
Row: {
+ accountNumber: string | null
+ assetId: string | null
companyId: string
+ conversionFactor: number | null
createdAt: string
createdBy: string
- currencyCode: string
customFields: Json | null
- exchangeRate: number
+ description: string | null
id: string
- paymentDate: string | null
- paymentId: string
- supplierId: string
- totalAmount: number
+ inventoryUnitOfMeasureCode: string | null
+ invoicedComplete: boolean
+ itemId: string | null
+ itemReadableId: string | null
+ locationId: string | null
+ purchaseOrderId: string
+ purchaseOrderLineType: Database["public"]["Enums"]["purchaseOrderLineType"]
+ purchaseQuantity: number | null
+ purchaseUnitOfMeasureCode: string | null
+ quantityInvoiced: number | null
+ quantityReceived: number | null
+ quantityToInvoice: number | null
+ quantityToReceive: number | null
+ receivedComplete: boolean
+ requiresInspection: boolean
+ setupPrice: number | null
+ shelfId: string | null
+ unitPrice: number | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
+ accountNumber?: string | null
+ assetId?: string | null
companyId: string
+ conversionFactor?: number | null
createdAt?: string
createdBy: string
- currencyCode: string
customFields?: Json | null
- exchangeRate?: number
+ description?: string | null
id?: string
- paymentDate?: string | null
- paymentId: string
- supplierId: string
- totalAmount?: number
+ inventoryUnitOfMeasureCode?: string | null
+ invoicedComplete?: boolean
+ itemId?: string | null
+ itemReadableId?: string | null
+ locationId?: string | null
+ purchaseOrderId: string
+ purchaseOrderLineType: Database["public"]["Enums"]["purchaseOrderLineType"]
+ purchaseQuantity?: number | null
+ purchaseUnitOfMeasureCode?: string | null
+ quantityInvoiced?: number | null
+ quantityReceived?: number | null
+ quantityToInvoice?: number | null
+ quantityToReceive?: number | null
+ receivedComplete?: boolean
+ requiresInspection?: boolean
+ setupPrice?: number | null
+ shelfId?: string | null
+ unitPrice?: number | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
+ accountNumber?: string | null
+ assetId?: string | null
companyId?: string
+ conversionFactor?: number | null
createdAt?: string
createdBy?: string
- currencyCode?: string
customFields?: Json | null
- exchangeRate?: number
+ description?: string | null
id?: string
- paymentDate?: string | null
- paymentId?: string
- supplierId?: string
- totalAmount?: number
+ inventoryUnitOfMeasureCode?: string | null
+ invoicedComplete?: boolean
+ itemId?: string | null
+ itemReadableId?: string | null
+ locationId?: string | null
+ purchaseOrderId?: string
+ purchaseOrderLineType?: Database["public"]["Enums"]["purchaseOrderLineType"]
+ purchaseQuantity?: number | null
+ purchaseUnitOfMeasureCode?: string | null
+ quantityInvoiced?: number | null
+ quantityReceived?: number | null
+ quantityToInvoice?: number | null
+ quantityToReceive?: number | null
+ receivedComplete?: boolean
+ requiresInspection?: boolean
+ setupPrice?: number | null
+ shelfId?: string | null
+ unitPrice?: number | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "purchasePayment_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchasePayment_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "purchasePayment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseOrderLine_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchasePayment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseOrderLine_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "purchasePayment_createdBy_fkey"
+ foreignKeyName: "purchaseOrderLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_createdBy_fkey"
+ foreignKeyName: "purchaseOrderLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_createdBy_fkey"
+ foreignKeyName: "purchaseOrderLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_createdBy_fkey"
+ foreignKeyName: "purchaseOrderLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_createdBy_fkey"
+ foreignKeyName: "purchaseOrderLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "purchasePayment_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
+ foreignKeyName: "purchaseOrderLine_inventoryUnitOfMeasureCode_fkey"
+ columns: ["inventoryUnitOfMeasureCode", "companyId"]
isOneToOne: false
- referencedRelation: "currency"
+ referencedRelation: "unitOfMeasure"
referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "purchaseOrderLine_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "item"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "purchaseOrderLine_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
+ referencedRelation: "purchaseOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "supplier"
+ referencedRelation: "purchaseOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
- isOneToOne: false
- referencedRelation: "suppliers"
+ foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_updatedBy_fkey"
+ foreignKeyName: "purchaseOrderLine_purchaseUnitOfMeasureCode_fkey"
+ columns: ["purchaseUnitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "purchaseOrderLine_shelfId_fkey"
+ columns: ["shelfId", "locationId"]
+ isOneToOne: false
+ referencedRelation: "shelf"
+ referencedColumns: ["id", "locationId"]
+ },
+ {
+ foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_updatedBy_fkey"
+ foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_updatedBy_fkey"
+ foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_updatedBy_fkey"
+ foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "purchasePayment_updatedBy_fkey"
+ foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -12541,664 +12757,819 @@ export type Database = {
},
]
}
- quote: {
+ purchaseOrderPayment: {
Row: {
- assignee: string | null
companyId: string
- createdAt: string
- createdBy: string
- customerContactId: string | null
- customerId: string
- customerLocationId: string | null
- customerReference: string | null
+ currencyCode: string
customFields: Json | null
- dueDate: string | null
- estimatorId: string | null
- expirationDate: string | null
- externalNotes: Json | null
id: string
- internalNotes: Json | null
- locationId: string | null
- quoteId: string
- revisionId: number
- salesPersonId: string | null
- status: Database["public"]["Enums"]["quoteStatus"]
+ invoiceSupplierContactId: string | null
+ invoiceSupplierId: string | null
+ invoiceSupplierLocationId: string | null
+ paymentComplete: boolean
+ paymentTermId: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- assignee?: string | null
companyId: string
- createdAt?: string
- createdBy: string
- customerContactId?: string | null
- customerId: string
- customerLocationId?: string | null
- customerReference?: string | null
+ currencyCode?: string
customFields?: Json | null
- dueDate?: string | null
- estimatorId?: string | null
- expirationDate?: string | null
- externalNotes?: Json | null
- id?: string
- internalNotes?: Json | null
- locationId?: string | null
- quoteId: string
- revisionId?: number
- salesPersonId?: string | null
- status?: Database["public"]["Enums"]["quoteStatus"]
+ id: string
+ invoiceSupplierContactId?: string | null
+ invoiceSupplierId?: string | null
+ invoiceSupplierLocationId?: string | null
+ paymentComplete?: boolean
+ paymentTermId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- assignee?: string | null
companyId?: string
- createdAt?: string
- createdBy?: string
- customerContactId?: string | null
- customerId?: string
- customerLocationId?: string | null
- customerReference?: string | null
+ currencyCode?: string
customFields?: Json | null
- dueDate?: string | null
- estimatorId?: string | null
- expirationDate?: string | null
- externalNotes?: Json | null
id?: string
- internalNotes?: Json | null
- locationId?: string | null
- quoteId?: string
- revisionId?: number
- salesPersonId?: string | null
- status?: Database["public"]["Enums"]["quoteStatus"]
+ invoiceSupplierContactId?: string | null
+ invoiceSupplierId?: string | null
+ invoiceSupplierLocationId?: string | null
+ paymentComplete?: boolean
+ paymentTermId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "quote_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "purchaseOrderPayment_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "purchaseOrderPayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "purchaseOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ foreignKeyName: "purchaseOrderPayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "purchaseOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
+ foreignKeyName: "purchaseOrderPayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "purchaseOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierContactId_fkey"
+ columns: ["invoiceSupplierContactId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "supplierContact"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "quote_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
+ },
+ {
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "suppliers"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierLocationId_fkey"
+ columns: ["invoiceSupplierLocationId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "supplierLocation"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_createdBy_fkey"
+ foreignKeyName: "purchaseOrderPayment_paymentTermId_fkey"
+ columns: ["paymentTermId"]
+ isOneToOne: false
+ referencedRelation: "paymentTerm"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
+ purchaseOrderStatusHistory: {
+ Row: {
+ createdAt: string
+ createdBy: string
+ id: string
+ purchaseOrderId: string
+ status: Database["public"]["Enums"]["purchaseOrderStatus"]
+ }
+ Insert: {
+ createdAt?: string
+ createdBy: string
+ id?: string
+ purchaseOrderId: string
+ status: Database["public"]["Enums"]["purchaseOrderStatus"]
+ }
+ Update: {
+ createdAt?: string
+ createdBy?: string
+ id?: string
+ purchaseOrderId?: string
+ status?: Database["public"]["Enums"]["purchaseOrderStatus"]
+ }
+ Relationships: [
+ {
+ foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_createdBy_fkey"
+ foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_createdBy_fkey"
+ foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_createdBy_fkey"
+ foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_createdBy_fkey"
+ foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quote_customerContactId_fkey"
- columns: ["customerContactId"]
- isOneToOne: false
- referencedRelation: "customerContact"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quote_customerId_fkey"
- columns: ["customerId"]
- isOneToOne: false
- referencedRelation: "customer"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quote_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "customers"
+ referencedRelation: "purchaseOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
+ referencedRelation: "purchaseOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_customerLocationId_fkey"
- columns: ["customerLocationId"]
+ foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
isOneToOne: false
- referencedRelation: "customerLocation"
+ referencedRelation: "purchaseOrders"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "quote_estimatorId_fkey"
- columns: ["estimatorId"]
+ ]
+ }
+ purchaseOrderTransaction: {
+ Row: {
+ createdAt: string
+ id: string
+ purchaseOrderId: string
+ type: Database["public"]["Enums"]["purchaseOrderTransactionType"]
+ userId: string
+ }
+ Insert: {
+ createdAt?: string
+ id?: string
+ purchaseOrderId: string
+ type: Database["public"]["Enums"]["purchaseOrderTransactionType"]
+ userId: string
+ }
+ Update: {
+ createdAt?: string
+ id?: string
+ purchaseOrderId?: string
+ type?: Database["public"]["Enums"]["purchaseOrderTransactionType"]
+ userId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrder"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderLocations"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
+ columns: ["purchaseOrderId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_estimatorId_fkey"
- columns: ["estimatorId"]
+ foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_estimatorId_fkey"
- columns: ["estimatorId"]
+ foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_estimatorId_fkey"
- columns: ["estimatorId"]
+ foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_estimatorId_fkey"
- columns: ["estimatorId"]
+ foreignKeyName: "purchaseOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ purchasePayment: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ currencyCode: string
+ customFields: Json | null
+ exchangeRate: number
+ id: string
+ paymentDate: string | null
+ paymentId: string
+ supplierId: string
+ totalAmount: number
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ currencyCode: string
+ customFields?: Json | null
+ exchangeRate?: number
+ id?: string
+ paymentDate?: string | null
+ paymentId: string
+ supplierId: string
+ totalAmount?: number
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ currencyCode?: string
+ customFields?: Json | null
+ exchangeRate?: number
+ id?: string
+ paymentDate?: string | null
+ paymentId?: string
+ supplierId?: string
+ totalAmount?: number
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "quote_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "purchasePayment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "purchasePayment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "purchasePayment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quote_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "purchasePayment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quote_salesPersonId_fkey"
- columns: ["salesPersonId"]
+ foreignKeyName: "purchasePayment_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_salesPersonId_fkey"
- columns: ["salesPersonId"]
+ foreignKeyName: "purchasePayment_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_salesPersonId_fkey"
- columns: ["salesPersonId"]
+ foreignKeyName: "purchasePayment_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_salesPersonId_fkey"
- columns: ["salesPersonId"]
+ foreignKeyName: "purchasePayment_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_salesPersonId_fkey"
- columns: ["salesPersonId"]
+ foreignKeyName: "purchasePayment_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quote_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "purchasePayment_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "quote_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "purchasePayment_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "quote_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "purchasePayment_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "quote_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "purchasePayment_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quote_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
- quoteFavorite: {
- Row: {
- quoteId: string
- userId: string
- }
- Insert: {
- quoteId: string
- userId: string
- }
- Update: {
- quoteId?: string
- userId?: string
- }
- Relationships: [
- {
- foreignKeyName: "quoteFavorites_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "purchasePayment_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "quote"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteFavorites_quoteId_fkey"
- columns: ["quoteId"]
- isOneToOne: false
- referencedRelation: "quoteCustomerDetails"
- referencedColumns: ["quoteId"]
- },
- {
- foreignKeyName: "quoteFavorites_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "purchasePayment_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "quotes"
+ referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchasePayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchasePayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchasePayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "purchasePayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteFavorites_userId_fkey"
- columns: ["userId"]
- isOneToOne: false
+ foreignKeyName: "purchasePayment_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- quoteLine: {
+ quote: {
Row: {
- additionalCharges: Json | null
+ assignee: string | null
companyId: string
+ createdAt: string
createdBy: string
- customerPartId: string | null
- customerPartRevision: string | null
+ customerContactId: string | null
+ customerId: string
+ customerLocationId: string | null
+ customerReference: string | null
customFields: Json | null
- description: string
+ dueDate: string | null
estimatorId: string | null
+ expirationDate: string | null
+ externalNotes: Json | null
id: string
- itemId: string
- itemReadableId: string | null
- itemType: string
- methodType: Database["public"]["Enums"]["methodType"]
- modelUploadId: string | null
- notes: Json | null
- quantity: number[] | null
+ internalNotes: Json | null
+ locationId: string | null
quoteId: string
- quoteRevisionId: number
- status: Database["public"]["Enums"]["quoteLineStatus"]
- unitOfMeasureCode: string | null
+ revisionId: number
+ salesPersonId: string | null
+ status: Database["public"]["Enums"]["quoteStatus"]
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- additionalCharges?: Json | null
+ assignee?: string | null
companyId: string
+ createdAt?: string
createdBy: string
- customerPartId?: string | null
- customerPartRevision?: string | null
+ customerContactId?: string | null
+ customerId: string
+ customerLocationId?: string | null
+ customerReference?: string | null
customFields?: Json | null
- description: string
+ dueDate?: string | null
estimatorId?: string | null
+ expirationDate?: string | null
+ externalNotes?: Json | null
id?: string
- itemId: string
- itemReadableId?: string | null
- itemType?: string
- methodType?: Database["public"]["Enums"]["methodType"]
- modelUploadId?: string | null
- notes?: Json | null
- quantity?: number[] | null
+ internalNotes?: Json | null
+ locationId?: string | null
quoteId: string
- quoteRevisionId?: number
- status?: Database["public"]["Enums"]["quoteLineStatus"]
- unitOfMeasureCode?: string | null
+ revisionId?: number
+ salesPersonId?: string | null
+ status?: Database["public"]["Enums"]["quoteStatus"]
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- additionalCharges?: Json | null
+ assignee?: string | null
companyId?: string
+ createdAt?: string
createdBy?: string
- customerPartId?: string | null
- customerPartRevision?: string | null
+ customerContactId?: string | null
+ customerId?: string
+ customerLocationId?: string | null
+ customerReference?: string | null
customFields?: Json | null
- description?: string
+ dueDate?: string | null
estimatorId?: string | null
+ expirationDate?: string | null
+ externalNotes?: Json | null
id?: string
- itemId?: string
- itemReadableId?: string | null
- itemType?: string
- methodType?: Database["public"]["Enums"]["methodType"]
- modelUploadId?: string | null
- notes?: Json | null
- quantity?: number[] | null
+ internalNotes?: Json | null
+ locationId?: string | null
quoteId?: string
- quoteRevisionId?: number
- status?: Database["public"]["Enums"]["quoteLineStatus"]
- unitOfMeasureCode?: string | null
+ revisionId?: number
+ salesPersonId?: string | null
+ status?: Database["public"]["Enums"]["quoteStatus"]
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "quoteLine_companyId_fkey"
+ foreignKeyName: "quote_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "quote_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_companyId_fkey"
+ foreignKeyName: "quote_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_companyId_fkey"
+ foreignKeyName: "quote_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quoteLine_companyId_fkey"
+ foreignKeyName: "quote_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quoteLine_createdBy_fkey"
+ foreignKeyName: "quote_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_createdBy_fkey"
+ foreignKeyName: "quote_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_createdBy_fkey"
+ foreignKeyName: "quote_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_createdBy_fkey"
+ foreignKeyName: "quote_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_createdBy_fkey"
+ foreignKeyName: "quote_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quoteLine_estimatorId_fkey"
+ foreignKeyName: "quote_customerContactId_fkey"
+ columns: ["customerContactId"]
+ isOneToOne: false
+ referencedRelation: "customerContact"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderCustomers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_customerLocationId_fkey"
+ columns: ["customerLocationId"]
+ isOneToOne: false
+ referencedRelation: "customerLocation"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quote_estimatorId_fkey"
columns: ["estimatorId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_estimatorId_fkey"
+ foreignKeyName: "quote_estimatorId_fkey"
columns: ["estimatorId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_estimatorId_fkey"
+ foreignKeyName: "quote_estimatorId_fkey"
columns: ["estimatorId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_estimatorId_fkey"
+ foreignKeyName: "quote_estimatorId_fkey"
columns: ["estimatorId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_estimatorId_fkey"
+ foreignKeyName: "quote_estimatorId_fkey"
columns: ["estimatorId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quoteLine_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "quote_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "item"
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "quote_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "quote_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "quoteLine_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "quote_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "quote"
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "quote_salesPersonId_fkey"
+ columns: ["salesPersonId"]
+ isOneToOne: false
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "quote_salesPersonId_fkey"
+ columns: ["salesPersonId"]
isOneToOne: false
- referencedRelation: "quoteCustomerDetails"
- referencedColumns: ["quoteId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_quoteId_fkey"
- columns: ["quoteId"]
+ foreignKeyName: "quote_salesPersonId_fkey"
+ columns: ["salesPersonId"]
isOneToOne: false
- referencedRelation: "quotes"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode", "companyId"]
+ foreignKeyName: "quote_salesPersonId_fkey"
+ columns: ["salesPersonId"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_updatedBy_fkey"
+ foreignKeyName: "quote_salesPersonId_fkey"
+ columns: ["salesPersonId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "quote_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_updatedBy_fkey"
+ foreignKeyName: "quote_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_updatedBy_fkey"
+ foreignKeyName: "quote_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_updatedBy_fkey"
+ foreignKeyName: "quote_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLine_updatedBy_fkey"
+ foreignKeyName: "quote_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -13206,351 +13577,322 @@ export type Database = {
},
]
}
- quoteLinePrice: {
+ quoteFavorite: {
Row: {
- createdAt: string
- createdBy: string
- discountPercent: number
- leadTime: number
- quantity: number
quoteId: string
- quoteLineId: string
- unitPrice: number
- updatedAt: string | null
- updatedBy: string | null
+ userId: string
}
Insert: {
- createdAt?: string
- createdBy: string
- discountPercent?: number
- leadTime?: number
- quantity?: number
quoteId: string
- quoteLineId: string
- unitPrice?: number
- updatedAt?: string | null
- updatedBy?: string | null
+ userId: string
}
Update: {
- createdAt?: string
- createdBy?: string
- discountPercent?: number
- leadTime?: number
- quantity?: number
quoteId?: string
- quoteLineId?: string
- unitPrice?: number
- updatedAt?: string | null
- updatedBy?: string | null
+ userId?: string
}
Relationships: [
{
- foreignKeyName: "quoteLinePrice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteLinePrice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteLinePrice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteLinePrice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteLinePrice_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "quoteLinePrice_quoteId_fkey"
+ foreignKeyName: "quoteFavorites_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLinePrice_quoteId_fkey"
+ foreignKeyName: "quoteFavorites_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quoteCustomerDetails"
referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "quoteLinePrice_quoteId_fkey"
+ foreignKeyName: "quoteFavorites_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLinePrice_quoteLineId_fkey"
- columns: ["quoteLineId"]
- isOneToOne: false
- referencedRelation: "quoteLine"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteLinePrice_quoteLineId_fkey"
- columns: ["quoteLineId"]
- isOneToOne: false
- referencedRelation: "quoteLines"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteLinePrice_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "quoteFavorites_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLinePrice_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "quoteFavorites_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLinePrice_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "quoteFavorites_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLinePrice_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "quoteFavorites_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteLinePrice_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "quoteFavorites_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- quoteMakeMethod: {
+ quoteLine: {
Row: {
+ additionalCharges: Json | null
companyId: string
- createdAt: string
createdBy: string
+ customerPartId: string | null
+ customerPartRevision: string | null
customFields: Json | null
+ description: string
+ estimatorId: string | null
id: string
itemId: string
- parentMaterialId: string | null
- quantityPerParent: number
+ itemReadableId: string | null
+ itemType: string
+ methodType: Database["public"]["Enums"]["methodType"]
+ modelUploadId: string | null
+ notes: Json | null
+ quantity: number[] | null
quoteId: string
- quoteLineId: string
+ quoteRevisionId: number
+ status: Database["public"]["Enums"]["quoteLineStatus"]
+ unitOfMeasureCode: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
+ additionalCharges?: Json | null
companyId: string
- createdAt?: string
createdBy: string
+ customerPartId?: string | null
+ customerPartRevision?: string | null
customFields?: Json | null
+ description: string
+ estimatorId?: string | null
id?: string
itemId: string
- parentMaterialId?: string | null
- quantityPerParent?: number
+ itemReadableId?: string | null
+ itemType?: string
+ methodType?: Database["public"]["Enums"]["methodType"]
+ modelUploadId?: string | null
+ notes?: Json | null
+ quantity?: number[] | null
quoteId: string
- quoteLineId: string
+ quoteRevisionId?: number
+ status?: Database["public"]["Enums"]["quoteLineStatus"]
+ unitOfMeasureCode?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
+ additionalCharges?: Json | null
companyId?: string
- createdAt?: string
createdBy?: string
+ customerPartId?: string | null
+ customerPartRevision?: string | null
customFields?: Json | null
+ description?: string
+ estimatorId?: string | null
id?: string
itemId?: string
- parentMaterialId?: string | null
- quantityPerParent?: number
+ itemReadableId?: string | null
+ itemType?: string
+ methodType?: Database["public"]["Enums"]["methodType"]
+ modelUploadId?: string | null
+ notes?: Json | null
+ quantity?: number[] | null
quoteId?: string
- quoteLineId?: string
+ quoteRevisionId?: number
+ status?: Database["public"]["Enums"]["quoteLineStatus"]
+ unitOfMeasureCode?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "quoteMakeMethod_companyId_fkey"
+ foreignKeyName: "quoteLine_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_companyId_fkey"
+ foreignKeyName: "quoteLine_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_companyId_fkey"
+ foreignKeyName: "quoteLine_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quoteMakeMethod_companyId_fkey"
+ foreignKeyName: "quoteLine_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quoteMakeMethod_createdBy_fkey"
+ foreignKeyName: "quoteLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_createdBy_fkey"
+ foreignKeyName: "quoteLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_createdBy_fkey"
+ foreignKeyName: "quoteLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_createdBy_fkey"
+ foreignKeyName: "quoteLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_createdBy_fkey"
+ foreignKeyName: "quoteLine_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quoteMakeMethod_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "quoteLine_estimatorId_fkey"
+ columns: ["estimatorId"]
isOneToOne: false
- referencedRelation: "item"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "quoteLine_estimatorId_fkey"
+ columns: ["estimatorId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_parentMaterialId_fkey"
- columns: ["parentMaterialId"]
+ foreignKeyName: "quoteLine_estimatorId_fkey"
+ columns: ["estimatorId"]
isOneToOne: false
- referencedRelation: "quoteMaterial"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_parentMaterialId_fkey"
- columns: ["parentMaterialId"]
+ foreignKeyName: "quoteLine_estimatorId_fkey"
+ columns: ["estimatorId"]
isOneToOne: false
- referencedRelation: "quoteMaterialWithMakeMethodId"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_quoteId_fkey"
+ foreignKeyName: "quoteLine_estimatorId_fkey"
+ columns: ["estimatorId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "quoteLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "quoteLine_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_quoteId_fkey"
+ foreignKeyName: "quoteLine_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quoteCustomerDetails"
referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "quoteMakeMethod_quoteId_fkey"
+ foreignKeyName: "quoteLine_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_quoteLineId_fkey"
- columns: ["quoteLineId"]
+ foreignKeyName: "quoteLine_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
isOneToOne: false
- referencedRelation: "quoteLine"
- referencedColumns: ["id"]
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "quoteMakeMethod_quoteLineId_fkey"
- columns: ["quoteLineId"]
+ foreignKeyName: "quoteLine_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "quoteLines"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
+ foreignKeyName: "quoteLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
+ foreignKeyName: "quoteLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
+ foreignKeyName: "quoteLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
+ foreignKeyName: "quoteLine_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -13558,251 +13900,144 @@ export type Database = {
},
]
}
- quoteMaterial: {
+ quoteLinePrice: {
Row: {
- companyId: string
createdAt: string
createdBy: string
- customFields: Json | null
- description: string
- id: string
- itemId: string
- itemReadableId: string
- itemType: string
- methodType: Database["public"]["Enums"]["methodType"]
- order: number
+ discountPercent: number
+ leadTime: number
quantity: number
quoteId: string
quoteLineId: string
- quoteMakeMethodId: string
- quoteOperationId: string | null
- unitCost: number
- unitOfMeasureCode: string | null
+ unitPrice: number
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- companyId: string
createdAt?: string
createdBy: string
- customFields?: Json | null
- description: string
- id?: string
- itemId: string
- itemReadableId: string
- itemType?: string
- methodType?: Database["public"]["Enums"]["methodType"]
- order?: number
+ discountPercent?: number
+ leadTime?: number
quantity?: number
quoteId: string
quoteLineId: string
- quoteMakeMethodId: string
- quoteOperationId?: string | null
- unitCost?: number
- unitOfMeasureCode?: string | null
+ unitPrice?: number
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- companyId?: string
createdAt?: string
createdBy?: string
- customFields?: Json | null
- description?: string
- id?: string
- itemId?: string
- itemReadableId?: string
- itemType?: string
- methodType?: Database["public"]["Enums"]["methodType"]
- order?: number
+ discountPercent?: number
+ leadTime?: number
quantity?: number
quoteId?: string
quoteLineId?: string
- quoteMakeMethodId?: string
- quoteOperationId?: string | null
- unitCost?: number
- unitOfMeasureCode?: string | null
+ unitPrice?: number
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "quoteMaterial_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMaterial_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMaterial_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "quoteMaterial_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "quoteMaterial_createdBy_fkey"
+ foreignKeyName: "quoteLinePrice_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_createdBy_fkey"
+ foreignKeyName: "quoteLinePrice_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_createdBy_fkey"
+ foreignKeyName: "quoteLinePrice_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_createdBy_fkey"
+ foreignKeyName: "quoteLinePrice_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_createdBy_fkey"
+ foreignKeyName: "quoteLinePrice_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quoteMaterial_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMaterial_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
- },
- {
- foreignKeyName: "quoteMaterial_quoteId_fkey"
+ foreignKeyName: "quoteLinePrice_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_quoteId_fkey"
+ foreignKeyName: "quoteLinePrice_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quoteCustomerDetails"
referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "quoteMaterial_quoteId_fkey"
+ foreignKeyName: "quoteLinePrice_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_quoteLineId_fkey"
+ foreignKeyName: "quoteLinePrice_quoteLineId_fkey"
columns: ["quoteLineId"]
isOneToOne: false
referencedRelation: "quoteLine"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_quoteLineId_fkey"
+ foreignKeyName: "quoteLinePrice_quoteLineId_fkey"
columns: ["quoteLineId"]
isOneToOne: false
referencedRelation: "quoteLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_quoteMakeMethodId_fkey"
- columns: ["quoteMakeMethodId"]
- isOneToOne: false
- referencedRelation: "quoteMakeMethod"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMaterial_quoteMakeMethodId_fkey"
- columns: ["quoteMakeMethodId"]
- isOneToOne: false
- referencedRelation: "quoteMaterialWithMakeMethodId"
- referencedColumns: ["quoteMaterialMakeMethodId"]
- },
- {
- foreignKeyName: "quoteMaterial_quoteOperationId_fkey"
- columns: ["quoteOperationId"]
- isOneToOne: false
- referencedRelation: "quoteOperation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMaterial_quoteOperationId_fkey"
- columns: ["quoteOperationId"]
- isOneToOne: false
- referencedRelation: "quoteOperationsWithMakeMethods"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteMaterial_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode", "companyId"]
- isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
- },
- {
- foreignKeyName: "quoteMaterial_updatedBy_fkey"
+ foreignKeyName: "quoteLinePrice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_updatedBy_fkey"
+ foreignKeyName: "quoteLinePrice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_updatedBy_fkey"
+ foreignKeyName: "quoteLinePrice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_updatedBy_fkey"
+ foreignKeyName: "quoteLinePrice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteMaterial_updatedBy_fkey"
+ foreignKeyName: "quoteLinePrice_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -13810,403 +14045,464 @@ export type Database = {
},
]
}
- quoteOperation: {
+ quoteMakeMethod: {
Row: {
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
- description: string | null
id: string
- laborRate: number
- laborTime: number
- laborUnit: Database["public"]["Enums"]["factor"]
- machineRate: number | null
- machineTime: number
- machineUnit: Database["public"]["Enums"]["factor"]
- operationLeadTime: number
- operationMinimumCost: number
- operationOrder: Database["public"]["Enums"]["methodOperationOrder"]
- operationSupplierProcessId: string | null
- operationType: Database["public"]["Enums"]["operationType"]
- operationUnitCost: number
- order: number
- overheadRate: number
- processId: string
+ itemId: string
+ parentMaterialId: string | null
+ quantityPerParent: number
quoteId: string
quoteLineId: string
- quoteMakeMethodId: string | null
- quotingRate: number
- setupTime: number
- setupUnit: Database["public"]["Enums"]["factor"]
updatedAt: string | null
updatedBy: string | null
- workCenterId: string | null
}
Insert: {
companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
- description?: string | null
id?: string
- laborRate?: number
- laborTime?: number
- laborUnit?: Database["public"]["Enums"]["factor"]
- machineRate?: number | null
- machineTime?: number
- machineUnit?: Database["public"]["Enums"]["factor"]
- operationLeadTime?: number
- operationMinimumCost?: number
- operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
- operationSupplierProcessId?: string | null
- operationType?: Database["public"]["Enums"]["operationType"]
- operationUnitCost?: number
- order?: number
- overheadRate?: number
- processId: string
+ itemId: string
+ parentMaterialId?: string | null
+ quantityPerParent?: number
quoteId: string
quoteLineId: string
- quoteMakeMethodId?: string | null
- quotingRate?: number
- setupTime?: number
- setupUnit?: Database["public"]["Enums"]["factor"]
updatedAt?: string | null
updatedBy?: string | null
- workCenterId?: string | null
}
Update: {
companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
- description?: string | null
id?: string
- laborRate?: number
- laborTime?: number
- laborUnit?: Database["public"]["Enums"]["factor"]
- machineRate?: number | null
- machineTime?: number
- machineUnit?: Database["public"]["Enums"]["factor"]
- operationLeadTime?: number
- operationMinimumCost?: number
- operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
- operationSupplierProcessId?: string | null
- operationType?: Database["public"]["Enums"]["operationType"]
- operationUnitCost?: number
- order?: number
- overheadRate?: number
- processId?: string
+ itemId?: string
+ parentMaterialId?: string | null
+ quantityPerParent?: number
quoteId?: string
quoteLineId?: string
- quoteMakeMethodId?: string | null
- quotingRate?: number
- setupTime?: number
- setupUnit?: Database["public"]["Enums"]["factor"]
updatedAt?: string | null
updatedBy?: string | null
- workCenterId?: string | null
}
Relationships: [
{
- foreignKeyName: "quoteOperation_companyId_fkey"
+ foreignKeyName: "quoteMakeMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_companyId_fkey"
+ foreignKeyName: "quoteMakeMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_companyId_fkey"
+ foreignKeyName: "quoteMakeMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quoteOperation_companyId_fkey"
+ foreignKeyName: "quoteMakeMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quoteOperation_createdBy_fkey"
+ foreignKeyName: "quoteMakeMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_createdBy_fkey"
+ foreignKeyName: "quoteMakeMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_createdBy_fkey"
+ foreignKeyName: "quoteMakeMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_createdBy_fkey"
+ foreignKeyName: "quoteMakeMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_createdBy_fkey"
+ foreignKeyName: "quoteMakeMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
- columns: ["operationSupplierProcessId"]
+ foreignKeyName: "quoteMakeMethod_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "supplierProcess"
+ referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
- columns: ["operationSupplierProcessId"]
+ foreignKeyName: "quoteMakeMethod_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "supplierProcesses"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
{
- foreignKeyName: "quoteOperation_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "quoteMakeMethod_parentMaterialId_fkey"
+ columns: ["parentMaterialId"]
isOneToOne: false
- referencedRelation: "process"
+ referencedRelation: "quoteMaterial"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "quoteMakeMethod_parentMaterialId_fkey"
+ columns: ["parentMaterialId"]
isOneToOne: false
- referencedRelation: "processes"
+ referencedRelation: "quoteMaterialWithMakeMethodId"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_quoteId_fkey"
+ foreignKeyName: "quoteMakeMethod_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_quoteId_fkey"
+ foreignKeyName: "quoteMakeMethod_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quoteCustomerDetails"
referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "quoteOperation_quoteId_fkey"
+ foreignKeyName: "quoteMakeMethod_quoteId_fkey"
columns: ["quoteId"]
isOneToOne: false
referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_quoteLineId_fkey"
+ foreignKeyName: "quoteMakeMethod_quoteLineId_fkey"
columns: ["quoteLineId"]
isOneToOne: false
referencedRelation: "quoteLine"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_quoteLineId_fkey"
+ foreignKeyName: "quoteMakeMethod_quoteLineId_fkey"
columns: ["quoteLineId"]
isOneToOne: false
referencedRelation: "quoteLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_quoteMakeMethodId_fkey"
- columns: ["quoteMakeMethodId"]
- isOneToOne: false
- referencedRelation: "quoteMakeMethod"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteOperation_quoteMakeMethodId_fkey"
- columns: ["quoteMakeMethodId"]
- isOneToOne: false
- referencedRelation: "quoteMaterialWithMakeMethodId"
- referencedColumns: ["quoteMaterialMakeMethodId"]
- },
- {
- foreignKeyName: "quoteOperation_updatedBy_fkey"
+ foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_updatedBy_fkey"
+ foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_updatedBy_fkey"
+ foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_updatedBy_fkey"
+ foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperation_updatedBy_fkey"
+ foreignKeyName: "quoteMakeMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "quoteOperation_workCenterId_fkey"
- columns: ["workCenterId"]
- isOneToOne: false
- referencedRelation: "workCenter"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quoteOperation_workCenterId_fkey"
- columns: ["workCenterId"]
- isOneToOne: false
- referencedRelation: "workCenters"
- referencedColumns: ["id"]
- },
]
}
- quoteOperationWorkInstruction: {
+ quoteMaterial: {
Row: {
companyId: string
- content: Json | null
createdAt: string
createdBy: string
- quoteOperationId: string
+ customFields: Json | null
+ description: string
+ id: string
+ itemId: string
+ itemReadableId: string
+ itemType: string
+ methodType: Database["public"]["Enums"]["methodType"]
+ order: number
+ productionQuantity: number | null
+ quantity: number
+ quoteId: string
+ quoteLineId: string
+ quoteMakeMethodId: string
+ quoteOperationId: string | null
+ scrapQuantity: number
+ unitCost: number
+ unitOfMeasureCode: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
companyId: string
- content?: Json | null
createdAt?: string
createdBy: string
- quoteOperationId: string
+ customFields?: Json | null
+ description: string
+ id?: string
+ itemId: string
+ itemReadableId: string
+ itemType?: string
+ methodType?: Database["public"]["Enums"]["methodType"]
+ order?: number
+ productionQuantity?: number | null
+ quantity?: number
+ quoteId: string
+ quoteLineId: string
+ quoteMakeMethodId: string
+ quoteOperationId?: string | null
+ scrapQuantity?: number
+ unitCost?: number
+ unitOfMeasureCode?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
companyId?: string
- content?: Json | null
createdAt?: string
createdBy?: string
- quoteOperationId?: string
+ customFields?: Json | null
+ description?: string
+ id?: string
+ itemId?: string
+ itemReadableId?: string
+ itemType?: string
+ methodType?: Database["public"]["Enums"]["methodType"]
+ order?: number
+ productionQuantity?: number | null
+ quantity?: number
+ quoteId?: string
+ quoteLineId?: string
+ quoteMakeMethodId?: string
+ quoteOperationId?: string | null
+ scrapQuantity?: number
+ unitCost?: number
+ unitOfMeasureCode?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "quoteOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "quoteMaterial_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "quoteMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "quoteMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "quoteMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_createdBy_fkey"
+ foreignKeyName: "quoteMaterial_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_quoteOperationId_fkey"
+ foreignKeyName: "quoteMaterial_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quote"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quoteCustomerDetails"
+ referencedColumns: ["quoteId"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quotes"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteLineId_fkey"
+ columns: ["quoteLineId"]
+ isOneToOne: false
+ referencedRelation: "quoteLine"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteLineId_fkey"
+ columns: ["quoteLineId"]
+ isOneToOne: false
+ referencedRelation: "quoteLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteMakeMethodId_fkey"
+ columns: ["quoteMakeMethodId"]
+ isOneToOne: false
+ referencedRelation: "quoteMakeMethod"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteMakeMethodId_fkey"
+ columns: ["quoteMakeMethodId"]
+ isOneToOne: false
+ referencedRelation: "quoteMaterialWithMakeMethodId"
+ referencedColumns: ["quoteMaterialMakeMethodId"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_quoteOperationId_fkey"
columns: ["quoteOperationId"]
- isOneToOne: true
+ isOneToOne: false
referencedRelation: "quoteOperation"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_quoteOperationId_fkey"
+ foreignKeyName: "quoteMaterial_quoteOperationId_fkey"
columns: ["quoteOperationId"]
- isOneToOne: true
+ isOneToOne: false
referencedRelation: "quoteOperationsWithMakeMethods"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "quoteMaterial_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "quoteMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "quoteMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "quoteMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "quoteMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteOperationWorkInstruction_updatedBy_fkey"
+ foreignKeyName: "quoteMaterial_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -14214,760 +14510,589 @@ export type Database = {
},
]
}
- quotePayment: {
+ quoteOperation: {
Row: {
companyId: string
- currencyCode: string
+ createdAt: string
+ createdBy: string
customFields: Json | null
+ description: string | null
id: string
- invoiceCustomerContactId: string | null
- invoiceCustomerId: string | null
- invoiceCustomerLocationId: string | null
- paymentTermId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- currencyCode?: string
+ laborRate: number
+ laborTime: number
+ laborUnit: Database["public"]["Enums"]["factor"]
+ machineRate: number | null
+ machineTime: number
+ machineUnit: Database["public"]["Enums"]["factor"]
+ operationLeadTime: number
+ operationMinimumCost: number
+ operationOrder: Database["public"]["Enums"]["methodOperationOrder"]
+ operationSupplierProcessId: string | null
+ operationType: Database["public"]["Enums"]["operationType"]
+ operationUnitCost: number
+ order: number
+ overheadRate: number
+ processId: string
+ quoteId: string
+ quoteLineId: string
+ quoteMakeMethodId: string | null
+ quotingRate: number
+ setupTime: number
+ setupUnit: Database["public"]["Enums"]["factor"]
+ updatedAt: string | null
+ updatedBy: string | null
+ workCenterId: string | null
+ workInstruction: Json
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
customFields?: Json | null
- id: string
- invoiceCustomerContactId?: string | null
- invoiceCustomerId?: string | null
- invoiceCustomerLocationId?: string | null
- paymentTermId?: string | null
+ description?: string | null
+ id?: string
+ laborRate?: number
+ laborTime?: number
+ laborUnit?: Database["public"]["Enums"]["factor"]
+ machineRate?: number | null
+ machineTime?: number
+ machineUnit?: Database["public"]["Enums"]["factor"]
+ operationLeadTime?: number
+ operationMinimumCost?: number
+ operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
+ operationSupplierProcessId?: string | null
+ operationType?: Database["public"]["Enums"]["operationType"]
+ operationUnitCost?: number
+ order?: number
+ overheadRate?: number
+ processId: string
+ quoteId: string
+ quoteLineId: string
+ quoteMakeMethodId?: string | null
+ quotingRate?: number
+ setupTime?: number
+ setupUnit?: Database["public"]["Enums"]["factor"]
updatedAt?: string | null
updatedBy?: string | null
+ workCenterId?: string | null
+ workInstruction?: Json
}
Update: {
companyId?: string
- currencyCode?: string
+ createdAt?: string
+ createdBy?: string
customFields?: Json | null
+ description?: string | null
id?: string
- invoiceCustomerContactId?: string | null
- invoiceCustomerId?: string | null
- invoiceCustomerLocationId?: string | null
- paymentTermId?: string | null
+ laborRate?: number
+ laborTime?: number
+ laborUnit?: Database["public"]["Enums"]["factor"]
+ machineRate?: number | null
+ machineTime?: number
+ machineUnit?: Database["public"]["Enums"]["factor"]
+ operationLeadTime?: number
+ operationMinimumCost?: number
+ operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
+ operationSupplierProcessId?: string | null
+ operationType?: Database["public"]["Enums"]["operationType"]
+ operationUnitCost?: number
+ order?: number
+ overheadRate?: number
+ processId?: string
+ quoteId?: string
+ quoteLineId?: string
+ quoteMakeMethodId?: string | null
+ quotingRate?: number
+ setupTime?: number
+ setupUnit?: Database["public"]["Enums"]["factor"]
updatedAt?: string | null
updatedBy?: string | null
+ workCenterId?: string | null
+ workInstruction?: Json
}
Relationships: [
{
- foreignKeyName: "quotePayment_companyId_fkey"
+ foreignKeyName: "quoteOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_companyId_fkey"
+ foreignKeyName: "quoteOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_companyId_fkey"
+ foreignKeyName: "quoteOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quotePayment_companyId_fkey"
+ foreignKeyName: "quoteOperation_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "quotePayment_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
+ foreignKeyName: "quoteOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
- },
- {
- foreignKeyName: "quotePayment_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "quote"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "quotePayment_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "quoteCustomerDetails"
- referencedColumns: ["quoteId"]
- },
- {
- foreignKeyName: "quotePayment_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "quotes"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_invoiceCustomerContactId_fkey"
- columns: ["invoiceCustomerContactId"]
+ foreignKeyName: "quoteOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customerContact"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
+ foreignKeyName: "quoteOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customer"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
+ foreignKeyName: "quoteOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customers"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
+ foreignKeyName: "quoteOperation_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "quotePayment_invoiceCustomerLocationId_fkey"
- columns: ["invoiceCustomerLocationId"]
+ foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
+ columns: ["operationSupplierProcessId"]
isOneToOne: false
- referencedRelation: "customerLocation"
+ referencedRelation: "supplierProcess"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quotePayment_paymentTermId_fkey"
- columns: ["paymentTermId"]
+ foreignKeyName: "quoteOperation_operationSupplierProcessId_fkey"
+ columns: ["operationSupplierProcessId"]
isOneToOne: false
- referencedRelation: "paymentTerm"
+ referencedRelation: "supplierProcesses"
referencedColumns: ["id"]
},
- ]
- }
- quoteShipment: {
- Row: {
- companyId: string
- id: string
- locationId: string | null
- receiptRequestedDate: string | null
- shippingMethodId: string | null
- shippingTermId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- id: string
- locationId?: string | null
- receiptRequestedDate?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- companyId?: string
- id?: string
- locationId?: string | null
- receiptRequestedDate?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
{
- foreignKeyName: "quoteShipment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "quoteOperation_processId_fkey"
+ columns: ["processId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "process"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "quoteOperation_processId_fkey"
+ columns: ["processId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "processes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "quoteShipment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "quoteOperation_quoteId_fkey"
+ columns: ["quoteId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "quoteShipment_id_fkey"
- columns: ["id"]
- isOneToOne: true
referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "quoteOperation_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
referencedRelation: "quoteCustomerDetails"
referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "quoteShipment_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "quoteOperation_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "quoteOperation_quoteLineId_fkey"
+ columns: ["quoteLineId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
+ referencedRelation: "quoteLine"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "quoteOperation_quoteLineId_fkey"
+ columns: ["quoteLineId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "quoteLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "quoteOperation_quoteMakeMethodId_fkey"
+ columns: ["quoteMakeMethodId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "quoteShipment_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "quoteShipment_shippingMethodId_fkey"
- columns: ["shippingMethodId"]
- isOneToOne: false
- referencedRelation: "shippingMethod"
+ referencedRelation: "quoteMakeMethod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_shippingTermId_fkey"
- columns: ["shippingTermId"]
+ foreignKeyName: "quoteOperation_quoteMakeMethodId_fkey"
+ columns: ["quoteMakeMethodId"]
isOneToOne: false
- referencedRelation: "shippingTerm"
- referencedColumns: ["id"]
+ referencedRelation: "quoteMaterialWithMakeMethodId"
+ referencedColumns: ["quoteMaterialMakeMethodId"]
},
{
- foreignKeyName: "quoteShipment_updatedBy_fkey"
+ foreignKeyName: "quoteOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_updatedBy_fkey"
+ foreignKeyName: "quoteOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_updatedBy_fkey"
+ foreignKeyName: "quoteOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_updatedBy_fkey"
+ foreignKeyName: "quoteOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "quoteShipment_updatedBy_fkey"
+ foreignKeyName: "quoteOperation_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "quoteOperation_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenter"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "quoteOperation_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenters"
+ referencedColumns: ["id"]
+ },
]
}
- receipt: {
+ quotePayment: {
Row: {
- assignee: string | null
companyId: string
- createdAt: string
- createdBy: string
+ currencyCode: string
customFields: Json | null
- externalDocumentId: string | null
id: string
- invoiced: boolean | null
- locationId: string | null
- postingDate: string | null
- receiptId: string
- sourceDocument:
- | Database["public"]["Enums"]["receiptSourceDocument"]
- | null
- sourceDocumentId: string | null
- sourceDocumentReadableId: string | null
- status: Database["public"]["Enums"]["receiptStatus"]
- supplierId: string | null
+ invoiceCustomerContactId: string | null
+ invoiceCustomerId: string | null
+ invoiceCustomerLocationId: string | null
+ paymentTermId: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- assignee?: string | null
companyId: string
- createdAt?: string
- createdBy: string
+ currencyCode?: string
customFields?: Json | null
- externalDocumentId?: string | null
- id?: string
- invoiced?: boolean | null
- locationId?: string | null
- postingDate?: string | null
- receiptId: string
- sourceDocument?:
- | Database["public"]["Enums"]["receiptSourceDocument"]
- | null
- sourceDocumentId?: string | null
- sourceDocumentReadableId?: string | null
- status?: Database["public"]["Enums"]["receiptStatus"]
- supplierId?: string | null
+ id: string
+ invoiceCustomerContactId?: string | null
+ invoiceCustomerId?: string | null
+ invoiceCustomerLocationId?: string | null
+ paymentTermId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- assignee?: string | null
companyId?: string
- createdAt?: string
- createdBy?: string
+ currencyCode?: string
customFields?: Json | null
- externalDocumentId?: string | null
id?: string
- invoiced?: boolean | null
- locationId?: string | null
- postingDate?: string | null
- receiptId?: string
- sourceDocument?:
- | Database["public"]["Enums"]["receiptSourceDocument"]
- | null
- sourceDocumentId?: string | null
- sourceDocumentReadableId?: string | null
- status?: Database["public"]["Enums"]["receiptStatus"]
- supplierId?: string | null
+ invoiceCustomerContactId?: string | null
+ invoiceCustomerId?: string | null
+ invoiceCustomerLocationId?: string | null
+ paymentTermId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "receipt_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_assignee_fkey"
- columns: ["assignee"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "receipt_companyId_fkey"
+ foreignKeyName: "quotePayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_companyId_fkey"
+ foreignKeyName: "quotePayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_companyId_fkey"
+ foreignKeyName: "quotePayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "receipt_companyId_fkey"
+ foreignKeyName: "quotePayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "receipt_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "quotePayment_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "receipt_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ foreignKeyName: "quotePayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ foreignKeyName: "quotePayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "quoteCustomerDetails"
+ referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "receipt_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
+ foreignKeyName: "quotePayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "receipt_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "receipt_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "quotePayment_invoiceCustomerContactId_fkey"
+ columns: ["invoiceCustomerContactId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "customerContact"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "receipt_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "quotePayment_invoiceCustomerId_fkey"
+ columns: ["invoiceCustomerId"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "quotePayment_invoiceCustomerId_fkey"
+ columns: ["invoiceCustomerId"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "quotePayment_invoiceCustomerId_fkey"
+ columns: ["invoiceCustomerId"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
+ referencedRelation: "salesOrderCustomers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "quotePayment_invoiceCustomerLocationId_fkey"
+ columns: ["invoiceCustomerLocationId"]
isOneToOne: false
- referencedRelation: "supplier"
+ referencedRelation: "customerLocation"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "quotePayment_paymentTermId_fkey"
+ columns: ["paymentTermId"]
isOneToOne: false
- referencedRelation: "suppliers"
+ referencedRelation: "paymentTerm"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "receipt_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receipt_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
]
}
- receiptLine: {
+ quoteShipment: {
Row: {
companyId: string
- conversionFactor: number | null
- createdAt: string
- createdBy: string
id: string
- itemId: string
- itemReadableId: string | null
- lineId: string | null
locationId: string | null
- orderQuantity: number
- outstandingQuantity: number
- receiptId: string
- receivedQuantity: number
- shelfId: string | null
- unitOfMeasure: string
- unitPrice: number
+ receiptRequestedDate: string | null
+ shippingMethodId: string | null
+ shippingTermId: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
companyId: string
- conversionFactor?: number | null
- createdAt?: string
- createdBy: string
- id?: string
- itemId: string
- itemReadableId?: string | null
- lineId?: string | null
+ id: string
locationId?: string | null
- orderQuantity: number
- outstandingQuantity?: number
- receiptId: string
- receivedQuantity?: number
- shelfId?: string | null
- unitOfMeasure: string
- unitPrice: number
+ receiptRequestedDate?: string | null
+ shippingMethodId?: string | null
+ shippingTermId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
companyId?: string
- conversionFactor?: number | null
- createdAt?: string
- createdBy?: string
id?: string
- itemId?: string
- itemReadableId?: string | null
- lineId?: string | null
locationId?: string | null
- orderQuantity?: number
- outstandingQuantity?: number
- receiptId?: string
- receivedQuantity?: number
- shelfId?: string | null
- unitOfMeasure?: string
- unitPrice?: number
+ receiptRequestedDate?: string | null
+ shippingMethodId?: string | null
+ shippingTermId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "receiptLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "quoteShipment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "quoteShipment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "quoteShipment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "receiptLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "quoteShipment_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "receiptLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "quoteShipment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "quote"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
+ foreignKeyName: "quoteShipment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "quoteCustomerDetails"
+ referencedColumns: ["quoteId"]
},
{
- foreignKeyName: "receiptLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ foreignKeyName: "quoteShipment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "quotes"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_locationId_fkey"
+ foreignKeyName: "quoteShipment_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "itemQuantities"
referencedColumns: ["locationId"]
},
{
- foreignKeyName: "receiptLine_locationId_fkey"
+ foreignKeyName: "quoteShipment_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_locationId_fkey"
+ foreignKeyName: "quoteShipment_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "purchaseOrders"
referencedColumns: ["locationId"]
},
{
- foreignKeyName: "receiptLine_locationId_fkey"
+ foreignKeyName: "quoteShipment_locationId_fkey"
columns: ["locationId"]
isOneToOne: false
referencedRelation: "salesOrders"
referencedColumns: ["locationId"]
},
{
- foreignKeyName: "receiptLine_receiptId_fkey"
- columns: ["receiptId"]
+ foreignKeyName: "quoteShipment_shippingMethodId_fkey"
+ columns: ["shippingMethodId"]
isOneToOne: false
- referencedRelation: "receipt"
+ referencedRelation: "shippingMethod"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_receiptId_fkey"
- columns: ["receiptId"]
+ foreignKeyName: "quoteShipment_shippingTermId_fkey"
+ columns: ["shippingTermId"]
isOneToOne: false
- referencedRelation: "receipts"
+ referencedRelation: "shippingTerm"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_shelfId_fkey"
- columns: ["shelfId", "locationId"]
- isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
- },
- {
- foreignKeyName: "receiptLine_updatedBy_fkey"
+ foreignKeyName: "quoteShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_updatedBy_fkey"
+ foreignKeyName: "quoteShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_updatedBy_fkey"
+ foreignKeyName: "quoteShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_updatedBy_fkey"
+ foreignKeyName: "quoteShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "receiptLine_updatedBy_fkey"
+ foreignKeyName: "quoteShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -14975,310 +15100,265 @@ export type Database = {
},
]
}
- salesOrder: {
+ receipt: {
Row: {
assignee: string | null
- closedAt: string | null
- closedBy: string | null
companyId: string
createdAt: string
createdBy: string
- currencyCode: string
- customerContactId: string | null
- customerId: string
- customerLocationId: string | null
- customerReference: string | null
customFields: Json | null
+ externalDocumentId: string | null
id: string
+ invoiced: boolean | null
locationId: string | null
- notes: string | null
- orderDate: string
- revisionId: number
- salesOrderId: string
- status: Database["public"]["Enums"]["salesOrderStatus"]
+ postingDate: string | null
+ receiptId: string
+ sourceDocument:
+ | Database["public"]["Enums"]["receiptSourceDocument"]
+ | null
+ sourceDocumentId: string | null
+ sourceDocumentReadableId: string | null
+ status: Database["public"]["Enums"]["receiptStatus"]
+ supplierId: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
assignee?: string | null
- closedAt?: string | null
- closedBy?: string | null
companyId: string
createdAt?: string
createdBy: string
- currencyCode?: string
- customerContactId?: string | null
- customerId: string
- customerLocationId?: string | null
- customerReference?: string | null
customFields?: Json | null
+ externalDocumentId?: string | null
id?: string
+ invoiced?: boolean | null
locationId?: string | null
- notes?: string | null
- orderDate?: string
- revisionId?: number
- salesOrderId: string
- status?: Database["public"]["Enums"]["salesOrderStatus"]
+ postingDate?: string | null
+ receiptId: string
+ sourceDocument?:
+ | Database["public"]["Enums"]["receiptSourceDocument"]
+ | null
+ sourceDocumentId?: string | null
+ sourceDocumentReadableId?: string | null
+ status?: Database["public"]["Enums"]["receiptStatus"]
+ supplierId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
assignee?: string | null
- closedAt?: string | null
- closedBy?: string | null
companyId?: string
createdAt?: string
createdBy?: string
- currencyCode?: string
- customerContactId?: string | null
- customerId?: string
- customerLocationId?: string | null
- customerReference?: string | null
customFields?: Json | null
+ externalDocumentId?: string | null
id?: string
+ invoiced?: boolean | null
locationId?: string | null
- notes?: string | null
- orderDate?: string
- revisionId?: number
- salesOrderId?: string
- status?: Database["public"]["Enums"]["salesOrderStatus"]
+ postingDate?: string | null
+ receiptId?: string
+ sourceDocument?:
+ | Database["public"]["Enums"]["receiptSourceDocument"]
+ | null
+ sourceDocumentId?: string | null
+ sourceDocumentReadableId?: string | null
+ status?: Database["public"]["Enums"]["receiptStatus"]
+ supplierId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "salesOrder_assignee_fkey"
+ foreignKeyName: "receipt_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_assignee_fkey"
+ foreignKeyName: "receipt_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_assignee_fkey"
+ foreignKeyName: "receipt_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_assignee_fkey"
+ foreignKeyName: "receipt_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_assignee_fkey"
+ foreignKeyName: "receipt_assignee_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesOrder_closedBy_fkey"
- columns: ["closedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrder_closedBy_fkey"
- columns: ["closedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrder_closedBy_fkey"
- columns: ["closedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrder_closedBy_fkey"
- columns: ["closedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrder_closedBy_fkey"
- columns: ["closedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "salesOrder_companyId_fkey"
+ foreignKeyName: "receipt_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_companyId_fkey"
+ foreignKeyName: "receipt_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_companyId_fkey"
+ foreignKeyName: "receipt_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesOrder_companyId_fkey"
+ foreignKeyName: "receipt_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesOrder_createdBy_fkey"
+ foreignKeyName: "receipt_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_createdBy_fkey"
+ foreignKeyName: "receipt_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_createdBy_fkey"
+ foreignKeyName: "receipt_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_createdBy_fkey"
+ foreignKeyName: "receipt_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_createdBy_fkey"
+ foreignKeyName: "receipt_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesOrder_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
- isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
- },
- {
- foreignKeyName: "salesOrder_customerContactId_fkey"
- columns: ["customerContactId"]
+ foreignKeyName: "receipt_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "customerContact"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesOrder_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "receipt_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "customer"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "receipt_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "customers"
- referencedColumns: ["id"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesOrder_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "receipt_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
- referencedColumns: ["id"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesOrder_customerLocationId_fkey"
- columns: ["customerLocationId"]
+ foreignKeyName: "receipt_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "customerLocation"
- referencedColumns: ["id"]
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "salesOrder_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "receipt_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "salesOrder_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "receipt_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "receipt_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "supplier"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "receipt_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "suppliers"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_updatedBy_fkey"
+ foreignKeyName: "receipt_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_updatedBy_fkey"
+ foreignKeyName: "receipt_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_updatedBy_fkey"
+ foreignKeyName: "receipt_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_updatedBy_fkey"
+ foreignKeyName: "receipt_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrder_updatedBy_fkey"
+ foreignKeyName: "receipt_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -15286,310 +15366,1215 @@ export type Database = {
},
]
}
- salesOrderFavorite: {
+ receiptLine: {
Row: {
- salesOrderId: string
- userId: string
+ companyId: string
+ conversionFactor: number | null
+ createdAt: string
+ createdBy: string
+ id: string
+ itemId: string
+ itemReadableId: string | null
+ lineId: string | null
+ locationId: string | null
+ orderQuantity: number
+ outstandingQuantity: number
+ receiptId: string
+ receivedQuantity: number
+ shelfId: string | null
+ unitOfMeasure: string
+ unitPrice: number
+ updatedAt: string | null
+ updatedBy: string | null
}
Insert: {
- salesOrderId: string
- userId: string
+ companyId: string
+ conversionFactor?: number | null
+ createdAt?: string
+ createdBy: string
+ id?: string
+ itemId: string
+ itemReadableId?: string | null
+ lineId?: string | null
+ locationId?: string | null
+ orderQuantity: number
+ outstandingQuantity?: number
+ receiptId: string
+ receivedQuantity?: number
+ shelfId?: string | null
+ unitOfMeasure: string
+ unitPrice: number
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Update: {
- salesOrderId?: string
- userId?: string
+ companyId?: string
+ conversionFactor?: number | null
+ createdAt?: string
+ createdBy?: string
+ id?: string
+ itemId?: string
+ itemReadableId?: string | null
+ lineId?: string | null
+ locationId?: string | null
+ orderQuantity?: number
+ outstandingQuantity?: number
+ receiptId?: string
+ receivedQuantity?: number
+ shelfId?: string | null
+ unitOfMeasure?: string
+ unitPrice?: number
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "salesOrderFavorites_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "receiptLine_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "salesOrder"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderFavorites_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "receiptLine_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "salesOrderLocations"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderFavorites_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "receiptLine_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "salesOrders"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "receiptLine_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "receiptLine_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "receiptLine_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "receiptLine_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
{
- foreignKeyName: "salesOrderFavorites_userId_fkey"
- columns: ["userId"]
- isOneToOne: false
+ foreignKeyName: "receiptLine_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "receiptLine_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "receiptLine_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "receiptLine_receiptId_fkey"
+ columns: ["receiptId"]
+ isOneToOne: false
+ referencedRelation: "receipt"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_receiptId_fkey"
+ columns: ["receiptId"]
+ isOneToOne: false
+ referencedRelation: "receipts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_shelfId_fkey"
+ columns: ["shelfId", "locationId"]
+ isOneToOne: false
+ referencedRelation: "shelf"
+ referencedColumns: ["id", "locationId"]
+ },
+ {
+ foreignKeyName: "receiptLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- salesOrderLine: {
+ salesOrder: {
Row: {
- accountNumber: string | null
- addOnCost: number
- assetId: string | null
+ assignee: string | null
+ closedAt: string | null
+ closedBy: string | null
companyId: string
createdAt: string
createdBy: string
+ currencyCode: string
+ customerContactId: string | null
+ customerId: string
+ customerLocationId: string | null
+ customerReference: string | null
customFields: Json | null
- description: string | null
id: string
- invoicedComplete: boolean
- itemId: string | null
- itemReadableId: string | null
locationId: string | null
- methodType: Database["public"]["Enums"]["methodType"]
- modelUploadId: string | null
- promisedDate: string | null
- quantityInvoiced: number | null
- quantitySent: number | null
- quantityToInvoice: number | null
- quantityToSend: number | null
- requiresInspection: boolean
- saleQuantity: number | null
+ notes: string | null
+ orderDate: string
+ revisionId: number
salesOrderId: string
- salesOrderLineType: Database["public"]["Enums"]["salesOrderLineType"]
- sentComplete: boolean
- setupPrice: number | null
- shelfId: string | null
- status: Database["public"]["Enums"]["salesOrderLineStatus"]
- unitOfMeasureCode: string | null
- unitPrice: number | null
+ status: Database["public"]["Enums"]["salesOrderStatus"]
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- accountNumber?: string | null
- addOnCost?: number
- assetId?: string | null
+ assignee?: string | null
+ closedAt?: string | null
+ closedBy?: string | null
companyId: string
createdAt?: string
createdBy: string
+ currencyCode?: string
+ customerContactId?: string | null
+ customerId: string
+ customerLocationId?: string | null
+ customerReference?: string | null
customFields?: Json | null
- description?: string | null
id?: string
- invoicedComplete?: boolean
- itemId?: string | null
- itemReadableId?: string | null
locationId?: string | null
- methodType?: Database["public"]["Enums"]["methodType"]
- modelUploadId?: string | null
- promisedDate?: string | null
- quantityInvoiced?: number | null
- quantitySent?: number | null
- quantityToInvoice?: number | null
- quantityToSend?: number | null
- requiresInspection?: boolean
- saleQuantity?: number | null
+ notes?: string | null
+ orderDate?: string
+ revisionId?: number
salesOrderId: string
- salesOrderLineType: Database["public"]["Enums"]["salesOrderLineType"]
- sentComplete?: boolean
- setupPrice?: number | null
- shelfId?: string | null
- status?: Database["public"]["Enums"]["salesOrderLineStatus"]
- unitOfMeasureCode?: string | null
- unitPrice?: number | null
+ status?: Database["public"]["Enums"]["salesOrderStatus"]
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- accountNumber?: string | null
- addOnCost?: number
- assetId?: string | null
+ assignee?: string | null
+ closedAt?: string | null
+ closedBy?: string | null
companyId?: string
createdAt?: string
createdBy?: string
+ currencyCode?: string
+ customerContactId?: string | null
+ customerId?: string
+ customerLocationId?: string | null
+ customerReference?: string | null
customFields?: Json | null
- description?: string | null
id?: string
- invoicedComplete?: boolean
- itemId?: string | null
- itemReadableId?: string | null
locationId?: string | null
- methodType?: Database["public"]["Enums"]["methodType"]
- modelUploadId?: string | null
- promisedDate?: string | null
- quantityInvoiced?: number | null
- quantitySent?: number | null
- quantityToInvoice?: number | null
- quantityToSend?: number | null
- requiresInspection?: boolean
- saleQuantity?: number | null
+ notes?: string | null
+ orderDate?: string
+ revisionId?: number
salesOrderId?: string
- salesOrderLineType?: Database["public"]["Enums"]["salesOrderLineType"]
- sentComplete?: boolean
- setupPrice?: number | null
- shelfId?: string | null
- status?: Database["public"]["Enums"]["salesOrderLineStatus"]
- unitOfMeasureCode?: string | null
- unitPrice?: number | null
+ status?: Database["public"]["Enums"]["salesOrderStatus"]
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "salesOrderLine_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
+ foreignKeyName: "salesOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_accountNumber_fkey"
- columns: ["accountNumber", "companyId"]
+ foreignKeyName: "salesOrder_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesOrder_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "salesOrder_closedBy_fkey"
+ columns: ["closedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesOrder_closedBy_fkey"
+ columns: ["closedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_closedBy_fkey"
+ columns: ["closedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_closedBy_fkey"
+ columns: ["closedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_closedBy_fkey"
+ columns: ["closedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "salesOrder_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesOrder_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "salesOrder_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "salesOrder_customerContactId_fkey"
+ columns: ["customerContactId"]
+ isOneToOne: false
+ referencedRelation: "customerContact"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderCustomers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_customerLocationId_fkey"
+ columns: ["customerLocationId"]
+ isOneToOne: false
+ referencedRelation: "customerLocation"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "salesOrder_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "salesOrder_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "salesOrder_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrder_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ salesOrderFavorite: {
+ Row: {
+ salesOrderId: string
+ userId: string
+ }
+ Insert: {
+ salesOrderId: string
+ userId: string
+ }
+ Update: {
+ salesOrderId?: string
+ userId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "salesOrderFavorites_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrder"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderLocations"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderFavorites_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ salesOrderLine: {
+ Row: {
+ accountNumber: string | null
+ addOnCost: number
+ assetId: string | null
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ description: string | null
+ id: string
+ invoicedComplete: boolean
+ itemId: string | null
+ itemReadableId: string | null
+ locationId: string | null
+ methodType: Database["public"]["Enums"]["methodType"]
+ modelUploadId: string | null
+ promisedDate: string | null
+ quantityInvoiced: number | null
+ quantitySent: number | null
+ quantityToInvoice: number | null
+ quantityToSend: number | null
+ requiresInspection: boolean
+ saleQuantity: number | null
+ salesOrderId: string
+ salesOrderLineType: Database["public"]["Enums"]["salesOrderLineType"]
+ sentComplete: boolean
+ setupPrice: number | null
+ shelfId: string | null
+ status: Database["public"]["Enums"]["salesOrderLineStatus"]
+ unitOfMeasureCode: string | null
+ unitPrice: number | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ accountNumber?: string | null
+ addOnCost?: number
+ assetId?: string | null
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ description?: string | null
+ id?: string
+ invoicedComplete?: boolean
+ itemId?: string | null
+ itemReadableId?: string | null
+ locationId?: string | null
+ methodType?: Database["public"]["Enums"]["methodType"]
+ modelUploadId?: string | null
+ promisedDate?: string | null
+ quantityInvoiced?: number | null
+ quantitySent?: number | null
+ quantityToInvoice?: number | null
+ quantityToSend?: number | null
+ requiresInspection?: boolean
+ saleQuantity?: number | null
+ salesOrderId: string
+ salesOrderLineType: Database["public"]["Enums"]["salesOrderLineType"]
+ sentComplete?: boolean
+ setupPrice?: number | null
+ shelfId?: string | null
+ status?: Database["public"]["Enums"]["salesOrderLineStatus"]
+ unitOfMeasureCode?: string | null
+ unitPrice?: number | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ accountNumber?: string | null
+ addOnCost?: number
+ assetId?: string | null
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ description?: string | null
+ id?: string
+ invoicedComplete?: boolean
+ itemId?: string | null
+ itemReadableId?: string | null
+ locationId?: string | null
+ methodType?: Database["public"]["Enums"]["methodType"]
+ modelUploadId?: string | null
+ promisedDate?: string | null
+ quantityInvoiced?: number | null
+ quantitySent?: number | null
+ quantityToInvoice?: number | null
+ quantityToSend?: number | null
+ requiresInspection?: boolean
+ saleQuantity?: number | null
+ salesOrderId?: string
+ salesOrderLineType?: Database["public"]["Enums"]["salesOrderLineType"]
+ sentComplete?: boolean
+ setupPrice?: number | null
+ shelfId?: string | null
+ status?: Database["public"]["Enums"]["salesOrderLineStatus"]
+ unitOfMeasureCode?: string | null
+ unitPrice?: number | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "salesOrderLine_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_accountNumber_fkey"
+ columns: ["accountNumber", "companyId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrder"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderLocations"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_shelfId_fkey"
+ columns: ["shelfId", "locationId"]
+ isOneToOne: false
+ referencedRelation: "shelf"
+ referencedColumns: ["id", "locationId"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ salesOrderPayment: {
+ Row: {
+ companyId: string
+ currencyCode: string
+ customFields: Json | null
+ id: string
+ invoiceCustomerContactId: string | null
+ invoiceCustomerId: string | null
+ invoiceCustomerLocationId: string | null
+ paymentComplete: boolean
+ paymentTermId: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ currencyCode?: string
+ customFields?: Json | null
+ id: string
+ invoiceCustomerContactId?: string | null
+ invoiceCustomerId?: string | null
+ invoiceCustomerLocationId?: string | null
+ paymentComplete?: boolean
+ paymentTermId?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ currencyCode?: string
+ customFields?: Json | null
+ id?: string
+ invoiceCustomerContactId?: string | null
+ invoiceCustomerId?: string | null
+ invoiceCustomerLocationId?: string | null
+ paymentComplete?: boolean
+ paymentTermId?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "salesOrderPayment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "salesOrder"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "salesOrderLocations"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "salesOrders"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_invoiceCustomerContactId_fkey"
+ columns: ["invoiceCustomerContactId"]
+ isOneToOne: false
+ referencedRelation: "customerContact"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_invoiceCustomerId_fkey"
+ columns: ["invoiceCustomerId"]
+ isOneToOne: false
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_invoiceCustomerId_fkey"
+ columns: ["invoiceCustomerId"]
+ isOneToOne: false
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_invoiceCustomerId_fkey"
+ columns: ["invoiceCustomerId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderCustomers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_invoiceCustomerLocationId_fkey"
+ columns: ["invoiceCustomerLocationId"]
+ isOneToOne: false
+ referencedRelation: "customerLocation"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderPayment_paymentTermId_fkey"
+ columns: ["paymentTermId"]
+ isOneToOne: false
+ referencedRelation: "paymentTerm"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
+ salesOrderShipment: {
+ Row: {
+ assignee: string | null
+ companyId: string
+ customerId: string | null
+ customerLocationId: string | null
+ customFields: Json | null
+ deliveryDate: string | null
+ dropShipment: boolean
+ id: string
+ locationId: string | null
+ notes: string | null
+ receiptPromisedDate: string | null
+ receiptRequestedDate: string | null
+ shippingMethodId: string | null
+ shippingTermId: string | null
+ supplierId: string | null
+ supplierLocationId: string | null
+ trackingNumber: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ assignee?: string | null
+ companyId: string
+ customerId?: string | null
+ customerLocationId?: string | null
+ customFields?: Json | null
+ deliveryDate?: string | null
+ dropShipment?: boolean
+ id: string
+ locationId?: string | null
+ notes?: string | null
+ receiptPromisedDate?: string | null
+ receiptRequestedDate?: string | null
+ shippingMethodId?: string | null
+ shippingTermId?: string | null
+ supplierId?: string | null
+ supplierLocationId?: string | null
+ trackingNumber?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ assignee?: string | null
+ companyId?: string
+ customerId?: string | null
+ customerLocationId?: string | null
+ customFields?: Json | null
+ deliveryDate?: string | null
+ dropShipment?: boolean
+ id?: string
+ locationId?: string | null
+ notes?: string | null
+ receiptPromisedDate?: string | null
+ receiptRequestedDate?: string | null
+ shippingMethodId?: string | null
+ shippingTermId?: string | null
+ supplierId?: string | null
+ supplierLocationId?: string | null
+ trackingNumber?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "salesOrderShipment_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesOrderShipment_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "salesOrderCustomers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesOrderShipment_customerLocationId_fkey"
+ columns: ["customerLocationId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "customerLocation"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
+ foreignKeyName: "salesOrderShipment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "salesOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "salesOrderShipment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "salesOrderLocations"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
+ foreignKeyName: "salesOrderShipment_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "salesOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "salesOrderShipment_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesOrderLine_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "salesOrderShipment_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "salesOrder"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "salesOrderShipment_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "salesOrderLocations"
- referencedColumns: ["id"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesOrderLine_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "salesOrderShipment_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
referencedRelation: "salesOrders"
- referencedColumns: ["id"]
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesOrderLine_shelfId_fkey"
- columns: ["shelfId", "locationId"]
+ foreignKeyName: "salesOrderShipment_shippingMethodId_fkey"
+ columns: ["shippingMethodId"]
isOneToOne: false
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
+ referencedRelation: "shippingMethod"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode", "companyId"]
+ foreignKeyName: "salesOrderShipment_shippingTermId_fkey"
+ columns: ["shippingTermId"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "shippingTerm"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ foreignKeyName: "salesOrderShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ foreignKeyName: "salesOrderShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ foreignKeyName: "salesOrderShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ foreignKeyName: "salesOrderShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderLine_updatedBy_fkey"
+ foreignKeyName: "salesOrderShipment_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -15597,558 +16582,530 @@ export type Database = {
},
]
}
- salesOrderPayment: {
+ salesOrderStatusHistory: {
Row: {
- companyId: string
- currencyCode: string
- customFields: Json | null
+ createdAt: string
+ createdBy: string
id: string
- invoiceCustomerContactId: string | null
- invoiceCustomerId: string | null
- invoiceCustomerLocationId: string | null
- paymentComplete: boolean
- paymentTermId: string | null
- updatedAt: string | null
- updatedBy: string | null
+ salesOrderId: string
+ status: Database["public"]["Enums"]["salesOrderStatus"]
}
Insert: {
- companyId: string
- currencyCode?: string
- customFields?: Json | null
- id: string
- invoiceCustomerContactId?: string | null
- invoiceCustomerId?: string | null
- invoiceCustomerLocationId?: string | null
- paymentComplete?: boolean
- paymentTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
+ createdAt?: string
+ createdBy: string
+ id?: string
+ salesOrderId: string
+ status: Database["public"]["Enums"]["salesOrderStatus"]
}
Update: {
- companyId?: string
- currencyCode?: string
- customFields?: Json | null
+ createdAt?: string
+ createdBy?: string
id?: string
- invoiceCustomerContactId?: string | null
- invoiceCustomerId?: string | null
- invoiceCustomerLocationId?: string | null
- paymentComplete?: boolean
- paymentTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
+ salesOrderId?: string
+ status?: Database["public"]["Enums"]["salesOrderStatus"]
}
Relationships: [
{
- foreignKeyName: "salesOrderPayment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
+ foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesOrderPayment_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "salesOrderStatusHistory_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
referencedRelation: "salesOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "salesOrderStatusHistory_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
referencedRelation: "salesOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "salesOrderStatusHistory_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
referencedRelation: "salesOrders"
referencedColumns: ["id"]
},
+ ]
+ }
+ salesOrderTransaction: {
+ Row: {
+ createdAt: string
+ id: string
+ salesOrderId: string
+ type: Database["public"]["Enums"]["salesOrderTransactionType"]
+ userId: string
+ }
+ Insert: {
+ createdAt?: string
+ id?: string
+ salesOrderId: string
+ type: Database["public"]["Enums"]["salesOrderTransactionType"]
+ userId: string
+ }
+ Update: {
+ createdAt?: string
+ id?: string
+ salesOrderId?: string
+ type?: Database["public"]["Enums"]["salesOrderTransactionType"]
+ userId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "salesOrderTransaction_salesOrderId_fkey"
+ columns: ["salesOrderId"]
+ isOneToOne: false
+ referencedRelation: "salesOrder"
+ referencedColumns: ["id"]
+ },
{
- foreignKeyName: "salesOrderPayment_invoiceCustomerContactId_fkey"
- columns: ["invoiceCustomerContactId"]
+ foreignKeyName: "salesOrderTransaction_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "customerContact"
+ referencedRelation: "salesOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
+ foreignKeyName: "salesOrderTransaction_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "customer"
+ referencedRelation: "salesOrders"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
+ foreignKeyName: "salesOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "customers"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
+ foreignKeyName: "salesOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_invoiceCustomerLocationId_fkey"
- columns: ["invoiceCustomerLocationId"]
+ foreignKeyName: "salesOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "customerLocation"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderPayment_paymentTermId_fkey"
- columns: ["paymentTermId"]
+ foreignKeyName: "salesOrderTransaction_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "paymentTerm"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "salesOrderTransaction_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
]
}
- salesOrderShipment: {
+ salesRfq: {
Row: {
assignee: string | null
companyId: string
- customerId: string | null
+ createdAt: string | null
+ createdBy: string | null
+ customerContactId: string | null
+ customerId: string
customerLocationId: string | null
+ customerReference: string | null
customFields: Json | null
- deliveryDate: string | null
- dropShipment: boolean
+ employeeId: string | null
+ expirationDate: string | null
+ externalNotes: Json | null
id: string
+ internalNotes: Json | null
locationId: string | null
- notes: string | null
- receiptPromisedDate: string | null
- receiptRequestedDate: string | null
- shippingMethodId: string | null
- shippingTermId: string | null
- supplierId: string | null
- supplierLocationId: string | null
- trackingNumber: string | null
+ revisionId: number
+ rfqDate: string
+ rfqId: string
+ status: Database["public"]["Enums"]["salesRfqStatus"]
updatedAt: string | null
updatedBy: string | null
}
Insert: {
assignee?: string | null
companyId: string
- customerId?: string | null
+ createdAt?: string | null
+ createdBy?: string | null
+ customerContactId?: string | null
+ customerId: string
customerLocationId?: string | null
+ customerReference?: string | null
customFields?: Json | null
- deliveryDate?: string | null
- dropShipment?: boolean
- id: string
+ employeeId?: string | null
+ expirationDate?: string | null
+ externalNotes?: Json | null
+ id?: string
+ internalNotes?: Json | null
locationId?: string | null
- notes?: string | null
- receiptPromisedDate?: string | null
- receiptRequestedDate?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- supplierId?: string | null
- supplierLocationId?: string | null
- trackingNumber?: string | null
+ revisionId?: number
+ rfqDate: string
+ rfqId: string
+ status?: Database["public"]["Enums"]["salesRfqStatus"]
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
assignee?: string | null
companyId?: string
- customerId?: string | null
+ createdAt?: string | null
+ createdBy?: string | null
+ customerContactId?: string | null
+ customerId?: string
customerLocationId?: string | null
+ customerReference?: string | null
customFields?: Json | null
- deliveryDate?: string | null
- dropShipment?: boolean
+ employeeId?: string | null
+ expirationDate?: string | null
+ externalNotes?: Json | null
id?: string
+ internalNotes?: Json | null
locationId?: string | null
- notes?: string | null
- receiptPromisedDate?: string | null
- receiptRequestedDate?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- supplierId?: string | null
- supplierLocationId?: string | null
- trackingNumber?: string | null
+ revisionId?: number
+ rfqDate?: string
+ rfqId?: string
+ status?: Database["public"]["Enums"]["salesRfqStatus"]
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "salesOrderShipment_assignee_fkey"
+ foreignKeyName: "salesRfq_assigneeId_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_assignee_fkey"
+ foreignKeyName: "salesRfq_assigneeId_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_assignee_fkey"
+ foreignKeyName: "salesRfq_assigneeId_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_assignee_fkey"
+ foreignKeyName: "salesRfq_assigneeId_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_assignee_fkey"
+ foreignKeyName: "salesRfq_assigneeId_fkey"
columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesOrderShipment_companyId_fkey"
+ foreignKeyName: "salesRfq_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_companyId_fkey"
+ foreignKeyName: "salesRfq_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_companyId_fkey"
+ foreignKeyName: "salesRfq_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesOrderShipment_companyId_fkey"
+ foreignKeyName: "salesRfq_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesOrderShipment_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "salesRfq_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customer"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "salesRfq_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customers"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "salesRfq_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_customerLocationId_fkey"
- columns: ["customerLocationId"]
+ foreignKeyName: "salesRfq_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "customerLocation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrderShipment_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "salesOrder"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrderShipment_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "salesOrderLocations"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrderShipment_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "salesOrders"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "salesRfq_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesOrderShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "salesRfq_customerContactId_fkey"
+ columns: ["customerContactId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "customerContact"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "salesRfq_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "customer"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "salesRfq_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "customers"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_shippingMethodId_fkey"
- columns: ["shippingMethodId"]
+ foreignKeyName: "salesRfq_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "shippingMethod"
+ referencedRelation: "salesOrderCustomers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_shippingTermId_fkey"
- columns: ["shippingTermId"]
+ foreignKeyName: "salesRfq_customerLocationId_fkey"
+ columns: ["customerLocationId"]
isOneToOne: false
- referencedRelation: "shippingTerm"
+ referencedRelation: "customerLocation"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "salesRfq_employeeId_fkey"
+ columns: ["employeeId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "salesRfq_employeeId_fkey"
+ columns: ["employeeId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "salesRfq_employeeId_fkey"
+ columns: ["employeeId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "salesRfq_employeeId_fkey"
+ columns: ["employeeId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderShipment_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "salesRfq_employeeId_fkey"
+ columns: ["employeeId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- salesOrderStatusHistory: {
- Row: {
- createdAt: string
- createdBy: string
- id: string
- salesOrderId: string
- status: Database["public"]["Enums"]["salesOrderStatus"]
- }
- Insert: {
- createdAt?: string
- createdBy: string
- id?: string
- salesOrderId: string
- status: Database["public"]["Enums"]["salesOrderStatus"]
- }
- Update: {
- createdAt?: string
- createdBy?: string
- id?: string
- salesOrderId?: string
- status?: Database["public"]["Enums"]["salesOrderStatus"]
- }
- Relationships: [
{
- foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesRfq_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "salesRfq_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfq_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "salesRfq_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "salesRfq_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesRfq_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesRfq_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesRfq_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "salesRfq_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "salesOrderStatusHistory_salesOrderId_fkey"
- columns: ["salesOrderId"]
- isOneToOne: false
- referencedRelation: "salesOrder"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrderStatusHistory_salesOrderId_fkey"
- columns: ["salesOrderId"]
- isOneToOne: false
- referencedRelation: "salesOrderLocations"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrderStatusHistory_salesOrderId_fkey"
- columns: ["salesOrderId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["id"]
- },
]
}
- salesOrderTransaction: {
+ salesRfqFavorite: {
Row: {
- createdAt: string
- id: string
- salesOrderId: string
- type: Database["public"]["Enums"]["salesOrderTransactionType"]
+ rfqId: string
userId: string
}
Insert: {
- createdAt?: string
- id?: string
- salesOrderId: string
- type: Database["public"]["Enums"]["salesOrderTransactionType"]
+ rfqId: string
userId: string
}
Update: {
- createdAt?: string
- id?: string
- salesOrderId?: string
- type?: Database["public"]["Enums"]["salesOrderTransactionType"]
+ rfqId?: string
userId?: string
}
Relationships: [
{
- foreignKeyName: "salesOrderTransaction_salesOrderId_fkey"
- columns: ["salesOrderId"]
- isOneToOne: false
- referencedRelation: "salesOrder"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesOrderTransaction_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "salesRfqFavorites_salesRfqId_fkey"
+ columns: ["rfqId"]
isOneToOne: false
- referencedRelation: "salesOrderLocations"
+ referencedRelation: "salesRfq"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderTransaction_salesOrderId_fkey"
- columns: ["salesOrderId"]
+ foreignKeyName: "salesRfqFavorites_salesRfqId_fkey"
+ columns: ["rfqId"]
isOneToOne: false
- referencedRelation: "salesOrders"
+ referencedRelation: "salesRfqs"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderTransaction_userId_fkey"
+ foreignKeyName: "salesRfqFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderTransaction_userId_fkey"
+ foreignKeyName: "salesRfqFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderTransaction_userId_fkey"
+ foreignKeyName: "salesRfqFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderTransaction_userId_fkey"
+ foreignKeyName: "salesRfqFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesOrderTransaction_userId_fkey"
+ foreignKeyName: "salesRfqFavorites_userId_fkey"
columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -16156,733 +17113,926 @@ export type Database = {
},
]
}
- salesRfq: {
+ salesRfqLine: {
Row: {
- assignee: string | null
companyId: string
createdAt: string | null
- createdBy: string | null
- customerContactId: string | null
- customerId: string
- customerLocationId: string | null
- customerReference: string | null
+ createdBy: string
+ customerPartId: string
+ customerPartRevision: string | null
customFields: Json | null
- employeeId: string | null
- expirationDate: string | null
+ description: string | null
externalNotes: Json | null
id: string
internalNotes: Json | null
- locationId: string | null
- revisionId: number
- rfqDate: string
- rfqId: string
- status: Database["public"]["Enums"]["salesRfqStatus"]
+ itemId: string | null
+ modelUploadId: string | null
+ order: number
+ quantity: number[] | null
+ salesRfqId: string
+ unitOfMeasureCode: string
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- assignee?: string | null
companyId: string
createdAt?: string | null
- createdBy?: string | null
- customerContactId?: string | null
- customerId: string
- customerLocationId?: string | null
- customerReference?: string | null
+ createdBy: string
+ customerPartId: string
+ customerPartRevision?: string | null
customFields?: Json | null
- employeeId?: string | null
- expirationDate?: string | null
+ description?: string | null
externalNotes?: Json | null
id?: string
internalNotes?: Json | null
- locationId?: string | null
- revisionId?: number
- rfqDate: string
- rfqId: string
- status?: Database["public"]["Enums"]["salesRfqStatus"]
+ itemId?: string | null
+ modelUploadId?: string | null
+ order?: number
+ quantity?: number[] | null
+ salesRfqId: string
+ unitOfMeasureCode: string
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- assignee?: string | null
companyId?: string
createdAt?: string | null
- createdBy?: string | null
- customerContactId?: string | null
- customerId?: string
- customerLocationId?: string | null
- customerReference?: string | null
+ createdBy?: string
+ customerPartId?: string
+ customerPartRevision?: string | null
customFields?: Json | null
- employeeId?: string | null
- expirationDate?: string | null
+ description?: string | null
externalNotes?: Json | null
id?: string
internalNotes?: Json | null
- locationId?: string | null
- revisionId?: number
- rfqDate?: string
- rfqId?: string
- status?: Database["public"]["Enums"]["salesRfqStatus"]
+ itemId?: string | null
+ modelUploadId?: string | null
+ order?: number
+ quantity?: number[] | null
+ salesRfqId?: string
+ unitOfMeasureCode?: string
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "salesRfq_assigneeId_fkey"
- columns: ["assignee"]
+ foreignKeyName: "salesRfqLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_salesRfqId_fkey"
+ columns: ["salesRfqId"]
+ isOneToOne: false
+ referencedRelation: "salesRfq"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_salesRfqId_fkey"
+ columns: ["salesRfqId"]
+ isOneToOne: false
+ referencedRelation: "salesRfqs"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
+ isOneToOne: false
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
+ },
+ {
+ foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_assigneeId_fkey"
- columns: ["assignee"]
+ foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_assigneeId_fkey"
- columns: ["assignee"]
+ foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_assigneeId_fkey"
- columns: ["assignee"]
+ foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_assigneeId_fkey"
- columns: ["assignee"]
+ foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ search: {
+ Row: {
+ companyId: string | null
+ description: string | null
+ entity: Database["public"]["Enums"]["searchEntity"] | null
+ fts: unknown | null
+ id: number
+ link: string
+ name: string
+ uuid: string | null
+ }
+ Insert: {
+ companyId?: string | null
+ description?: string | null
+ entity?: Database["public"]["Enums"]["searchEntity"] | null
+ fts?: unknown | null
+ id?: number
+ link: string
+ name: string
+ uuid?: string | null
+ }
+ Update: {
+ companyId?: string | null
+ description?: string | null
+ entity?: Database["public"]["Enums"]["searchEntity"] | null
+ fts?: unknown | null
+ id?: number
+ link?: string
+ name?: string
+ uuid?: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "salesRfq_companyId_fkey"
+ foreignKeyName: "search_companyid_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_companyId_fkey"
+ foreignKeyName: "search_companyid_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_companyId_fkey"
+ foreignKeyName: "search_companyid_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfq_companyId_fkey"
+ foreignKeyName: "search_companyid_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
+ ]
+ }
+ sequence: {
+ Row: {
+ companyId: string
+ id: string
+ name: string
+ next: number
+ prefix: string | null
+ size: number
+ step: number
+ suffix: string | null
+ table: string
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ id?: string
+ name: string
+ next?: number
+ prefix?: string | null
+ size?: number
+ step?: number
+ suffix?: string | null
+ table: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ id?: string
+ name?: string
+ next?: number
+ prefix?: string | null
+ size?: number
+ step?: number
+ suffix?: string | null
+ table?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "salesRfq_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesRfq_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "sequence_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "sequence_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "sequence_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfq_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "sequence_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfq_customerContactId_fkey"
- columns: ["customerContactId"]
+ foreignKeyName: "sequence_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "customerContact"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "sequence_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "customer"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "sequence_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "customers"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_customerId_fkey"
- columns: ["customerId"]
+ foreignKeyName: "sequence_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "salesOrderCustomers"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_customerLocationId_fkey"
- columns: ["customerLocationId"]
+ foreignKeyName: "sequence_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "customerLocation"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
+ ]
+ }
+ service: {
+ Row: {
+ approved: boolean
+ approvedBy: string | null
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ fromDate: string | null
+ id: string
+ itemId: string | null
+ serviceType: Database["public"]["Enums"]["serviceType"]
+ toDate: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ approved?: boolean
+ approvedBy?: string | null
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ fromDate?: string | null
+ id: string
+ itemId?: string | null
+ serviceType: Database["public"]["Enums"]["serviceType"]
+ toDate?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ approved?: boolean
+ approvedBy?: string | null
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ fromDate?: string | null
+ id?: string
+ itemId?: string | null
+ serviceType?: Database["public"]["Enums"]["serviceType"]
+ toDate?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "salesRfq_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "service_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "service_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "service_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "service_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_employeeId_fkey"
- columns: ["employeeId"]
+ foreignKeyName: "service_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesRfq_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "service_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "service_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "service_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfq_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "service_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfq_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "service_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "service_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "service_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "service_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfq_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "service_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- salesRfqFavorite: {
- Row: {
- rfqId: string
- userId: string
- }
- Insert: {
- rfqId: string
- userId: string
- }
- Update: {
- rfqId?: string
- userId?: string
- }
- Relationships: [
{
- foreignKeyName: "salesRfqFavorites_salesRfqId_fkey"
- columns: ["rfqId"]
+ foreignKeyName: "service_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "salesRfq"
+ referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqFavorites_salesRfqId_fkey"
- columns: ["rfqId"]
+ foreignKeyName: "service_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "salesRfqs"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
{
- foreignKeyName: "salesRfqFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "service_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "service_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "service_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "service_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqFavorites_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "service_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- salesRfqLine: {
+ shelf: {
Row: {
+ active: boolean
companyId: string
- createdAt: string | null
+ createdAt: string
createdBy: string
- customerPartId: string
- customerPartRevision: string | null
customFields: Json | null
- description: string | null
- externalNotes: Json | null
id: string
- internalNotes: Json | null
- itemId: string | null
- modelUploadId: string | null
- order: number
- quantity: number[] | null
- salesRfqId: string
- unitOfMeasureCode: string
+ locationId: string
updatedAt: string | null
updatedBy: string | null
+ warehouseId: string | null
}
Insert: {
+ active?: boolean
companyId: string
- createdAt?: string | null
+ createdAt?: string
createdBy: string
- customerPartId: string
- customerPartRevision?: string | null
customFields?: Json | null
- description?: string | null
- externalNotes?: Json | null
- id?: string
- internalNotes?: Json | null
- itemId?: string | null
- modelUploadId?: string | null
- order?: number
- quantity?: number[] | null
- salesRfqId: string
- unitOfMeasureCode: string
+ id: string
+ locationId: string
updatedAt?: string | null
updatedBy?: string | null
+ warehouseId?: string | null
}
Update: {
+ active?: boolean
companyId?: string
- createdAt?: string | null
+ createdAt?: string
createdBy?: string
- customerPartId?: string
- customerPartRevision?: string | null
customFields?: Json | null
- description?: string | null
- externalNotes?: Json | null
id?: string
- internalNotes?: Json | null
- itemId?: string | null
- modelUploadId?: string | null
- order?: number
- quantity?: number[] | null
- salesRfqId?: string
- unitOfMeasureCode?: string
+ locationId?: string
updatedAt?: string | null
updatedBy?: string | null
+ warehouseId?: string | null
}
Relationships: [
{
- foreignKeyName: "salesRfqLine_companyId_fkey"
+ foreignKeyName: "shelf_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_companyId_fkey"
+ foreignKeyName: "shelf_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_companyId_fkey"
+ foreignKeyName: "shelf_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfqLine_companyId_fkey"
+ foreignKeyName: "shelf_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "salesRfqLine_createdBy_fkey"
+ foreignKeyName: "shelf_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_createdBy_fkey"
+ foreignKeyName: "shelf_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_createdBy_fkey"
+ foreignKeyName: "shelf_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_createdBy_fkey"
+ foreignKeyName: "shelf_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_createdBy_fkey"
+ foreignKeyName: "shelf_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "salesRfqLine_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesRfqLine_itemId_fkey"
- columns: ["itemId"]
+ foreignKeyName: "shelf_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesRfqLine_salesRfqId_fkey"
- columns: ["salesRfqId"]
+ foreignKeyName: "shelf_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "salesRfq"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_salesRfqId_fkey"
- columns: ["salesRfqId"]
+ foreignKeyName: "shelf_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "salesRfqs"
- referencedColumns: ["id"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesRfqLine_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode", "companyId"]
+ foreignKeyName: "shelf_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ foreignKeyName: "shelf_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ foreignKeyName: "shelf_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "salesRfqLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesRfqLine_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "salesRfqLine_updatedBy_fkey"
+ foreignKeyName: "shelf_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
- search: {
- Row: {
- companyId: string | null
- description: string | null
- entity: Database["public"]["Enums"]["searchEntity"] | null
- fts: unknown | null
- id: number
- link: string
- name: string
- uuid: string | null
- }
- Insert: {
- companyId?: string | null
- description?: string | null
- entity?: Database["public"]["Enums"]["searchEntity"] | null
- fts?: unknown | null
- id?: number
- link: string
- name: string
- uuid?: string | null
- }
- Update: {
- companyId?: string | null
- description?: string | null
- entity?: Database["public"]["Enums"]["searchEntity"] | null
- fts?: unknown | null
- id?: number
- link?: string
- name?: string
- uuid?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "search_companyid_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "search_companyid_fkey"
- columns: ["companyId"]
+ foreignKeyName: "shelf_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "search_companyid_fkey"
- columns: ["companyId"]
+ foreignKeyName: "shelf_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "search_companyid_fkey"
- columns: ["companyId"]
+ foreignKeyName: "shelf_warehouseId_fkey"
+ columns: ["warehouseId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "warehouse"
+ referencedColumns: ["id"]
},
]
}
- sequence: {
+ shift: {
Row: {
+ active: boolean
companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ endTime: string
+ friday: boolean
id: string
+ locationId: string
+ monday: boolean
name: string
- next: number
- prefix: string | null
- size: number
- step: number
- suffix: string | null
- table: string
+ saturday: boolean
+ startTime: string
+ sunday: boolean
+ thursday: boolean
+ tuesday: boolean
updatedAt: string | null
updatedBy: string | null
+ wednesday: boolean
}
Insert: {
+ active?: boolean
companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ endTime: string
+ friday?: boolean
id?: string
+ locationId: string
+ monday?: boolean
name: string
- next?: number
- prefix?: string | null
- size?: number
- step?: number
- suffix?: string | null
- table: string
+ saturday?: boolean
+ startTime: string
+ sunday?: boolean
+ thursday?: boolean
+ tuesday?: boolean
updatedAt?: string | null
updatedBy?: string | null
+ wednesday?: boolean
}
Update: {
+ active?: boolean
companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ endTime?: string
+ friday?: boolean
id?: string
+ locationId?: string
+ monday?: boolean
name?: string
- next?: number
- prefix?: string | null
- size?: number
- step?: number
- suffix?: string | null
- table?: string
+ saturday?: boolean
+ startTime?: string
+ sunday?: boolean
+ thursday?: boolean
+ tuesday?: boolean
updatedAt?: string | null
updatedBy?: string | null
+ wednesday?: boolean
}
Relationships: [
{
- foreignKeyName: "sequence_companyId_fkey"
+ foreignKeyName: "shifts_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "sequence_companyId_fkey"
+ foreignKeyName: "shifts_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "sequence_companyId_fkey"
+ foreignKeyName: "shifts_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "sequence_companyId_fkey"
+ foreignKeyName: "shifts_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "sequence_updatedBy_fkey"
+ foreignKeyName: "shifts_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shifts_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shifts_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shifts_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shifts_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "shifts_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "shifts_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shifts_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "shifts_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
+ },
+ {
+ foreignKeyName: "shifts_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "sequence_updatedBy_fkey"
+ foreignKeyName: "shifts_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "sequence_updatedBy_fkey"
+ foreignKeyName: "shifts_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "sequence_updatedBy_fkey"
+ foreignKeyName: "shifts_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "sequence_updatedBy_fkey"
+ foreignKeyName: "shifts_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -16890,195 +18040,157 @@ export type Database = {
},
]
}
- service: {
+ shippingMethod: {
Row: {
- approved: boolean
- approvedBy: string | null
+ active: boolean
+ carrier: Database["public"]["Enums"]["shippingCarrier"]
+ carrierAccountId: string | null
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
- fromDate: string | null
id: string
- itemId: string | null
- serviceType: Database["public"]["Enums"]["serviceType"]
- toDate: string | null
+ name: string
+ trackingUrl: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- approved?: boolean
- approvedBy?: string | null
+ active?: boolean
+ carrier?: Database["public"]["Enums"]["shippingCarrier"]
+ carrierAccountId?: string | null
companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
- fromDate?: string | null
- id: string
- itemId?: string | null
- serviceType: Database["public"]["Enums"]["serviceType"]
- toDate?: string | null
+ id?: string
+ name: string
+ trackingUrl?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- approved?: boolean
- approvedBy?: string | null
+ active?: boolean
+ carrier?: Database["public"]["Enums"]["shippingCarrier"]
+ carrierAccountId?: string | null
companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
- fromDate?: string | null
id?: string
- itemId?: string | null
- serviceType?: Database["public"]["Enums"]["serviceType"]
- toDate?: string | null
+ name?: string
+ trackingUrl?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "service_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "service_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "service_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "service_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "shippingMethod_carrierAccountId_fkey"
+ columns: ["carrierAccountId", "companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "account"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "service_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "shippingMethod_carrierAccountId_fkey"
+ columns: ["carrierAccountId", "companyId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "accounts"
+ referencedColumns: ["number", "companyId"]
},
{
- foreignKeyName: "service_companyId_fkey"
+ foreignKeyName: "shippingMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_companyId_fkey"
+ foreignKeyName: "shippingMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_companyId_fkey"
+ foreignKeyName: "shippingMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "service_companyId_fkey"
+ foreignKeyName: "shippingMethod_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "service_createdBy_fkey"
+ foreignKeyName: "shippingMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_createdBy_fkey"
+ foreignKeyName: "shippingMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_createdBy_fkey"
+ foreignKeyName: "shippingMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_createdBy_fkey"
+ foreignKeyName: "shippingMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_createdBy_fkey"
+ foreignKeyName: "shippingMethod_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "service_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "service_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
- },
- {
- foreignKeyName: "service_updatedBy_fkey"
+ foreignKeyName: "shippingMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_updatedBy_fkey"
+ foreignKeyName: "shippingMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_updatedBy_fkey"
+ foreignKeyName: "shippingMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_updatedBy_fkey"
+ foreignKeyName: "shippingMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "service_updatedBy_fkey"
+ foreignKeyName: "shippingMethod_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -17086,523 +18198,365 @@ export type Database = {
},
]
}
- shelf: {
+ shippingTerm: {
Row: {
active: boolean
companyId: string
createdAt: string
createdBy: string
- customFields: Json | null
id: string
- locationId: string
+ name: string
updatedAt: string | null
updatedBy: string | null
- warehouseId: string | null
}
Insert: {
active?: boolean
companyId: string
createdAt?: string
createdBy: string
- customFields?: Json | null
- id: string
- locationId: string
+ id?: string
+ name: string
updatedAt?: string | null
updatedBy?: string | null
- warehouseId?: string | null
}
Update: {
active?: boolean
companyId?: string
createdAt?: string
createdBy?: string
- customFields?: Json | null
id?: string
- locationId?: string
+ name?: string
updatedAt?: string | null
updatedBy?: string | null
- warehouseId?: string | null
}
Relationships: [
{
- foreignKeyName: "shelf_companyId_fkey"
+ foreignKeyName: "shippingTerm_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_companyId_fkey"
+ foreignKeyName: "shippingTerm_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_companyId_fkey"
+ foreignKeyName: "shippingTerm_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "shelf_companyId_fkey"
+ foreignKeyName: "shippingTerm_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "shelf_createdBy_fkey"
+ foreignKeyName: "shippingTerm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_createdBy_fkey"
+ foreignKeyName: "shippingTerm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_createdBy_fkey"
+ foreignKeyName: "shippingTerm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_createdBy_fkey"
+ foreignKeyName: "shippingTerm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_createdBy_fkey"
+ foreignKeyName: "shippingTerm_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "shelf_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "shelf_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shelf_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "shelf_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "shelf_updatedBy_fkey"
+ foreignKeyName: "shippingTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_updatedBy_fkey"
+ foreignKeyName: "shippingTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_updatedBy_fkey"
+ foreignKeyName: "shippingTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_updatedBy_fkey"
+ foreignKeyName: "shippingTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shelf_updatedBy_fkey"
+ foreignKeyName: "shippingTerm_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "shelf_warehouseId_fkey"
- columns: ["warehouseId"]
- isOneToOne: false
- referencedRelation: "warehouse"
- referencedColumns: ["id"]
- },
]
}
- shift: {
+ supplier: {
Row: {
- active: boolean
+ accountManagerId: string | null
+ assignee: string | null
companyId: string
createdAt: string
- createdBy: string
+ createdBy: string | null
customFields: Json | null
- endTime: string
- friday: boolean
id: string
- locationId: string
- monday: boolean
+ logo: string | null
name: string
- saturday: boolean
- startTime: string
- sunday: boolean
- thursday: boolean
- tuesday: boolean
+ supplierStatusId: string | null
+ supplierTypeId: string | null
+ taxId: string | null
updatedAt: string | null
updatedBy: string | null
- wednesday: boolean
}
Insert: {
- active?: boolean
+ accountManagerId?: string | null
+ assignee?: string | null
companyId: string
createdAt?: string
- createdBy: string
+ createdBy?: string | null
customFields?: Json | null
- endTime: string
- friday?: boolean
id?: string
- locationId: string
- monday?: boolean
+ logo?: string | null
name: string
- saturday?: boolean
- startTime: string
- sunday?: boolean
- thursday?: boolean
- tuesday?: boolean
+ supplierStatusId?: string | null
+ supplierTypeId?: string | null
+ taxId?: string | null
updatedAt?: string | null
updatedBy?: string | null
- wednesday?: boolean
}
Update: {
- active?: boolean
+ accountManagerId?: string | null
+ assignee?: string | null
companyId?: string
createdAt?: string
- createdBy?: string
+ createdBy?: string | null
customFields?: Json | null
- endTime?: string
- friday?: boolean
id?: string
- locationId?: string
- monday?: boolean
+ logo?: string | null
name?: string
- saturday?: boolean
- startTime?: string
- sunday?: boolean
- thursday?: boolean
- tuesday?: boolean
+ supplierStatusId?: string | null
+ supplierTypeId?: string | null
+ taxId?: string | null
updatedAt?: string | null
updatedBy?: string | null
- wednesday?: boolean
}
Relationships: [
{
- foreignKeyName: "shifts_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shifts_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shifts_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "shifts_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "shifts_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplier_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplier_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplier_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplier_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplier_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "shifts_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "shifts_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shifts_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "shifts_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "shifts_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplier_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplier_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplier_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "shifts_updatedBy_fkey"
- columns: ["updatedBy"]
+ {
+ foreignKeyName: "supplier_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shifts_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplier_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- shippingMethod: {
- Row: {
- active: boolean
- carrier: Database["public"]["Enums"]["shippingCarrier"]
- carrierAccountId: string | null
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- id: string
- name: string
- trackingUrl: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- active?: boolean
- carrier?: Database["public"]["Enums"]["shippingCarrier"]
- carrierAccountId?: string | null
- companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- id?: string
- name: string
- trackingUrl?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- active?: boolean
- carrier?: Database["public"]["Enums"]["shippingCarrier"]
- carrierAccountId?: string | null
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- id?: string
- name?: string
- trackingUrl?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "shippingMethod_carrierAccountId_fkey"
- columns: ["carrierAccountId", "companyId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["number", "companyId"]
- },
- {
- foreignKeyName: "shippingMethod_carrierAccountId_fkey"
- columns: ["carrierAccountId", "companyId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["number", "companyId"]
- },
{
- foreignKeyName: "shippingMethod_companyId_fkey"
+ foreignKeyName: "supplier_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_companyId_fkey"
+ foreignKeyName: "supplier_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_companyId_fkey"
+ foreignKeyName: "supplier_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "shippingMethod_companyId_fkey"
+ foreignKeyName: "supplier_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "shippingMethod_createdBy_fkey"
+ foreignKeyName: "supplier_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_createdBy_fkey"
+ foreignKeyName: "supplier_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_createdBy_fkey"
+ foreignKeyName: "supplier_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_createdBy_fkey"
+ foreignKeyName: "supplier_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_createdBy_fkey"
+ foreignKeyName: "supplier_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "shippingMethod_updatedBy_fkey"
+ foreignKeyName: "supplier_supplierStatusId_fkey"
+ columns: ["supplierStatusId"]
+ isOneToOne: false
+ referencedRelation: "supplierStatus"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplier_supplierTypeId_fkey"
+ columns: ["supplierTypeId"]
+ isOneToOne: false
+ referencedRelation: "supplierType"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplier_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_updatedBy_fkey"
+ foreignKeyName: "supplier_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_updatedBy_fkey"
+ foreignKeyName: "supplier_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_updatedBy_fkey"
+ foreignKeyName: "supplier_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingMethod_updatedBy_fkey"
+ foreignKeyName: "supplier_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -17610,971 +18564,999 @@ export type Database = {
},
]
}
- shippingTerm: {
+ supplierAccount: {
Row: {
- active: boolean
companyId: string
- createdAt: string
- createdBy: string
id: string
- name: string
- updatedAt: string | null
- updatedBy: string | null
+ supplierId: string
}
Insert: {
- active?: boolean
companyId: string
- createdAt?: string
- createdBy: string
- id?: string
- name: string
- updatedAt?: string | null
- updatedBy?: string | null
+ id: string
+ supplierId: string
}
Update: {
- active?: boolean
companyId?: string
- createdAt?: string
- createdBy?: string
id?: string
- name?: string
- updatedAt?: string | null
- updatedBy?: string | null
+ supplierId?: string
}
Relationships: [
{
- foreignKeyName: "shippingTerm_companyId_fkey"
+ foreignKeyName: "supplierAccount_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_companyId_fkey"
+ foreignKeyName: "supplierAccount_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_companyId_fkey"
+ foreignKeyName: "supplierAccount_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "shippingTerm_companyId_fkey"
+ foreignKeyName: "supplierAccount_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "shippingTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierAccount_id_fkey"
+ columns: ["id"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierAccount_id_fkey"
+ columns: ["id"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierAccount_id_fkey"
+ columns: ["id"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierAccount_id_fkey"
+ columns: ["id"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierAccount_id_fkey"
+ columns: ["id"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "shippingTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierAccount_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "shippingTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierAccount_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "shippingTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierAccount_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierAccount_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "shippingTerm_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierAccount_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "suppliers"
+ referencedColumns: ["id"]
},
]
}
- supplier: {
+ supplierContact: {
Row: {
- accountManagerId: string | null
- assignee: string | null
- companyId: string
- createdAt: string
- createdBy: string | null
+ contactId: string
customFields: Json | null
id: string
- logo: string | null
- name: string
- supplierStatusId: string | null
- supplierTypeId: string | null
- taxId: string | null
- updatedAt: string | null
- updatedBy: string | null
+ supplierId: string
+ supplierLocationId: string | null
+ userId: string | null
}
Insert: {
- accountManagerId?: string | null
- assignee?: string | null
- companyId: string
- createdAt?: string
- createdBy?: string | null
+ contactId: string
customFields?: Json | null
id?: string
- logo?: string | null
- name: string
- supplierStatusId?: string | null
- supplierTypeId?: string | null
- taxId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
+ supplierId: string
+ supplierLocationId?: string | null
+ userId?: string | null
}
Update: {
- accountManagerId?: string | null
- assignee?: string | null
- companyId?: string
- createdAt?: string
- createdBy?: string | null
+ contactId?: string
customFields?: Json | null
id?: string
- logo?: string | null
- name?: string
- supplierStatusId?: string | null
- supplierTypeId?: string | null
- taxId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
+ supplierId?: string
+ supplierLocationId?: string | null
+ userId?: string | null
}
Relationships: [
{
- foreignKeyName: "supplier_accountManagerId_fkey"
- columns: ["accountManagerId"]
+ foreignKeyName: "supplierContact_contactId_fkey"
+ columns: ["contactId"]
+ isOneToOne: false
+ referencedRelation: "contact"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierContact_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: false
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
+ },
+ {
+ foreignKeyName: "supplierContact_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplier_accountManagerId_fkey"
- columns: ["accountManagerId"]
+ foreignKeyName: "supplierContact_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_accountManagerId_fkey"
- columns: ["accountManagerId"]
+ foreignKeyName: "supplierContact_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_accountManagerId_fkey"
- columns: ["accountManagerId"]
+ foreignKeyName: "supplierContact_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_accountManagerId_fkey"
- columns: ["accountManagerId"]
+ foreignKeyName: "supplierContact_supplierLocationId_fkey"
+ columns: ["supplierLocationId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "supplierLocation"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "supplierContact_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "supplierContact_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "supplierContact_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "supplierContact_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "supplierContact_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ supplierLedger: {
+ Row: {
+ amount: number
+ companyId: string
+ createdAt: string
+ documentId: string | null
+ documentType:
+ | Database["public"]["Enums"]["supplierLedgerDocumentType"]
+ | null
+ entryNumber: number
+ externalDocumentId: string | null
+ id: string
+ postingDate: string
+ supplierId: string
+ }
+ Insert: {
+ amount: number
+ companyId: string
+ createdAt?: string
+ documentId?: string | null
+ documentType?:
+ | Database["public"]["Enums"]["supplierLedgerDocumentType"]
+ | null
+ entryNumber?: number
+ externalDocumentId?: string | null
+ id?: string
+ postingDate?: string
+ supplierId: string
+ }
+ Update: {
+ amount?: number
+ companyId?: string
+ createdAt?: string
+ documentId?: string | null
+ documentType?:
+ | Database["public"]["Enums"]["supplierLedgerDocumentType"]
+ | null
+ entryNumber?: number
+ externalDocumentId?: string | null
+ id?: string
+ postingDate?: string
+ supplierId?: string
+ }
+ Relationships: [
{
- foreignKeyName: "supplier_companyId_fkey"
+ foreignKeyName: "supplierLedger_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_companyId_fkey"
+ foreignKeyName: "supplierLedger_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_companyId_fkey"
+ foreignKeyName: "supplierLedger_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplier_companyId_fkey"
+ foreignKeyName: "supplierLedger_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplier_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierLedger_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplier_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierLedger_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplier_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierLedger_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "supplierLedger_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "supplier_supplierStatusId_fkey"
- columns: ["supplierStatusId"]
+ foreignKeyName: "supplierLedger_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "supplierStatus"
+ referencedRelation: "suppliers"
referencedColumns: ["id"]
},
+ ]
+ }
+ supplierLocation: {
+ Row: {
+ addressId: string
+ customFields: Json | null
+ id: string
+ name: string
+ supplierId: string
+ }
+ Insert: {
+ addressId: string
+ customFields?: Json | null
+ id?: string
+ name: string
+ supplierId: string
+ }
+ Update: {
+ addressId?: string
+ customFields?: Json | null
+ id?: string
+ name?: string
+ supplierId?: string
+ }
+ Relationships: [
{
- foreignKeyName: "supplier_supplierTypeId_fkey"
- columns: ["supplierTypeId"]
+ foreignKeyName: "supplierLocation_addressId_fkey"
+ columns: ["addressId"]
isOneToOne: false
- referencedRelation: "supplierType"
+ referencedRelation: "address"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierLocation_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "contractors"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplier_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierLocation_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "partners"
+ referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplier_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierLocation_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierLocation_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplier_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "supplierLocation_supplierId_fkey"
+ columns: ["supplierId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "suppliers"
+ referencedColumns: ["id"]
},
]
}
- supplierAccount: {
+ supplierPayment: {
Row: {
companyId: string
- id: string
+ currencyCode: string | null
+ customFields: Json | null
+ invoiceSupplierContactId: string | null
+ invoiceSupplierId: string | null
+ invoiceSupplierLocationId: string | null
+ paymentTermId: string | null
supplierId: string
+ updatedAt: string | null
+ updatedBy: string | null
}
Insert: {
companyId: string
- id: string
+ currencyCode?: string | null
+ customFields?: Json | null
+ invoiceSupplierContactId?: string | null
+ invoiceSupplierId?: string | null
+ invoiceSupplierLocationId?: string | null
+ paymentTermId?: string | null
supplierId: string
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Update: {
companyId?: string
- id?: string
+ currencyCode?: string | null
+ customFields?: Json | null
+ invoiceSupplierContactId?: string | null
+ invoiceSupplierId?: string | null
+ invoiceSupplierLocationId?: string | null
+ paymentTermId?: string | null
supplierId?: string
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierAccount_companyId_fkey"
+ foreignKeyName: "supplierPayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierAccount_companyId_fkey"
+ foreignKeyName: "supplierPayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierAccount_companyId_fkey"
+ foreignKeyName: "supplierPayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierAccount_companyId_fkey"
+ foreignKeyName: "supplierPayment_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierAccount_id_fkey"
- columns: ["id"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierAccount_id_fkey"
- columns: ["id"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierAccount_id_fkey"
- columns: ["id"]
+ foreignKeyName: "supplierPayment_currencyCode_fkey"
+ columns: ["currencyCode", "companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "currency"
+ referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "supplierAccount_id_fkey"
- columns: ["id"]
+ foreignKeyName: "supplierPayment_invoiceSupplierContactId_fkey"
+ columns: ["invoiceSupplierContactId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "supplierContact"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierAccount_id_fkey"
- columns: ["id"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
referencedRelation: "contractors"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
referencedRelation: "partners"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
+ columns: ["invoiceSupplierId"]
isOneToOne: false
referencedRelation: "suppliers"
referencedColumns: ["id"]
},
- ]
- }
- supplierContact: {
- Row: {
- contactId: string
- customFields: Json | null
- id: string
- supplierId: string
- supplierLocationId: string | null
- userId: string | null
- }
- Insert: {
- contactId: string
- customFields?: Json | null
- id?: string
- supplierId: string
- supplierLocationId?: string | null
- userId?: string | null
- }
- Update: {
- contactId?: string
- customFields?: Json | null
- id?: string
- supplierId?: string
- supplierLocationId?: string | null
- userId?: string | null
- }
- Relationships: [
{
- foreignKeyName: "supplierContact_contactId_fkey"
- columns: ["contactId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierLocationId_fkey"
+ columns: ["invoiceSupplierLocationId"]
isOneToOne: false
- referencedRelation: "contact"
+ referencedRelation: "supplierLocation"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierPayment_paymentTermId_fkey"
+ columns: ["paymentTermId"]
isOneToOne: false
+ referencedRelation: "paymentTerm"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierPayment_supplierId_fkey"
+ columns: ["supplierId"]
+ isOneToOne: true
referencedRelation: "contractors"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
+ foreignKeyName: "supplierPayment_supplierId_fkey"
columns: ["supplierId"]
- isOneToOne: false
+ isOneToOne: true
referencedRelation: "partners"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
+ foreignKeyName: "supplierPayment_supplierId_fkey"
columns: ["supplierId"]
- isOneToOne: false
+ isOneToOne: true
referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
+ foreignKeyName: "supplierPayment_supplierId_fkey"
columns: ["supplierId"]
- isOneToOne: false
+ isOneToOne: true
referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
+ foreignKeyName: "supplierPayment_supplierId_fkey"
columns: ["supplierId"]
- isOneToOne: false
+ isOneToOne: true
referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_supplierLocationId_fkey"
- columns: ["supplierLocationId"]
- isOneToOne: false
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierContact_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "supplierPayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "supplierPayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "supplierPayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "supplierPayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierContact_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "supplierPayment_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- supplierLedger: {
+ supplierProcess: {
Row: {
- amount: number
companyId: string
createdAt: string
- documentId: string | null
- documentType:
- | Database["public"]["Enums"]["supplierLedgerDocumentType"]
- | null
- entryNumber: number
- externalDocumentId: string | null
+ createdBy: string
+ customFields: Json | null
id: string
- postingDate: string
+ leadTime: number
+ minimumCost: number
+ processId: string
supplierId: string
+ unitCost: number
+ updatedAt: string | null
+ updatedBy: string | null
}
Insert: {
- amount: number
companyId: string
createdAt?: string
- documentId?: string | null
- documentType?:
- | Database["public"]["Enums"]["supplierLedgerDocumentType"]
- | null
- entryNumber?: number
- externalDocumentId?: string | null
+ createdBy: string
+ customFields?: Json | null
id?: string
- postingDate?: string
+ leadTime?: number
+ minimumCost?: number
+ processId: string
supplierId: string
+ unitCost?: number
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Update: {
- amount?: number
companyId?: string
createdAt?: string
- documentId?: string | null
- documentType?:
- | Database["public"]["Enums"]["supplierLedgerDocumentType"]
- | null
- entryNumber?: number
- externalDocumentId?: string | null
+ createdBy?: string
+ customFields?: Json | null
id?: string
- postingDate?: string
+ leadTime?: number
+ minimumCost?: number
+ processId?: string
supplierId?: string
+ unitCost?: number
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierLedger_companyId_fkey"
+ foreignKeyName: "supplierProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLedger_companyId_fkey"
+ foreignKeyName: "supplierProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLedger_companyId_fkey"
+ foreignKeyName: "supplierProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierLedger_companyId_fkey"
+ foreignKeyName: "supplierProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
+ foreignKeyName: "supplierProcess_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierProcess_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierProcess_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierProcess_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierProcess_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "supplierProcess_processId_fkey"
+ columns: ["processId"]
+ isOneToOne: false
+ referencedRelation: "process"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierProcess_processId_fkey"
+ columns: ["processId"]
+ isOneToOne: false
+ referencedRelation: "processes"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "supplierProcess_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "contractors"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
+ foreignKeyName: "supplierProcess_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "partners"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
+ foreignKeyName: "supplierProcess_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
+ foreignKeyName: "supplierProcess_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
+ foreignKeyName: "supplierProcess_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: false
referencedRelation: "suppliers"
referencedColumns: ["id"]
},
- ]
- }
- supplierLocation: {
- Row: {
- addressId: string
- customFields: Json | null
- id: string
- name: string
- supplierId: string
- }
- Insert: {
- addressId: string
- customFields?: Json | null
- id?: string
- name: string
- supplierId: string
- }
- Update: {
- addressId?: string
- customFields?: Json | null
- id?: string
- name?: string
- supplierId?: string
- }
- Relationships: [
{
- foreignKeyName: "supplierLocation_addressId_fkey"
- columns: ["addressId"]
+ foreignKeyName: "supplierProcess_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "address"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
- isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
- },
- {
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierProcess_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierProcess_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierProcess_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "supplier"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierProcess_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
]
}
- supplierPayment: {
+ supplierShipping: {
Row: {
companyId: string
- currencyCode: string | null
customFields: Json | null
- invoiceSupplierContactId: string | null
- invoiceSupplierId: string | null
- invoiceSupplierLocationId: string | null
- paymentTermId: string | null
+ shippingMethodId: string | null
+ shippingSupplierContactId: string | null
+ shippingSupplierId: string | null
+ shippingSupplierLocationId: string | null
+ shippingTermId: string | null
supplierId: string
updatedAt: string | null
updatedBy: string | null
}
Insert: {
companyId: string
- currencyCode?: string | null
customFields?: Json | null
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentTermId?: string | null
+ shippingMethodId?: string | null
+ shippingSupplierContactId?: string | null
+ shippingSupplierId?: string | null
+ shippingSupplierLocationId?: string | null
+ shippingTermId?: string | null
supplierId: string
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
companyId?: string
- currencyCode?: string | null
customFields?: Json | null
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentTermId?: string | null
+ shippingMethodId?: string | null
+ shippingSupplierContactId?: string | null
+ shippingSupplierId?: string | null
+ shippingSupplierLocationId?: string | null
+ shippingTermId?: string | null
supplierId?: string
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierPayment_companyId_fkey"
+ foreignKeyName: "supplierShipping_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_companyId_fkey"
+ foreignKeyName: "supplierShipping_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_companyId_fkey"
+ foreignKeyName: "supplierShipping_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierPayment_companyId_fkey"
+ foreignKeyName: "supplierShipping_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierPayment_currencyCode_fkey"
- columns: ["currencyCode", "companyId"]
+ foreignKeyName: "supplierShipping_shippingMethodId_fkey"
+ columns: ["shippingMethodId"]
isOneToOne: false
- referencedRelation: "currency"
- referencedColumns: ["code", "companyId"]
+ referencedRelation: "shippingMethod"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierContactId_fkey"
- columns: ["invoiceSupplierContactId"]
+ foreignKeyName: "supplierShipping_shippingSupplierContactId_fkey"
+ columns: ["shippingSupplierContactId"]
isOneToOne: false
referencedRelation: "supplierContact"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
+ columns: ["shippingSupplierId"]
isOneToOne: false
referencedRelation: "contractors"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
+ columns: ["shippingSupplierId"]
isOneToOne: false
referencedRelation: "partners"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
+ columns: ["shippingSupplierId"]
isOneToOne: false
referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
+ columns: ["shippingSupplierId"]
isOneToOne: false
referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
+ columns: ["shippingSupplierId"]
isOneToOne: false
referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierLocationId_fkey"
- columns: ["invoiceSupplierLocationId"]
+ foreignKeyName: "supplierShipping_shippingSupplierLocationId_fkey"
+ columns: ["shippingSupplierLocationId"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_paymentTermId_fkey"
- columns: ["paymentTermId"]
+ foreignKeyName: "supplierShipping_shippingTermId_fkey"
+ columns: ["shippingTermId"]
isOneToOne: false
- referencedRelation: "paymentTerm"
+ referencedRelation: "shippingTerm"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
+ foreignKeyName: "supplierShipping_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: true
referencedRelation: "contractors"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
+ foreignKeyName: "supplierShipping_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: true
referencedRelation: "partners"
referencedColumns: ["supplierId"]
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
+ foreignKeyName: "supplierShipping_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: true
referencedRelation: "purchaseOrderSuppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
+ foreignKeyName: "supplierShipping_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: true
referencedRelation: "supplier"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
+ foreignKeyName: "supplierShipping_supplierId_fkey"
columns: ["supplierId"]
isOneToOne: true
referencedRelation: "suppliers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_updatedBy_fkey"
+ foreignKeyName: "supplierShipping_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_updatedBy_fkey"
+ foreignKeyName: "supplierShipping_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_updatedBy_fkey"
+ foreignKeyName: "supplierShipping_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_updatedBy_fkey"
+ foreignKeyName: "supplierShipping_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierPayment_updatedBy_fkey"
+ foreignKeyName: "supplierShipping_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -18582,18 +19564,14 @@ export type Database = {
},
]
}
- supplierProcess: {
+ supplierStatus: {
Row: {
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
id: string
- leadTime: number
- minimumCost: number
- processId: string
- supplierId: string
- unitCost: number
+ name: string
updatedAt: string | null
updatedBy: string | null
}
@@ -18603,11 +19581,7 @@ export type Database = {
createdBy: string
customFields?: Json | null
id?: string
- leadTime?: number
- minimumCost?: number
- processId: string
- supplierId: string
- unitCost?: number
+ name: string
updatedAt?: string | null
updatedBy?: string | null
}
@@ -18617,157 +19591,104 @@ export type Database = {
createdBy?: string
customFields?: Json | null
id?: string
- leadTime?: number
- minimumCost?: number
- processId?: string
- supplierId?: string
- unitCost?: number
+ name?: string
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierProcess_companyId_fkey"
+ foreignKeyName: "supplierStatus_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierProcess_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "supplierProcess_companyId_fkey"
+ foreignKeyName: "supplierStatus_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "supplierProcess_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierProcess_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierProcess_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierProcess_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "supplierProcess_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "supplierProcess_processId_fkey"
- columns: ["processId"]
- isOneToOne: false
- referencedRelation: "process"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "supplierStatus_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "processes"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierProcess_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierStatus_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierProcess_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierStatus_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierStatus_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierStatus_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "supplier"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "supplierStatus_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "suppliers"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_updatedBy_fkey"
+ foreignKeyName: "supplierStatus_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "supplierStatus_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_updatedBy_fkey"
+ foreignKeyName: "supplierStatus_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_updatedBy_fkey"
+ foreignKeyName: "supplierStatus_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_updatedBy_fkey"
+ foreignKeyName: "supplierStatus_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierProcess_updatedBy_fkey"
+ foreignKeyName: "supplierStatus_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -18775,200 +19696,222 @@ export type Database = {
},
]
}
- supplierShipping: {
+ supplierType: {
Row: {
companyId: string
+ createdAt: string
+ createdBy: string
customFields: Json | null
- shippingMethodId: string | null
- shippingSupplierContactId: string | null
- shippingSupplierId: string | null
- shippingSupplierLocationId: string | null
- shippingTermId: string | null
- supplierId: string
+ id: string
+ name: string
+ protected: boolean
updatedAt: string | null
updatedBy: string | null
}
Insert: {
companyId: string
+ createdAt?: string
+ createdBy: string
customFields?: Json | null
- shippingMethodId?: string | null
- shippingSupplierContactId?: string | null
- shippingSupplierId?: string | null
- shippingSupplierLocationId?: string | null
- shippingTermId?: string | null
- supplierId: string
+ id?: string
+ name: string
+ protected?: boolean
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
companyId?: string
+ createdAt?: string
+ createdBy?: string
customFields?: Json | null
- shippingMethodId?: string | null
- shippingSupplierContactId?: string | null
- shippingSupplierId?: string | null
- shippingSupplierLocationId?: string | null
- shippingTermId?: string | null
- supplierId?: string
+ id?: string
+ name?: string
+ protected?: boolean
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierShipping_companyId_fkey"
+ foreignKeyName: "supplierType_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_companyId_fkey"
+ foreignKeyName: "supplierType_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_companyId_fkey"
+ foreignKeyName: "supplierType_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierShipping_companyId_fkey"
+ foreignKeyName: "supplierType_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierShipping_shippingMethodId_fkey"
- columns: ["shippingMethodId"]
+ foreignKeyName: "supplierType_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "shippingMethod"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierContactId_fkey"
- columns: ["shippingSupplierContactId"]
+ foreignKeyName: "supplierType_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "supplierContact"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
+ foreignKeyName: "supplierType_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
+ foreignKeyName: "supplierType_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
+ foreignKeyName: "supplierType_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
+ foreignKeyName: "supplierType_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "supplier"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
+ foreignKeyName: "supplierType_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "suppliers"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingSupplierLocationId_fkey"
- columns: ["shippingSupplierLocationId"]
+ foreignKeyName: "supplierType_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "supplierLocation"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_shippingTermId_fkey"
- columns: ["shippingTermId"]
+ foreignKeyName: "supplierType_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "shippingTerm"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
- isOneToOne: true
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierType_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
+ ]
+ }
+ terms: {
+ Row: {
+ id: string
+ purchasingTerms: Json | null
+ salesTerms: Json | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ id?: string
+ purchasingTerms?: Json | null
+ salesTerms?: Json | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ id?: string
+ purchasingTerms?: Json | null
+ salesTerms?: Json | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "terms_id_fkey"
+ columns: ["id"]
isOneToOne: true
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "terms_id_fkey"
+ columns: ["id"]
isOneToOne: true
- referencedRelation: "purchaseOrderSuppliers"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "terms_id_fkey"
+ columns: ["id"]
isOneToOne: true
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
+ foreignKeyName: "terms_id_fkey"
+ columns: ["id"]
isOneToOne: true
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierShipping_updatedBy_fkey"
+ foreignKeyName: "terms_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_updatedBy_fkey"
+ foreignKeyName: "terms_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_updatedBy_fkey"
+ foreignKeyName: "terms_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_updatedBy_fkey"
+ foreignKeyName: "terms_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierShipping_updatedBy_fkey"
+ foreignKeyName: "terms_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -18976,131 +19919,186 @@ export type Database = {
},
]
}
- supplierStatus: {
+ tool: {
Row: {
+ approved: boolean
+ approvedBy: string | null
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
id: string
- name: string
+ itemId: string | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
+ approved?: boolean
+ approvedBy?: string | null
companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
- id?: string
- name: string
+ id: string
+ itemId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
+ approved?: boolean
+ approvedBy?: string | null
companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
id?: string
- name?: string
+ itemId?: string | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierStatus_companyId_fkey"
+ foreignKeyName: "tool_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "tool_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "tool_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "tool_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "tool_approvedBy_fkey"
+ columns: ["approvedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "tool_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_companyId_fkey"
+ foreignKeyName: "tool_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_companyId_fkey"
+ foreignKeyName: "tool_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierStatus_companyId_fkey"
+ foreignKeyName: "tool_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierStatus_createdBy_fkey"
+ foreignKeyName: "tool_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_createdBy_fkey"
+ foreignKeyName: "tool_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_createdBy_fkey"
+ foreignKeyName: "tool_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_createdBy_fkey"
+ foreignKeyName: "tool_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_createdBy_fkey"
+ foreignKeyName: "tool_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "supplierStatus_updatedBy_fkey"
+ foreignKeyName: "tool_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "tool_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "tool_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_updatedBy_fkey"
+ foreignKeyName: "tool_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_updatedBy_fkey"
+ foreignKeyName: "tool_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_updatedBy_fkey"
+ foreignKeyName: "tool_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierStatus_updatedBy_fkey"
+ foreignKeyName: "tool_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -19108,134 +20106,137 @@ export type Database = {
},
]
}
- supplierType: {
+ unitOfMeasure: {
Row: {
+ active: boolean
+ code: string
companyId: string
createdAt: string
createdBy: string
customFields: Json | null
id: string
name: string
- protected: boolean
updatedAt: string | null
updatedBy: string | null
}
Insert: {
+ active?: boolean
+ code: string
companyId: string
createdAt?: string
createdBy: string
customFields?: Json | null
id?: string
name: string
- protected?: boolean
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
+ active?: boolean
+ code?: string
companyId?: string
createdAt?: string
createdBy?: string
customFields?: Json | null
id?: string
name?: string
- protected?: boolean
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "supplierType_companyId_fkey"
+ foreignKeyName: "unitOfMeasure_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_companyId_fkey"
+ foreignKeyName: "unitOfMeasure_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_companyId_fkey"
+ foreignKeyName: "unitOfMeasure_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierType_companyId_fkey"
+ foreignKeyName: "unitOfMeasure_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "supplierType_createdBy_fkey"
+ foreignKeyName: "unitOfMeasure_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_createdBy_fkey"
+ foreignKeyName: "unitOfMeasure_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_createdBy_fkey"
+ foreignKeyName: "unitOfMeasure_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_createdBy_fkey"
+ foreignKeyName: "unitOfMeasure_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_createdBy_fkey"
+ foreignKeyName: "unitOfMeasure_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "supplierType_updatedBy_fkey"
+ foreignKeyName: "unitOfMeasure_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_updatedBy_fkey"
+ foreignKeyName: "unitOfMeasure_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_updatedBy_fkey"
+ foreignKeyName: "unitOfMeasure_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_updatedBy_fkey"
+ foreignKeyName: "unitOfMeasure_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "supplierType_updatedBy_fkey"
+ foreignKeyName: "unitOfMeasure_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -19243,412 +20244,312 @@ export type Database = {
},
]
}
- terms: {
+ user: {
Row: {
+ about: string
+ active: boolean | null
+ admin: boolean | null
+ avatarUrl: string | null
+ createdAt: string
+ developer: boolean | null
+ email: string
+ firstName: string
+ fullName: string | null
id: string
- purchasingTerms: Json | null
- salesTerms: Json | null
+ lastName: string
updatedAt: string | null
- updatedBy: string | null
}
Insert: {
- id?: string
- purchasingTerms?: Json | null
- salesTerms?: Json | null
+ about?: string
+ active?: boolean | null
+ admin?: boolean | null
+ avatarUrl?: string | null
+ createdAt?: string
+ developer?: boolean | null
+ email: string
+ firstName: string
+ fullName?: string | null
+ id: string
+ lastName: string
updatedAt?: string | null
- updatedBy?: string | null
}
Update: {
+ about?: string
+ active?: boolean | null
+ admin?: boolean | null
+ avatarUrl?: string | null
+ createdAt?: string
+ developer?: boolean | null
+ email?: string
+ firstName?: string
+ fullName?: string | null
id?: string
- purchasingTerms?: Json | null
- salesTerms?: Json | null
+ lastName?: string
updatedAt?: string | null
- updatedBy?: string | null
}
- Relationships: [
- {
- foreignKeyName: "terms_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "terms_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "terms_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "terms_id_fkey"
- columns: ["id"]
- isOneToOne: true
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "terms_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "terms_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "terms_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "terms_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "terms_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
+ Relationships: []
}
- tool: {
+ userAttribute: {
Row: {
- approved: boolean
- approvedBy: string | null
- companyId: string
+ active: boolean | null
+ attributeDataTypeId: number
+ canSelfManage: boolean | null
createdAt: string
createdBy: string
- customFields: Json | null
id: string
- itemId: string | null
+ listOptions: string[] | null
+ name: string
+ sortOrder: number
updatedAt: string | null
updatedBy: string | null
+ userAttributeCategoryId: string
}
Insert: {
- approved?: boolean
- approvedBy?: string | null
- companyId: string
+ active?: boolean | null
+ attributeDataTypeId: number
+ canSelfManage?: boolean | null
createdAt?: string
createdBy: string
- customFields?: Json | null
- id: string
- itemId?: string | null
+ id?: string
+ listOptions?: string[] | null
+ name: string
+ sortOrder?: number
updatedAt?: string | null
updatedBy?: string | null
- }
- Update: {
- approved?: boolean
- approvedBy?: string | null
- companyId?: string
+ userAttributeCategoryId: string
+ }
+ Update: {
+ active?: boolean | null
+ attributeDataTypeId?: number
+ canSelfManage?: boolean | null
createdAt?: string
createdBy?: string
- customFields?: Json | null
id?: string
- itemId?: string | null
+ listOptions?: string[] | null
+ name?: string
+ sortOrder?: number
updatedAt?: string | null
updatedBy?: string | null
+ userAttributeCategoryId?: string
}
Relationships: [
{
- foreignKeyName: "tool_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "tool_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "tool_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "tool_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "tool_approvedBy_fkey"
- columns: ["approvedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "tool_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "tool_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "userAttribute_attributeDataTypeId_fkey"
+ columns: ["attributeDataTypeId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "attributeDataType"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "tool_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "tool_createdBy_fkey"
+ foreignKeyName: "userAttribute_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_createdBy_fkey"
+ foreignKeyName: "userAttribute_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_createdBy_fkey"
+ foreignKeyName: "userAttribute_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_createdBy_fkey"
+ foreignKeyName: "userAttribute_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_createdBy_fkey"
+ foreignKeyName: "userAttribute_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "tool_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "tool_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
- },
- {
- foreignKeyName: "tool_updatedBy_fkey"
+ foreignKeyName: "userAttribute_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_updatedBy_fkey"
+ foreignKeyName: "userAttribute_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_updatedBy_fkey"
+ foreignKeyName: "userAttribute_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_updatedBy_fkey"
+ foreignKeyName: "userAttribute_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "tool_updatedBy_fkey"
+ foreignKeyName: "userAttribute_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "userAttribute_userAttributeCategoryId_fkey"
+ columns: ["userAttributeCategoryId"]
+ isOneToOne: false
+ referencedRelation: "userAttributeCategory"
+ referencedColumns: ["id"]
+ },
]
}
- unitOfMeasure: {
+ userAttributeCategory: {
Row: {
- active: boolean
- code: string
- companyId: string
+ active: boolean | null
+ companyId: string | null
createdAt: string
createdBy: string
- customFields: Json | null
id: string
name: string
+ protected: boolean | null
+ public: boolean | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- active?: boolean
- code: string
- companyId: string
+ active?: boolean | null
+ companyId?: string | null
createdAt?: string
createdBy: string
- customFields?: Json | null
id?: string
name: string
+ protected?: boolean | null
+ public?: boolean | null
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- active?: boolean
- code?: string
- companyId?: string
+ active?: boolean | null
+ companyId?: string | null
createdAt?: string
createdBy?: string
- customFields?: Json | null
id?: string
name?: string
+ protected?: boolean | null
+ public?: boolean | null
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "unitOfMeasure_companyId_fkey"
+ foreignKeyName: "userAttributeCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_companyId_fkey"
+ foreignKeyName: "userAttributeCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_companyId_fkey"
+ foreignKeyName: "userAttributeCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "unitOfMeasure_companyId_fkey"
+ foreignKeyName: "userAttributeCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "unitOfMeasure_createdBy_fkey"
+ foreignKeyName: "userAttributeCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_createdBy_fkey"
+ foreignKeyName: "userAttributeCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_createdBy_fkey"
+ foreignKeyName: "userAttributeCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_createdBy_fkey"
+ foreignKeyName: "userAttributeCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_createdBy_fkey"
+ foreignKeyName: "userAttributeCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "unitOfMeasure_updatedBy_fkey"
+ foreignKeyName: "userAttributeCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_updatedBy_fkey"
+ foreignKeyName: "userAttributeCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_updatedBy_fkey"
+ foreignKeyName: "userAttributeCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_updatedBy_fkey"
+ foreignKeyName: "userAttributeCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "unitOfMeasure_updatedBy_fkey"
+ foreignKeyName: "userAttributeCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -19656,1007 +20557,994 @@ export type Database = {
},
]
}
- user: {
- Row: {
- about: string
- active: boolean | null
- admin: boolean | null
- avatarUrl: string | null
- createdAt: string
- developer: boolean | null
- email: string
- firstName: string
- fullName: string | null
- id: string
- lastName: string
- updatedAt: string | null
- }
- Insert: {
- about?: string
- active?: boolean | null
- admin?: boolean | null
- avatarUrl?: string | null
- createdAt?: string
- developer?: boolean | null
- email: string
- firstName: string
- fullName?: string | null
- id: string
- lastName: string
- updatedAt?: string | null
- }
- Update: {
- about?: string
- active?: boolean | null
- admin?: boolean | null
- avatarUrl?: string | null
- createdAt?: string
- developer?: boolean | null
- email?: string
- firstName?: string
- fullName?: string | null
- id?: string
- lastName?: string
- updatedAt?: string | null
- }
- Relationships: []
- }
- userAttribute: {
+ userAttributeValue: {
Row: {
- active: boolean | null
- attributeDataTypeId: number
- canSelfManage: boolean | null
createdAt: string
createdBy: string
id: string
- listOptions: string[] | null
- name: string
- sortOrder: number
updatedAt: string | null
updatedBy: string | null
- userAttributeCategoryId: string
+ userAttributeId: string
+ userId: string
+ valueBoolean: boolean | null
+ valueDate: string | null
+ valueNumeric: number | null
+ valueText: string | null
+ valueUser: string | null
}
Insert: {
- active?: boolean | null
- attributeDataTypeId: number
- canSelfManage?: boolean | null
createdAt?: string
createdBy: string
id?: string
- listOptions?: string[] | null
- name: string
- sortOrder?: number
updatedAt?: string | null
updatedBy?: string | null
- userAttributeCategoryId: string
+ userAttributeId: string
+ userId: string
+ valueBoolean?: boolean | null
+ valueDate?: string | null
+ valueNumeric?: number | null
+ valueText?: string | null
+ valueUser?: string | null
}
Update: {
- active?: boolean | null
- attributeDataTypeId?: number
- canSelfManage?: boolean | null
createdAt?: string
createdBy?: string
id?: string
- listOptions?: string[] | null
- name?: string
- sortOrder?: number
updatedAt?: string | null
updatedBy?: string | null
- userAttributeCategoryId?: string
+ userAttributeId?: string
+ userId?: string
+ valueBoolean?: boolean | null
+ valueDate?: string | null
+ valueNumeric?: number | null
+ valueText?: string | null
+ valueUser?: string | null
}
Relationships: [
{
- foreignKeyName: "userAttribute_attributeDataTypeId_fkey"
- columns: ["attributeDataTypeId"]
- isOneToOne: false
- referencedRelation: "attributeDataType"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "userAttribute_createdBy_fkey"
+ foreignKeyName: "userAttributeValue_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_createdBy_fkey"
+ foreignKeyName: "userAttributeValue_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_createdBy_fkey"
+ foreignKeyName: "userAttributeValue_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_createdBy_fkey"
+ foreignKeyName: "userAttributeValue_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_createdBy_fkey"
+ foreignKeyName: "userAttributeValue_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "userAttribute_updatedBy_fkey"
+ foreignKeyName: "userAttributeValue_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_updatedBy_fkey"
+ foreignKeyName: "userAttributeValue_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_updatedBy_fkey"
+ foreignKeyName: "userAttributeValue_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_updatedBy_fkey"
+ foreignKeyName: "userAttributeValue_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttribute_updatedBy_fkey"
+ foreignKeyName: "userAttributeValue_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "userAttribute_userAttributeCategoryId_fkey"
- columns: ["userAttributeCategoryId"]
+ foreignKeyName: "userAttributeValue_userAttributeId_fkey"
+ columns: ["userAttributeId"]
isOneToOne: false
- referencedRelation: "userAttributeCategory"
+ referencedRelation: "userAttribute"
referencedColumns: ["id"]
},
- ]
- }
- userAttributeCategory: {
- Row: {
- active: boolean | null
- companyId: string | null
- createdAt: string
- createdBy: string
- id: string
- name: string
- protected: boolean | null
- public: boolean | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- active?: boolean | null
- companyId?: string | null
- createdAt?: string
- createdBy: string
- id?: string
- name: string
- protected?: boolean | null
- public?: boolean | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- active?: boolean | null
- companyId?: string | null
- createdAt?: string
- createdBy?: string
- id?: string
- name?: string
- protected?: boolean | null
- public?: boolean | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
{
- foreignKeyName: "userAttributeCategory_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "userAttributeValue_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "userAttributeValue_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "userAttributeValue_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "userAttributeValue_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userAttributeValue_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "userAttributeValue_valueUser_fkey"
+ columns: ["valueUser"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userAttributeValue_valueUser_fkey"
+ columns: ["valueUser"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userAttributeValue_valueUser_fkey"
+ columns: ["valueUser"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userAttributeValue_valueUser_fkey"
+ columns: ["valueUser"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userAttributeValue_valueUser_fkey"
+ columns: ["valueUser"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ userPermission: {
+ Row: {
+ id: string
+ permissions: Json | null
+ }
+ Insert: {
+ id: string
+ permissions?: Json | null
+ }
+ Update: {
+ id?: string
+ permissions?: Json | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "userPermission_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
{
- foreignKeyName: "userAttributeCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "userPermission_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "userPermission_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "userPermission_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "userPermission_id_fkey"
+ columns: ["id"]
+ isOneToOne: true
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ userToCompany: {
+ Row: {
+ companyId: string
+ role: Database["public"]["Enums"]["role"]
+ userId: string
+ }
+ Insert: {
+ companyId: string
+ role: Database["public"]["Enums"]["role"]
+ userId: string
+ }
+ Update: {
+ companyId?: string
+ role?: Database["public"]["Enums"]["role"]
+ userId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "userToCompany_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "userToCompany_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "userToCompany_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "userToCompany_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- userAttributeValue: {
+ warehouse: {
Row: {
+ active: boolean
+ companyId: string
createdAt: string
createdBy: string
id: string
+ locationId: string
+ name: string
+ requiresBin: boolean
+ requiresPick: boolean
+ requiresPutAway: boolean
+ requiresReceive: boolean
+ requiresShipment: boolean
updatedAt: string | null
updatedBy: string | null
- userAttributeId: string
- userId: string
- valueBoolean: boolean | null
- valueDate: string | null
- valueNumeric: number | null
- valueText: string | null
- valueUser: string | null
}
Insert: {
+ active?: boolean
+ companyId: string
createdAt?: string
createdBy: string
id?: string
+ locationId: string
+ name: string
+ requiresBin?: boolean
+ requiresPick?: boolean
+ requiresPutAway?: boolean
+ requiresReceive?: boolean
+ requiresShipment?: boolean
updatedAt?: string | null
updatedBy?: string | null
- userAttributeId: string
- userId: string
- valueBoolean?: boolean | null
- valueDate?: string | null
- valueNumeric?: number | null
- valueText?: string | null
- valueUser?: string | null
}
Update: {
+ active?: boolean
+ companyId?: string
createdAt?: string
createdBy?: string
id?: string
+ locationId?: string
+ name?: string
+ requiresBin?: boolean
+ requiresPick?: boolean
+ requiresPutAway?: boolean
+ requiresReceive?: boolean
+ requiresShipment?: boolean
updatedAt?: string | null
updatedBy?: string | null
- userAttributeId?: string
- userId?: string
- valueBoolean?: boolean | null
- valueDate?: string | null
- valueNumeric?: number | null
- valueText?: string | null
- valueUser?: string | null
}
Relationships: [
{
- foreignKeyName: "userAttributeValue_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "warehouse_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "warehouse_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "warehouse_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "userAttributeValue_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "warehouse_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "userAttributeValue_createdBy_fkey"
+ foreignKeyName: "warehouse_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "userAttributeValue_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "warehouse_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "warehouse_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "warehouse_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "warehouse_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "userAttributeValue_userAttributeId_fkey"
- columns: ["userAttributeId"]
- isOneToOne: false
- referencedRelation: "userAttribute"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "userAttributeValue_userId_fkey"
- columns: ["userId"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "userAttributeValue_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "warehouse_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "userAttributeValue_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "warehouse_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "warehouse_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "userAttributeValue_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "warehouse_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "userAttributeValue_valueUser_fkey"
- columns: ["valueUser"]
+ foreignKeyName: "warehouse_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_valueUser_fkey"
- columns: ["valueUser"]
+ foreignKeyName: "warehouse_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_valueUser_fkey"
- columns: ["valueUser"]
+ foreignKeyName: "warehouse_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_valueUser_fkey"
- columns: ["valueUser"]
+ foreignKeyName: "warehouse_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userAttributeValue_valueUser_fkey"
- columns: ["valueUser"]
+ foreignKeyName: "warehouse_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- userPermission: {
+ workCenter: {
Row: {
+ active: boolean
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ defaultStandardFactor: Database["public"]["Enums"]["factor"]
+ description: string | null
id: string
- permissions: Json | null
+ laborRate: number
+ locationId: string | null
+ machineRate: number
+ name: string
+ overheadRate: number
+ requiredAbilityId: string | null
+ updatedAt: string | null
+ updatedBy: string | null
}
Insert: {
- id: string
- permissions?: Json | null
+ active?: boolean
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ defaultStandardFactor?: Database["public"]["Enums"]["factor"]
+ description?: string | null
+ id?: string
+ laborRate?: number
+ locationId?: string | null
+ machineRate?: number
+ name: string
+ overheadRate?: number
+ requiredAbilityId?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Update: {
+ active?: boolean
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ defaultStandardFactor?: Database["public"]["Enums"]["factor"]
+ description?: string | null
id?: string
- permissions?: Json | null
+ laborRate?: number
+ locationId?: string | null
+ machineRate?: number
+ name?: string
+ overheadRate?: number
+ requiredAbilityId?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "userPermission_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "workCenter_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "workCenter_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "workCenter_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "workCenter_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "workCenter_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userPermission_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "workCenter_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userPermission_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "workCenter_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userPermission_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "workCenter_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userPermission_id_fkey"
- columns: ["id"]
- isOneToOne: true
+ foreignKeyName: "workCenter_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- userToCompany: {
- Row: {
- companyId: string
- role: Database["public"]["Enums"]["role"]
- userId: string
- }
- Insert: {
- companyId: string
- role: Database["public"]["Enums"]["role"]
- userId: string
- }
- Update: {
- companyId?: string
- role?: Database["public"]["Enums"]["role"]
- userId?: string
- }
- Relationships: [
{
- foreignKeyName: "userToCompany_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "workCenter_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "workCenter_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "workCenter_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "workCenter_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "workCenter_requiredAbilityId_fkey"
+ columns: ["requiredAbilityId"]
+ isOneToOne: false
+ referencedRelation: "ability"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "workCenter_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "workCenter_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "workCenter_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "workCenter_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "workCenter_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- warehouse: {
+ workCenterProcess: {
Row: {
- active: boolean
companyId: string
createdAt: string
createdBy: string
- id: string
- locationId: string
- name: string
- requiresBin: boolean
- requiresPick: boolean
- requiresPutAway: boolean
- requiresReceive: boolean
- requiresShipment: boolean
+ processId: string
updatedAt: string | null
updatedBy: string | null
+ workCenterId: string
}
Insert: {
- active?: boolean
companyId: string
createdAt?: string
createdBy: string
- id?: string
- locationId: string
- name: string
- requiresBin?: boolean
- requiresPick?: boolean
- requiresPutAway?: boolean
- requiresReceive?: boolean
- requiresShipment?: boolean
+ processId: string
updatedAt?: string | null
updatedBy?: string | null
+ workCenterId: string
}
Update: {
- active?: boolean
companyId?: string
createdAt?: string
createdBy?: string
- id?: string
- locationId?: string
- name?: string
- requiresBin?: boolean
- requiresPick?: boolean
- requiresPutAway?: boolean
- requiresReceive?: boolean
- requiresShipment?: boolean
+ processId?: string
updatedAt?: string | null
updatedBy?: string | null
+ workCenterId?: string
}
Relationships: [
{
- foreignKeyName: "warehouse_companyId_fkey"
+ foreignKeyName: "workCenterProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_companyId_fkey"
+ foreignKeyName: "workCenterProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_companyId_fkey"
+ foreignKeyName: "workCenterProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "warehouse_companyId_fkey"
+ foreignKeyName: "workCenterProcess_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "warehouse_createdBy_fkey"
+ foreignKeyName: "workCenterProcess_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_createdBy_fkey"
+ foreignKeyName: "workCenterProcess_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_createdBy_fkey"
+ foreignKeyName: "workCenterProcess_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_createdBy_fkey"
+ foreignKeyName: "workCenterProcess_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_createdBy_fkey"
+ foreignKeyName: "workCenterProcess_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "warehouse_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "warehouse_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "workCenterProcess_processId_fkey"
+ columns: ["processId"]
isOneToOne: false
- referencedRelation: "location"
+ referencedRelation: "process"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "warehouse_locationId_fkey"
- columns: ["locationId"]
+ foreignKeyName: "workCenterProcess_processId_fkey"
+ columns: ["processId"]
isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
+ referencedRelation: "processes"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_updatedBy_fkey"
+ foreignKeyName: "workCenterProcess_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_updatedBy_fkey"
+ foreignKeyName: "workCenterProcess_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_updatedBy_fkey"
+ foreignKeyName: "workCenterProcess_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_updatedBy_fkey"
+ foreignKeyName: "workCenterProcess_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "warehouse_updatedBy_fkey"
+ foreignKeyName: "workCenterProcess_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "workCenterProcess_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenter"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "workCenterProcess_workCenterId_fkey"
+ columns: ["workCenterId"]
+ isOneToOne: false
+ referencedRelation: "workCenters"
+ referencedColumns: ["id"]
+ },
]
}
- workCenter: {
+ }
+ Views: {
+ accountCategories: {
Row: {
- active: boolean
- companyId: string
- createdAt: string
- createdBy: string
+ category: string | null
+ class: Database["public"]["Enums"]["glAccountClass"] | null
+ companyId: string | null
+ createdAt: string | null
+ createdBy: string | null
customFields: Json | null
- defaultStandardFactor: Database["public"]["Enums"]["factor"]
- description: string | null
- id: string
- laborRate: number
- locationId: string | null
- machineRate: number
- name: string
- overheadRate: number
- requiredAbilityId: string | null
+ id: string | null
+ incomeBalance: Database["public"]["Enums"]["glIncomeBalance"] | null
+ subCategoriesCount: number | null
updatedAt: string | null
updatedBy: string | null
}
Insert: {
- active?: boolean
- companyId: string
- createdAt?: string
- createdBy: string
+ category?: string | null
+ class?: Database["public"]["Enums"]["glAccountClass"] | null
+ companyId?: string | null
+ createdAt?: string | null
+ createdBy?: string | null
customFields?: Json | null
- defaultStandardFactor?: Database["public"]["Enums"]["factor"]
- description?: string | null
- id?: string
- laborRate?: number
- locationId?: string | null
- machineRate?: number
- name: string
- overheadRate?: number
- requiredAbilityId?: string | null
+ id?: string | null
+ incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
+ subCategoriesCount?: never
updatedAt?: string | null
updatedBy?: string | null
}
Update: {
- active?: boolean
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- defaultStandardFactor?: Database["public"]["Enums"]["factor"]
- description?: string | null
- id?: string
- laborRate?: number
- locationId?: string | null
- machineRate?: number
- name?: string
- overheadRate?: number
- requiredAbilityId?: string | null
+ category?: string | null
+ class?: Database["public"]["Enums"]["glAccountClass"] | null
+ companyId?: string | null
+ createdAt?: string | null
+ createdBy?: string | null
+ customFields?: Json | null
+ id?: string | null
+ incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
+ subCategoriesCount?: never
updatedAt?: string | null
updatedBy?: string | null
}
Relationships: [
{
- foreignKeyName: "workCenter_companyId_fkey"
+ foreignKeyName: "accountCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_companyId_fkey"
+ foreignKeyName: "accountCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_companyId_fkey"
+ foreignKeyName: "accountCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "workCenter_companyId_fkey"
+ foreignKeyName: "accountCategory_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "workCenter_createdBy_fkey"
+ foreignKeyName: "accountCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_createdBy_fkey"
+ foreignKeyName: "accountCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_createdBy_fkey"
+ foreignKeyName: "accountCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_createdBy_fkey"
+ foreignKeyName: "accountCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_createdBy_fkey"
+ foreignKeyName: "accountCategory_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "workCenter_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "workCenter_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "workCenter_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "workCenter_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "salesOrders"
- referencedColumns: ["locationId"]
- },
- {
- foreignKeyName: "workCenter_requiredAbilityId_fkey"
- columns: ["requiredAbilityId"]
- isOneToOne: false
- referencedRelation: "ability"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "workCenter_updatedBy_fkey"
+ foreignKeyName: "accountCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_updatedBy_fkey"
+ foreignKeyName: "accountCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_updatedBy_fkey"
+ foreignKeyName: "accountCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_updatedBy_fkey"
+ foreignKeyName: "accountCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenter_updatedBy_fkey"
+ foreignKeyName: "accountCategory_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
@@ -20664,1339 +21552,1497 @@ export type Database = {
},
]
}
- workCenterProcess: {
+ accounts: {
Row: {
- companyId: string
- createdAt: string
- createdBy: string
- processId: string
+ accountCategory: string | null
+ accountCategoryId: string | null
+ accountSubCategory: string | null
+ accountSubcategoryId: string | null
+ active: boolean | null
+ class: Database["public"]["Enums"]["glAccountClass"] | null
+ companyId: string | null
+ consolidatedRate:
+ | Database["public"]["Enums"]["glConsolidatedRate"]
+ | null
+ createdAt: string | null
+ createdBy: string | null
+ customFields: Json | null
+ directPosting: boolean | null
+ id: string | null
+ incomeBalance: Database["public"]["Enums"]["glIncomeBalance"] | null
+ name: string | null
+ number: string | null
+ type: Database["public"]["Enums"]["glAccountType"] | null
updatedAt: string | null
updatedBy: string | null
- workCenterId: string
}
Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- processId: string
+ accountCategory?: never
+ accountCategoryId?: string | null
+ accountSubCategory?: never
+ accountSubcategoryId?: string | null
+ active?: boolean | null
+ class?: Database["public"]["Enums"]["glAccountClass"] | null
+ companyId?: string | null
+ consolidatedRate?:
+ | Database["public"]["Enums"]["glConsolidatedRate"]
+ | null
+ createdAt?: string | null
+ createdBy?: string | null
+ customFields?: Json | null
+ directPosting?: boolean | null
+ id?: string | null
+ incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
+ name?: string | null
+ number?: string | null
+ type?: Database["public"]["Enums"]["glAccountType"] | null
updatedAt?: string | null
updatedBy?: string | null
- workCenterId: string
}
Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- processId?: string
+ accountCategory?: never
+ accountCategoryId?: string | null
+ accountSubCategory?: never
+ accountSubcategoryId?: string | null
+ active?: boolean | null
+ class?: Database["public"]["Enums"]["glAccountClass"] | null
+ companyId?: string | null
+ consolidatedRate?:
+ | Database["public"]["Enums"]["glConsolidatedRate"]
+ | null
+ createdAt?: string | null
+ createdBy?: string | null
+ customFields?: Json | null
+ directPosting?: boolean | null
+ id?: string | null
+ incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
+ name?: string | null
+ number?: string | null
+ type?: Database["public"]["Enums"]["glAccountType"] | null
updatedAt?: string | null
updatedBy?: string | null
- workCenterId?: string
}
Relationships: [
{
- foreignKeyName: "workCenterProcess_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "account_accountCategoryId_fkey"
+ columns: ["accountCategoryId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "accountCategory"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_companyId_fkey"
+ foreignKeyName: "account_accountCategoryId_fkey"
+ columns: ["accountCategoryId"]
+ isOneToOne: false
+ referencedRelation: "accountCategories"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "account_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_companyId_fkey"
+ foreignKeyName: "account_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "account_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "workCenterProcess_companyId_fkey"
+ foreignKeyName: "account_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "workCenterProcess_createdBy_fkey"
+ foreignKeyName: "account_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_createdBy_fkey"
+ foreignKeyName: "account_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_createdBy_fkey"
+ foreignKeyName: "account_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_createdBy_fkey"
+ foreignKeyName: "account_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_createdBy_fkey"
+ foreignKeyName: "account_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "workCenterProcess_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "account_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "process"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_processId_fkey"
- columns: ["processId"]
+ foreignKeyName: "account_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "processes"
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "account_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "account_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_updatedBy_fkey"
+ foreignKeyName: "account_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ companies: {
+ Row: {
+ addressLine1: string | null
+ addressLine2: string | null
+ city: string | null
+ companyId: string | null
+ countryCode: string | null
+ email: string | null
+ employeeType: string | null
+ fax: string | null
+ id: string | null
+ logo: string | null
+ name: string | null
+ phone: string | null
+ postalCode: string | null
+ role: Database["public"]["Enums"]["role"] | null
+ state: string | null
+ taxId: string | null
+ updatedBy: string | null
+ userId: string | null
+ website: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "accountDefault_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_updatedBy_fkey"
+ foreignKeyName: "accountDefault_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_updatedBy_fkey"
+ foreignKeyName: "accountDefault_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_updatedBy_fkey"
+ foreignKeyName: "accountDefault_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "workCenterProcess_updatedBy_fkey"
+ foreignKeyName: "accountDefault_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "workCenterProcess_workCenterId_fkey"
- columns: ["workCenterId"]
- isOneToOne: false
- referencedRelation: "workCenter"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "workCenterProcess_workCenterId_fkey"
- columns: ["workCenterId"]
- isOneToOne: false
- referencedRelation: "workCenters"
- referencedColumns: ["id"]
- },
- ]
- }
- }
- Views: {
- accountCategories: {
- Row: {
- category: string | null
- class: Database["public"]["Enums"]["glAccountClass"] | null
- companyId: string | null
- createdAt: string | null
- createdBy: string | null
- customFields: Json | null
- id: string | null
- incomeBalance: Database["public"]["Enums"]["glIncomeBalance"] | null
- subCategoriesCount: number | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- category?: string | null
- class?: Database["public"]["Enums"]["glAccountClass"] | null
- companyId?: string | null
- createdAt?: string | null
- createdBy?: string | null
- customFields?: Json | null
- id?: string | null
- incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
- subCategoriesCount?: never
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- category?: string | null
- class?: Database["public"]["Enums"]["glAccountClass"] | null
- companyId?: string | null
- createdAt?: string | null
- createdBy?: string | null
- customFields?: Json | null
- id?: string | null
- incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
- subCategoriesCount?: never
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "accountCategory_companyId_fkey"
+ foreignKeyName: "userToCompany_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_companyId_fkey"
+ foreignKeyName: "userToCompany_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_companyId_fkey"
+ foreignKeyName: "userToCompany_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "accountCategory_companyId_fkey"
+ foreignKeyName: "userToCompany_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "userToCompany_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ consumables: {
+ Row: {
+ active: boolean | null
+ approved: boolean | null
+ approvedBy: string | null
+ assignee: string | null
+ companyId: string | null
+ createdAt: string | null
+ createdBy: string | null
+ customFields: Json | null
+ defaultMethodType: Database["public"]["Enums"]["methodType"] | null
+ description: string | null
+ id: string | null
+ itemId: string | null
+ itemTrackingType:
+ | Database["public"]["Enums"]["itemTrackingType"]
+ | null
+ name: string | null
+ replenishmentSystem:
+ | Database["public"]["Enums"]["itemReplenishmentSystem"]
+ | null
+ supplierIds: string[] | null
+ unitOfMeasure: string | null
+ unitOfMeasureCode: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "consumable_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "consumable_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "consumable_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "consumable_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "consumable_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- accounts: {
- Row: {
- accountCategory: string | null
- accountCategoryId: string | null
- accountSubCategory: string | null
- accountSubcategoryId: string | null
- active: boolean | null
- class: Database["public"]["Enums"]["glAccountClass"] | null
- companyId: string | null
- consolidatedRate:
- | Database["public"]["Enums"]["glConsolidatedRate"]
- | null
- createdAt: string | null
- createdBy: string | null
- customFields: Json | null
- directPosting: boolean | null
- id: string | null
- incomeBalance: Database["public"]["Enums"]["glIncomeBalance"] | null
- name: string | null
- number: string | null
- type: Database["public"]["Enums"]["glAccountType"] | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- accountCategory?: never
- accountCategoryId?: string | null
- accountSubCategory?: never
- accountSubcategoryId?: string | null
- active?: boolean | null
- class?: Database["public"]["Enums"]["glAccountClass"] | null
- companyId?: string | null
- consolidatedRate?:
- | Database["public"]["Enums"]["glConsolidatedRate"]
- | null
- createdAt?: string | null
- createdBy?: string | null
- customFields?: Json | null
- directPosting?: boolean | null
- id?: string | null
- incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
- name?: string | null
- number?: string | null
- type?: Database["public"]["Enums"]["glAccountType"] | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- accountCategory?: never
- accountCategoryId?: string | null
- accountSubCategory?: never
- accountSubcategoryId?: string | null
- active?: boolean | null
- class?: Database["public"]["Enums"]["glAccountClass"] | null
- companyId?: string | null
- consolidatedRate?:
- | Database["public"]["Enums"]["glConsolidatedRate"]
- | null
- createdAt?: string | null
- createdBy?: string | null
- customFields?: Json | null
- directPosting?: boolean | null
- id?: string | null
- incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
- name?: string | null
- number?: string | null
- type?: Database["public"]["Enums"]["glAccountType"] | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "account_accountCategoryId_fkey"
- columns: ["accountCategoryId"]
- isOneToOne: false
- referencedRelation: "accountCategory"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "account_accountCategoryId_fkey"
- columns: ["accountCategoryId"]
- isOneToOne: false
- referencedRelation: "accountCategories"
- referencedColumns: ["id"]
- },
{
- foreignKeyName: "account_companyId_fkey"
+ foreignKeyName: "consumable_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_companyId_fkey"
+ foreignKeyName: "consumable_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_companyId_fkey"
+ foreignKeyName: "consumable_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "account_companyId_fkey"
+ foreignKeyName: "consumable_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "account_createdBy_fkey"
+ foreignKeyName: "consumable_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_createdBy_fkey"
+ foreignKeyName: "consumable_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_createdBy_fkey"
+ foreignKeyName: "consumable_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_createdBy_fkey"
+ foreignKeyName: "consumable_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_createdBy_fkey"
+ foreignKeyName: "consumable_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "account_updatedBy_fkey"
+ foreignKeyName: "consumable_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "consumable_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "consumable_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_updatedBy_fkey"
+ foreignKeyName: "consumable_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_updatedBy_fkey"
+ foreignKeyName: "consumable_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_updatedBy_fkey"
+ foreignKeyName: "consumable_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "account_updatedBy_fkey"
+ foreignKeyName: "consumable_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
]
}
- companies: {
+ contractors: {
Row: {
- addressLine1: string | null
- addressLine2: string | null
- city: string | null
+ abilityIds: string[] | null
+ active: boolean | null
companyId: string | null
- countryCode: string | null
+ customFields: Json | null
email: string | null
- employeeType: string | null
- fax: string | null
+ firstName: string | null
+ hoursPerWeek: number | null
+ lastName: string | null
+ supplierContactId: string | null
+ supplierId: string | null
+ supplierName: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "contractor_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "contractor_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "contractor_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "contractor_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "contractor_id_fkey"
+ columns: ["supplierContactId"]
+ isOneToOne: true
+ referencedRelation: "supplierContact"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
+ customers: {
+ Row: {
+ accountManagerId: string | null
+ assignee: string | null
+ companyId: string | null
+ createdAt: string | null
+ createdBy: string | null
+ customerStatusId: string | null
+ customerTypeId: string | null
+ customFields: Json | null
id: string | null
logo: string | null
name: string | null
- phone: string | null
- postalCode: string | null
- role: Database["public"]["Enums"]["role"] | null
- state: string | null
+ orderCount: number | null
+ status: string | null
taxId: string | null
+ type: string | null
+ updatedAt: string | null
updatedBy: string | null
- userId: string | null
- website: string | null
}
Relationships: [
{
- foreignKeyName: "accountDefault_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "customer_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountDefault_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "customer_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountDefault_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "customer_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountDefault_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "customer_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "accountDefault_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "customer_accountManagerId_fkey"
+ columns: ["accountManagerId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
+ foreignKeyName: "customer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_assignee_fkey"
+ columns: ["assignee"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "customer_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
+ foreignKeyName: "customer_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "customer_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "customer_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "customer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "customer_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "customer_customerStatusId_fkey"
+ columns: ["customerStatusId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "customerStatus"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "customer_customerTypeId_fkey"
+ columns: ["customerTypeId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "customerType"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "customer_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "customer_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "customer_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "customer_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "userToCompany_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "customer_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- consumables: {
+ customFieldTables: {
Row: {
- active: boolean | null
- approved: boolean | null
- approvedBy: string | null
- assignee: string | null
companyId: string | null
- createdAt: string | null
- createdBy: string | null
- customFields: Json | null
- defaultMethodType: Database["public"]["Enums"]["methodType"] | null
- description: string | null
- id: string | null
- itemId: string | null
- itemTrackingType:
- | Database["public"]["Enums"]["itemTrackingType"]
- | null
+ fields: Json | null
+ module: Database["public"]["Enums"]["module"] | null
name: string | null
- replenishmentSystem:
- | Database["public"]["Enums"]["itemReplenishmentSystem"]
- | null
- supplierIds: string[] | null
- unitOfMeasure: string | null
- unitOfMeasureCode: string | null
- updatedAt: string | null
- updatedBy: string | null
+ table: string | null
+ }
+ Relationships: []
+ }
+ documentExtensions: {
+ Row: {
+ extension: string | null
+ }
+ Relationships: []
+ }
+ documentLabels: {
+ Row: {
+ label: string | null
+ userId: string | null
}
Relationships: [
{
- foreignKeyName: "consumable_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "documentLabels_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "documentLabels_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "documentLabels_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "documentLabels_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "documentLabels_userId_fkey"
+ columns: ["userId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ documents: {
+ Row: {
+ active: boolean | null
+ companyId: string | null
+ createdAt: string | null
+ createdBy: string | null
+ description: string | null
+ extension: string | null
+ favorite: boolean | null
+ id: string | null
+ labels: string[] | null
+ lastActivityAt: string | null
+ name: string | null
+ path: string | null
+ readGroups: string[] | null
+ size: number | null
+ sourceDocument:
+ | Database["public"]["Enums"]["documentSourceType"]
+ | null
+ sourceDocumentId: string | null
+ type: Database["public"]["Enums"]["documentType"] | null
+ updatedAt: string | null
+ updatedBy: string | null
+ writeGroups: string[] | null
+ }
+ Relationships: [
{
- foreignKeyName: "consumable_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "consumable_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "consumable_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "consumable_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "consumable_createdBy_fkey"
+ foreignKeyName: "document_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_createdBy_fkey"
+ foreignKeyName: "document_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_createdBy_fkey"
+ foreignKeyName: "document_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_createdBy_fkey"
+ foreignKeyName: "document_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_createdBy_fkey"
+ foreignKeyName: "document_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "consumable_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "consumable_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
- },
- {
- foreignKeyName: "consumable_updatedBy_fkey"
+ foreignKeyName: "document_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_updatedBy_fkey"
+ foreignKeyName: "document_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_updatedBy_fkey"
+ foreignKeyName: "document_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_updatedBy_fkey"
+ foreignKeyName: "document_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "consumable_updatedBy_fkey"
+ foreignKeyName: "document_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ ]
+ }
+ employees: {
+ Row: {
+ active: boolean | null
+ avatarUrl: string | null
+ companyId: string | null
+ email: string | null
+ employeeTypeId: string | null
+ firstName: string | null
+ id: string | null
+ lastName: string | null
+ name: string | null
+ }
+ Relationships: [
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "employee_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "employee_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "employee_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "employee_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "employee_employeeTypeId_fkey"
+ columns: ["employeeTypeId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "employeeType"
+ referencedColumns: ["id"]
},
]
}
- contractors: {
+ employeesAcrossCompanies: {
Row: {
- abilityIds: string[] | null
active: boolean | null
- companyId: string | null
- customFields: Json | null
+ avatarUrl: string | null
+ companyId: string[] | null
email: string | null
firstName: string | null
- hoursPerWeek: number | null
+ id: string | null
lastName: string | null
- supplierContactId: string | null
- supplierId: string | null
- supplierName: string | null
+ name: string | null
+ }
+ Relationships: []
+ }
+ employeeSummary: {
+ Row: {
+ avatarUrl: string | null
+ companyId: string | null
+ departmentName: string | null
+ id: string | null
+ locationName: string | null
+ managerName: string | null
+ name: string | null
+ startDate: string | null
+ title: string | null
}
Relationships: [
{
- foreignKeyName: "contractor_companyId_fkey"
+ foreignKeyName: "employee_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "contractor_companyId_fkey"
+ foreignKeyName: "employee_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "contractor_companyId_fkey"
+ foreignKeyName: "employee_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "contractor_companyId_fkey"
+ foreignKeyName: "employee_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
- {
- foreignKeyName: "contractor_id_fkey"
- columns: ["supplierContactId"]
- isOneToOne: true
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
- },
]
}
- customers: {
+ fixtures: {
Row: {
- accountManagerId: string | null
+ active: boolean | null
+ approved: boolean | null
+ approvedBy: string | null
assignee: string | null
+ autodeskUrn: string | null
companyId: string | null
createdAt: string | null
createdBy: string | null
- customerStatusId: string | null
- customerTypeId: string | null
+ customer: string | null
+ customerId: string | null
customFields: Json | null
+ defaultMethodType: Database["public"]["Enums"]["methodType"] | null
+ description: string | null
id: string | null
- logo: string | null
+ itemId: string | null
+ itemTrackingType:
+ | Database["public"]["Enums"]["itemTrackingType"]
+ | null
+ modelId: string | null
+ modelName: string | null
+ modelPath: string | null
+ modelSize: number | null
name: string | null
- orderCount: number | null
- status: string | null
- taxId: string | null
- type: string | null
+ replenishmentSystem:
+ | Database["public"]["Enums"]["itemReplenishmentSystem"]
+ | null
+ supplierIds: string[] | null
+ thumbnailPath: string | null
updatedAt: string | null
updatedBy: string | null
}
Relationships: [
{
- foreignKeyName: "customer_accountManagerId_fkey"
- columns: ["accountManagerId"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "customer_accountManagerId_fkey"
- columns: ["accountManagerId"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "customer_accountManagerId_fkey"
- columns: ["accountManagerId"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "customer_accountManagerId_fkey"
- columns: ["accountManagerId"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "customer_accountManagerId_fkey"
- columns: ["accountManagerId"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "customer_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "fixture_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "fixture_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "fixture_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "fixture_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "fixture_approvedBy_fkey"
+ columns: ["approvedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "customer_companyId_fkey"
+ foreignKeyName: "fixture_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_companyId_fkey"
+ foreignKeyName: "fixture_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_companyId_fkey"
+ foreignKeyName: "fixture_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "customer_companyId_fkey"
+ foreignKeyName: "fixture_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "customer_createdBy_fkey"
+ foreignKeyName: "fixture_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_createdBy_fkey"
+ foreignKeyName: "fixture_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_createdBy_fkey"
+ foreignKeyName: "fixture_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_createdBy_fkey"
+ foreignKeyName: "fixture_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_createdBy_fkey"
+ foreignKeyName: "fixture_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "customer_customerStatusId_fkey"
- columns: ["customerStatusId"]
+ foreignKeyName: "fixture_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "customerStatus"
+ referencedRelation: "customer"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_customerTypeId_fkey"
- columns: ["customerTypeId"]
+ foreignKeyName: "fixture_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "customerType"
+ referencedRelation: "customers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_updatedBy_fkey"
+ foreignKeyName: "fixture_customerId_fkey"
+ columns: ["customerId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderCustomers"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixture_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "item"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixture_itemId_fkey"
+ columns: ["itemId"]
+ isOneToOne: false
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
+ },
+ {
+ foreignKeyName: "fixture_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_updatedBy_fkey"
+ foreignKeyName: "fixture_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_updatedBy_fkey"
+ foreignKeyName: "fixture_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_updatedBy_fkey"
+ foreignKeyName: "fixture_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "customer_updatedBy_fkey"
+ foreignKeyName: "fixture_updatedBy_fkey"
columns: ["updatedBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- ]
- }
- customFieldTables: {
- Row: {
- companyId: string | null
- fields: Json | null
- module: Database["public"]["Enums"]["module"] | null
- name: string | null
- table: string | null
- }
- Relationships: []
- }
- documentExtensions: {
- Row: {
- extension: string | null
- }
- Relationships: []
- }
- documentLabels: {
- Row: {
- label: string | null
- userId: string | null
- }
- Relationships: [
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
+ foreignKeyName: "item_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- documents: {
+ groupMembers: {
Row: {
- active: boolean | null
companyId: string | null
- createdAt: string | null
- createdBy: string | null
- description: string | null
- extension: string | null
- favorite: boolean | null
- id: string | null
- labels: string[] | null
- lastActivityAt: string | null
+ groupId: string | null
+ id: number | null
+ isCustomerOrgGroup: boolean | null
+ isCustomerTypeGroup: boolean | null
+ isEmployeeTypeGroup: boolean | null
+ isIdentityGroup: boolean | null
+ isSupplierOrgGroup: boolean | null
+ isSupplierTypeGroup: boolean | null
+ memberGroupId: string | null
+ memberUserId: string | null
name: string | null
- path: string | null
- readGroups: string[] | null
- size: number | null
- sourceDocument:
- | Database["public"]["Enums"]["documentSourceType"]
- | null
- sourceDocumentId: string | null
- type: Database["public"]["Enums"]["documentType"] | null
- updatedAt: string | null
- updatedBy: string | null
- writeGroups: string[] | null
+ user: Json | null
}
Relationships: [
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "group_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "group_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "group_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "group_companyId_fkey"
+ columns: ["companyId"]
isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
},
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "membership_groupId_fkey"
+ columns: ["groupId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "group"
referencedColumns: ["id"]
},
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
+ foreignKeyName: "membership_memberGroupId_fkey"
+ columns: ["memberGroupId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "group"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "membership_memberUserId_fkey"
+ columns: ["memberUserId"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
]
}
- employees: {
+ groups: {
Row: {
- active: boolean | null
- avatarUrl: string | null
companyId: string | null
- email: string | null
- employeeTypeId: string | null
- firstName: string | null
id: string | null
- lastName: string | null
+ isCustomerOrgGroup: boolean | null
+ isCustomerTypeGroup: boolean | null
+ isEmployeeTypeGroup: boolean | null
+ isSupplierOrgGroup: boolean | null
+ isSupplierTypeGroup: boolean | null
+ name: string | null
+ parentId: string | null
+ users: Json | null
+ }
+ Relationships: []
+ }
+ groups_recursive: {
+ Row: {
+ companyId: string | null
+ groupId: string | null
+ isCustomerOrgGroup: boolean | null
+ isCustomerTypeGroup: boolean | null
+ isEmployeeTypeGroup: boolean | null
+ isIdentityGroup: boolean | null
+ isSupplierOrgGroup: boolean | null
+ isSupplierTypeGroup: boolean | null
name: string | null
+ parentId: string | null
+ user: Json | null
+ }
+ Relationships: []
+ }
+ holidayYears: {
+ Row: {
+ companyId: string | null
+ year: number | null
}
Relationships: [
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "holiday_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "holiday_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "holiday_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "holiday_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
- {
- foreignKeyName: "employee_employeeTypeId_fkey"
- columns: ["employeeTypeId"]
- isOneToOne: false
- referencedRelation: "employeeType"
- referencedColumns: ["id"]
- },
]
}
- employeesAcrossCompanies: {
+ integrations: {
Row: {
active: boolean | null
- avatarUrl: string | null
- companyId: string[] | null
- email: string | null
- firstName: string | null
+ companyId: string | null
+ description: string | null
id: string | null
- lastName: string | null
- name: string | null
+ jsonschema: Json | null
+ logoPath: string | null
+ metadata: Json | null
+ title: string | null
+ visible: boolean | null
}
Relationships: []
}
- employeeSummary: {
+ itemQuantities: {
Row: {
- avatarUrl: string | null
companyId: string | null
- departmentName: string | null
- id: string | null
- locationName: string | null
- managerName: string | null
- name: string | null
- startDate: string | null
- title: string | null
+ itemId: string | null
+ locationId: string | null
+ quantityAvailable: number | null
+ quantityOnHand: number | null
+ quantityOnProdOrder: number | null
+ quantityOnPurchaseOrder: number | null
+ quantityOnSalesOrder: number | null
}
Relationships: [
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "item_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "item_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "item_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "employee_companyId_fkey"
+ foreignKeyName: "item_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
@@ -22004,461 +23050,329 @@ export type Database = {
},
]
}
- fixtures: {
+ jobs: {
Row: {
active: boolean | null
- approved: boolean | null
- approvedBy: string | null
assignee: string | null
autodeskUrn: string | null
companyId: string | null
createdAt: string | null
createdBy: string | null
- customer: string | null
customerId: string | null
customFields: Json | null
- defaultMethodType: Database["public"]["Enums"]["methodType"] | null
+ deadlineType: Database["public"]["Enums"]["deadlineType"] | null
description: string | null
+ dueDate: string | null
id: string | null
itemId: string | null
+ itemReadableId: string | null
itemTrackingType:
| Database["public"]["Enums"]["itemTrackingType"]
| null
+ itemType: Database["public"]["Enums"]["itemType"] | null
+ jobId: string | null
+ locationId: string | null
modelId: string | null
modelName: string | null
modelPath: string | null
modelSize: number | null
+ modelUploadId: string | null
name: string | null
+ notes: Json | null
+ productionQuantity: number | null
+ quantity: number | null
+ quantityComplete: number | null
+ quantityReceivedToInventory: number | null
+ quantityShipped: number | null
+ quoteId: string | null
+ quoteLineId: string | null
+ quoteReadableId: string | null
replenishmentSystem:
| Database["public"]["Enums"]["itemReplenishmentSystem"]
| null
- supplierIds: string[] | null
+ salesOrderId: string | null
+ salesOrderLineId: string | null
+ salesOrderReadableId: string | null
+ scrapQuantity: number | null
+ status: Database["public"]["Enums"]["jobStatus"] | null
thumbnailPath: string | null
+ unitOfMeasureCode: string | null
updatedAt: string | null
updatedBy: string | null
}
Relationships: [
{
- foreignKeyName: "fixture_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_approvedBy_fkey"
- columns: ["approvedBy"]
+ foreignKeyName: "job_assignee_fkey"
+ columns: ["assignee"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "fixture_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "company"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "companies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "customFieldTables"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "fixture_companyId_fkey"
+ foreignKeyName: "job_companyId_fkey"
columns: ["companyId"]
isOneToOne: false
referencedRelation: "integrations"
referencedColumns: ["companyId"]
},
{
- foreignKeyName: "fixture_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_createdBy_fkey"
+ foreignKeyName: "job_createdBy_fkey"
columns: ["createdBy"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "fixture_customerId_fkey"
- columns: ["customerId"]
- isOneToOne: false
- referencedRelation: "customer"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_customerId_fkey"
- columns: ["customerId"]
- isOneToOne: false
- referencedRelation: "customers"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_customerId_fkey"
- columns: ["customerId"]
- isOneToOne: false
- referencedRelation: "salesOrderCustomers"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "item"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixture_itemId_fkey"
- columns: ["itemId"]
- isOneToOne: false
- referencedRelation: "itemQuantities"
- referencedColumns: ["itemId"]
- },
- {
- foreignKeyName: "fixture_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
referencedRelation: "user"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "employeesAcrossCompanies"
referencedColumns: ["id"]
},
{
- foreignKeyName: "fixture_updatedBy_fkey"
- columns: ["updatedBy"]
+ foreignKeyName: "job_createdBy_fkey"
+ columns: ["createdBy"]
isOneToOne: false
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "job_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "customer"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "job_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "customers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "job_customerId_fkey"
+ columns: ["customerId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "salesOrderCustomers"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "job_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "item"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_assignee_fkey"
- columns: ["assignee"]
+ foreignKeyName: "job_itemId_fkey"
+ columns: ["itemId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["itemId"]
},
- ]
- }
- groupMembers: {
- Row: {
- companyId: string | null
- groupId: string | null
- id: number | null
- isCustomerOrgGroup: boolean | null
- isCustomerTypeGroup: boolean | null
- isEmployeeTypeGroup: boolean | null
- isIdentityGroup: boolean | null
- isSupplierOrgGroup: boolean | null
- isSupplierTypeGroup: boolean | null
- memberGroupId: string | null
- memberUserId: string | null
- name: string | null
- user: Json | null
- }
- Relationships: [
{
- foreignKeyName: "group_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "location"
referencedColumns: ["id"]
},
{
- foreignKeyName: "group_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
+ referencedRelation: "itemQuantities"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "group_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "purchaseOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "group_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_locationId_fkey"
+ columns: ["locationId"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["locationId"]
},
{
- foreignKeyName: "membership_groupId_fkey"
- columns: ["groupId"]
+ foreignKeyName: "job_quoteId_fkey"
+ columns: ["quoteId"]
isOneToOne: false
- referencedRelation: "group"
+ referencedRelation: "quote"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberGroupId_fkey"
- columns: ["memberGroupId"]
+ foreignKeyName: "job_quoteId_fkey"
+ columns: ["quoteId"]
isOneToOne: false
- referencedRelation: "group"
+ referencedRelation: "quoteCustomerDetails"
+ referencedColumns: ["quoteId"]
+ },
+ {
+ foreignKeyName: "job_quoteId_fkey"
+ columns: ["quoteId"]
+ isOneToOne: false
+ referencedRelation: "quotes"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "job_quoteLineId_fkey"
+ columns: ["quoteLineId"]
isOneToOne: false
- referencedRelation: "user"
+ referencedRelation: "quoteLine"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "job_quoteLineId_fkey"
+ columns: ["quoteLineId"]
isOneToOne: false
- referencedRelation: "employeeSummary"
+ referencedRelation: "quoteLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "job_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "employees"
+ referencedRelation: "salesOrder"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "job_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
+ referencedRelation: "salesOrderLocations"
referencedColumns: ["id"]
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
+ foreignKeyName: "job_salesOrderId_fkey"
+ columns: ["salesOrderId"]
isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ referencedRelation: "salesOrders"
+ referencedColumns: ["id"]
},
- ]
- }
- groups: {
- Row: {
- companyId: string | null
- id: string | null
- isCustomerOrgGroup: boolean | null
- isCustomerTypeGroup: boolean | null
- isEmployeeTypeGroup: boolean | null
- isSupplierOrgGroup: boolean | null
- isSupplierTypeGroup: boolean | null
- name: string | null
- parentId: string | null
- users: Json | null
- }
- Relationships: []
- }
- groups_recursive: {
- Row: {
- companyId: string | null
- groupId: string | null
- isCustomerOrgGroup: boolean | null
- isCustomerTypeGroup: boolean | null
- isEmployeeTypeGroup: boolean | null
- isIdentityGroup: boolean | null
- isSupplierOrgGroup: boolean | null
- isSupplierTypeGroup: boolean | null
- name: string | null
- parentId: string | null
- user: Json | null
- }
- Relationships: []
- }
- holidayYears: {
- Row: {
- companyId: string | null
- year: number | null
- }
- Relationships: [
{
- foreignKeyName: "holiday_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "salesOrderLine"
referencedColumns: ["id"]
},
{
- foreignKeyName: "holiday_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "salesOrderLines"
referencedColumns: ["id"]
},
{
- foreignKeyName: "holiday_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_unitOfMeasureCode_fkey"
+ columns: ["unitOfMeasureCode", "companyId"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "unitOfMeasure"
+ referencedColumns: ["code", "companyId"]
},
{
- foreignKeyName: "holiday_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "user"
+ referencedColumns: ["id"]
},
- ]
- }
- integrations: {
- Row: {
- active: boolean | null
- companyId: string | null
- description: string | null
- id: string | null
- jsonschema: Json | null
- logoPath: string | null
- metadata: Json | null
- title: string | null
- visible: boolean | null
- }
- Relationships: []
- }
- itemQuantities: {
- Row: {
- companyId: string | null
- itemId: string | null
- locationId: string | null
- quantityAvailable: number | null
- quantityOnHand: number | null
- quantityOnProdOrder: number | null
- quantityOnPurchaseOrder: number | null
- quantityOnSalesOrder: number | null
- }
- Relationships: [
{
- foreignKeyName: "item_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "company"
+ referencedRelation: "employeeSummary"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "companies"
+ referencedRelation: "employees"
referencedColumns: ["id"]
},
{
- foreignKeyName: "item_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
},
{
- foreignKeyName: "item_companyId_fkey"
- columns: ["companyId"]
+ foreignKeyName: "job_updatedBy_fkey"
+ columns: ["updatedBy"]
isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
},
]
}
@@ -22793,14 +23707,14 @@ export type Database = {
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["id"]
+ columns: ["supplierLocationId"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["supplierLocationId"]
+ columns: ["id"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
@@ -23672,14 +24586,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["supplierCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["id"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["supplierCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["id"]
@@ -24450,6 +25364,7 @@ export type Database = {
updatedAt: string | null
updatedBy: string | null
workCenterId: string | null
+ workInstruction: Json | null
}
Relationships: [
{
@@ -25441,14 +26356,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["paymentCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["id"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["paymentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["id"]
@@ -27585,6 +28500,7 @@ export type Database = {
| "Indirect Cost"
| "Variance"
| "Total"
+ deadlineType: "No Deadline" | "ASAP" | "Soft Deadline" | "Hard Deadline"
documentSourceType:
| "Job"
| "Part"
@@ -27699,6 +28615,13 @@ export type Database = {
| "Service"
| "Consumable"
| "Fixture"
+ jobStatus:
+ | "Draft"
+ | "Ready"
+ | "In Progress"
+ | "Paused"
+ | "Completed"
+ | "Cancelled"
journalLineDocumentType:
| "Receipt"
| "Invoice"
@@ -27712,18 +28635,16 @@ export type Database = {
| "Documents"
| "Invoicing"
| "Inventory"
- | "Jobs"
+ | "Items"
| "Messaging"
| "Parts"
+ | "People"
+ | "Production"
| "Purchasing"
| "Resources"
- | "People"
| "Sales"
| "Settings"
- | "Scheduling"
- | "Timecards"
| "Users"
- | "Items"
month:
| "January"
| "February"
diff --git a/packages/database/supabase/migrations/20240913145957_jobs-rls.sql b/packages/database/supabase/migrations/20240913145957_jobs-rls.sql
new file mode 100644
index 0000000000..326a764e34
--- /dev/null
+++ b/packages/database/supabase/migrations/20240913145957_jobs-rls.sql
@@ -0,0 +1,180 @@
+ALTER TABLE "job" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Requests with an API key can access jobs" ON "job"
+FOR ALL USING (
+ has_valid_api_key_for_company("companyId")
+);
+
+CREATE POLICY "Requests with an API key can access jobs" ON "jobMaterial"
+FOR ALL USING (
+ has_valid_api_key_for_company("companyId")
+);
+
+CREATE POLICY "Requests with an API key can access jobs" ON "jobOperation"
+FOR ALL USING (
+ has_valid_api_key_for_company("companyId")
+);
+
+-- Policies for jobMaterial
+CREATE POLICY "Employees can view job materials" ON "jobMaterial"
+ FOR SELECT
+ USING (
+ has_role('employee', "companyId")
+ AND "companyId" = ANY(
+ SELECT "companyId" from "userToCompany" where "userId" = auth.uid()::text
+ )
+ );
+
+CREATE POLICY "Employees with production_create can insert job materials" ON "jobMaterial"
+ FOR INSERT
+ WITH CHECK (
+ has_role('employee', "companyId")
+ AND has_company_permission('production_create', "companyId")
+ );
+
+CREATE POLICY "Employees with production_update can update job materials" ON "jobMaterial"
+ FOR UPDATE
+ USING (
+ has_role('employee', "companyId")
+ AND has_company_permission('production_update', "companyId")
+ );
+
+CREATE POLICY "Employees with production_delete can delete job materials" ON "jobMaterial"
+ FOR DELETE
+ USING (
+ has_role('employee', "companyId")
+ AND has_company_permission('production_delete', "companyId")
+ );
+
+CREATE POLICY "Customers with production_view can view their own job materials" ON "jobMaterial"
+ FOR SELECT
+ USING (
+ has_role('customer', "companyId") AND
+ has_company_permission('production_view', "companyId") AND
+ "jobId" IN (
+ SELECT "id" FROM "job" WHERE "customerId" IN (
+ SELECT "customerId" FROM "customerAccount" WHERE id::uuid = auth.uid()
+ )
+ )
+ );
+
+-- Policies for jobOperation
+CREATE POLICY "Employees can view job operations" ON "jobOperation"
+ FOR SELECT
+ USING (
+ has_role('employee', "companyId")
+ AND "companyId" = ANY(
+ SELECT "companyId" from "userToCompany" where "userId" = auth.uid()::text
+ )
+ );
+
+CREATE POLICY "Employees with production_create can insert job operations" ON "jobOperation"
+ FOR INSERT
+ WITH CHECK (
+ has_role('employee', "companyId")
+ AND has_company_permission('production_create', "companyId")
+ );
+
+CREATE POLICY "Employees with production_update can update job operations" ON "jobOperation"
+ FOR UPDATE
+ USING (
+ has_role('employee', "companyId")
+ AND has_company_permission('production_update', "companyId")
+ );
+
+CREATE POLICY "Employees with production_delete can delete job operations" ON "jobOperation"
+ FOR DELETE
+ USING (
+ has_role('employee', "companyId")
+ AND has_company_permission('production_delete', "companyId")
+ );
+
+CREATE POLICY "Customers with production_view can view their own job operations" ON "jobOperation"
+ FOR SELECT
+ USING (
+ has_role('customer', "companyId") AND
+ has_company_permission('production_view', "companyId") AND
+ "jobId" IN (
+ SELECT "id" FROM "job" WHERE "customerId" IN (
+ SELECT "customerId" FROM "customerAccount" WHERE id::uuid = auth.uid()
+ )
+ )
+ );
+
+
+CREATE POLICY "Requests with an API key can select users from their company" ON "user"
+FOR SELECT USING (
+ EXISTS (
+ SELECT 1
+ FROM "userToCompany"
+ WHERE "userToCompany"."userId" = "user"."id"::text
+ AND "userToCompany"."companyId" IN (
+ SELECT "companyId"
+ FROM "apiKey"
+ WHERE "apiKey"."key" = current_setting('request.header.carbon-key', true)
+ )
+ )
+);
+
+-- Add workInstruction column to quoteOperation table
+ALTER TABLE "quoteOperation" ADD COLUMN "workInstruction" JSON NOT NULL DEFAULT '{}';
+
+-- Migrate data from quoteOperationWorkInstruction to quoteOperation
+UPDATE "quoteOperation" qo
+SET "workInstruction" = qowi.content
+FROM "quoteOperationWorkInstruction" qowi
+WHERE qo.id = qowi."quoteOperationId";
+
+-- Add workInstruction column to jobOperation table
+ALTER TABLE "jobOperation" ADD COLUMN "workInstruction" JSON NOT NULL DEFAULT '{}';
+
+-- Migrate data from jobOperationWorkInstruction to jobOperation
+UPDATE "jobOperation" jo
+SET "workInstruction" = jowi.content
+FROM "jobOperationWorkInstruction" jowi
+WHERE jo.id = jowi."jobOperationId";
+
+-- Add workInstruction column to methodOperation table
+ALTER TABLE "methodOperation" ADD COLUMN "workInstruction" JSON NOT NULL DEFAULT '{}';
+
+-- Migrate data from methodOperationWorkInstruction to methodOperation
+UPDATE "methodOperation" mo
+SET "workInstruction" = mowi.content
+FROM "methodOperationWorkInstruction" mowi
+WHERE mo.id = mowi."methodOperationId";
+
+-- Drop the old work instruction tables
+DROP TABLE "quoteOperationWorkInstruction";
+DROP TABLE "jobOperationWorkInstruction";
+DROP TABLE "methodOperationWorkInstruction";
+
+-- Drop the associated trigger if it exists
+DROP TRIGGER IF EXISTS create_quote_operation_related_records ON public."quoteOperation";
+-- Drop the function that creates quote operation work instructions
+DROP FUNCTION IF EXISTS public.create_quote_operation_work_instruction();
+
+
+-- Drop the associated trigger for method operation
+DROP TRIGGER IF EXISTS create_part_make_method_related_records ON public."methodOperation";
+-- Drop the function that creates method operation work instructions
+DROP FUNCTION IF EXISTS public.create_method_operation_work_instruction();
+
+
+-- Drop the associated trigger for job operation (if it exists)
+DROP TRIGGER IF EXISTS create_job_operation_related_records ON public."jobOperation";
+-- Drop the function that creates job operation work instructions (if it exists)
+DROP FUNCTION IF EXISTS public.create_job_operation_work_instruction();
+
+
+DROP VIEW "quoteOperationsWithMakeMethods";
+COMMIT;
+CREATE OR REPLACE VIEW "quoteOperationsWithMakeMethods" WITH(SECURITY_INVOKER=true) AS
+ SELECT
+ mm.id AS "makeMethodId",
+ qo.*
+ FROM "quoteOperation" qo
+ INNER JOIN "quoteMakeMethod" qmm
+ ON qo."quoteMakeMethodId" = qmm.id
+ LEFT JOIN "makeMethod" mm
+ ON qmm."itemId" = mm."itemId";
+