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.

wip: add ui and tables for storing company data

Brad Barbine48a9047ad86
diff --git a/apps/carbon/app/modules/settings/settings.models.ts b/apps/carbon/app/modules/settings/settings.models.ts
index 0b4bcc2e31..7162a2bfcc 100644
--- a/apps/carbon/app/modules/settings/settings.models.ts
+++ b/apps/carbon/app/modules/settings/settings.models.ts
@@ -2,6 +2,23 @@ import { withZod } from "@remix-validated-form/with-zod";
import { z } from "zod";
import { zfd } from "zod-form-data";
+export const companyValidator = withZod(
+ z.object({
+ name: z.string().min(1, { message: "Name is required" }),
+ taxId: zfd.text(z.string().optional()),
+ addressLine1: z.string().min(1, { message: "Address is required" }),
+ addressLine2: zfd.text(z.string().optional()),
+ city: z.string().min(1, { message: "City is required" }),
+ state: z.string().min(1, { message: "State is required" }),
+ postalCode: z.string().min(1, { message: "Zip is required" }),
+ countryCode: zfd.text(z.string().optional()),
+ phone: zfd.text(z.string().optional()),
+ fax: zfd.text(z.string().optional()),
+ email: zfd.text(z.string().optional()),
+ website: zfd.text(z.string().optional()),
+ })
+);
+
export const sequenceValidator = withZod(
z.object({
table: z.string().min(1, { message: "Table is required" }),
diff --git a/apps/carbon/app/modules/settings/settings.service.ts b/apps/carbon/app/modules/settings/settings.service.ts
index a6d00f77f7..6d8865b746 100644
--- a/apps/carbon/app/modules/settings/settings.service.ts
+++ b/apps/carbon/app/modules/settings/settings.service.ts
@@ -5,7 +5,11 @@ import type { GenericQueryFilters } from "~/utils/query";
import { setGenericQueryFilters } from "~/utils/query";
import { interpolateSequenceDate } from "~/utils/string";
import { sanitize } from "~/utils/supabase";
-import type { sequenceValidator } from "./settings.models";
+import type { companyValidator, sequenceValidator } from "./settings.models";
+
+export async function getCompany(client: SupabaseClient<Database>) {
+ return client.from("company").select("*").single();
+}
export async function getCurrentSequence(
client: SupabaseClient<Database>,
@@ -90,6 +94,13 @@ export async function getSequencesList(
return client.from("sequence").select("id").eq("table", table);
}
+export async function insertCompany(
+ client: SupabaseClient<Database>,
+ company: TypeOfValidator<typeof companyValidator>
+) {
+ return client.from("company").insert(company);
+}
+
export async function rollbackNextSequence(
client: SupabaseClient<Database>,
table: string,
@@ -110,6 +121,29 @@ export async function rollbackNextSequence(
});
}
+export async function updateCompany(
+ client: SupabaseClient<Database>,
+ company: Partial<TypeOfValidator<typeof companyValidator>> & {
+ updatedBy: string;
+ }
+) {
+ return client.from("company").update(sanitize(company)).eq("id", true);
+}
+
+export async function updateLogo(
+ client: SupabaseClient<Database>,
+ logoUrl: string | null
+) {
+ return client
+ .from("company")
+ .update(
+ sanitize({
+ logoUrl,
+ })
+ )
+ .eq("id", true);
+}
+
export async function updateSequence(
client: SupabaseClient<Database>,
table: string,
diff --git a/apps/carbon/app/modules/settings/types.ts b/apps/carbon/app/modules/settings/types.ts
index b974d2686d..73e127a855 100644
--- a/apps/carbon/app/modules/settings/types.ts
+++ b/apps/carbon/app/modules/settings/types.ts
@@ -1,4 +1,8 @@
-import type { getSequences } from "./settings.service";
+import type { getCompany, getSequences } from "./settings.service";
+
+export type Company = NonNullable<
+ Awaited<ReturnType<typeof getCompany>>["data"]
+>;
export type Sequence = NonNullable<
Awaited<ReturnType<typeof getSequences>>["data"]
diff --git a/apps/carbon/app/modules/settings/ui/Company/CompanyForm/CompanyForm.tsx b/apps/carbon/app/modules/settings/ui/Company/CompanyForm/CompanyForm.tsx
new file mode 100644
index 0000000000..45f1c6dd9b
--- /dev/null
+++ b/apps/carbon/app/modules/settings/ui/Company/CompanyForm/CompanyForm.tsx
@@ -0,0 +1,47 @@
+import { Box, Grid, VStack } from "@chakra-ui/react";
+import { ValidatedForm } from "remix-validated-form";
+import { Hidden, Input, Submit } from "~/components/Form";
+import { SectionTitle } from "~/components/Layout";
+import { companyValidator } from "~/modules/settings";
+import type { TypeOfValidator } from "~/types/validators";
+import { path } from "~/utils/path";
+
+type CompanyFormProps = {
+ company: TypeOfValidator<typeof companyValidator>;
+};
+
+const CompanyForm = ({ company }: CompanyFormProps) => {
+ return (
+ <Box w="full">
+ <SectionTitle>Basic Information</SectionTitle>
+ <ValidatedForm
+ method="post"
+ action={path.to.company}
+ validator={companyValidator}
+ defaultValues={company}
+ >
+ <VStack spacing={4} my={4} w="full" alignItems="start">
+ <Grid gridTemplateColumns="1fr 1fr" gridGap={4} w="full">
+ <Input name="name" label="Company Name" />
+ <Input name="taxId" label="Tax ID" />
+ <Input name="addressLine1" label="Address Line 1" />
+ <Input name="addressLine2" label="Address Line 2" />
+ <Input name="city" label="City" />
+ <Input name="state" label="State" />
+ <Input name="postalCode" label="Postal Code" />
+ <Input name="countryCode" label="Country" />
+ <Input name="phone" label="Phone Number" />
+ <Input name="fax" label="Fax Number" />
+ <Input name="email" label="Email" />
+ <Input name="website" label="Website" />
+ </Grid>
+
+ <Hidden name="intent" value="about" />
+ <Submit size="sm">Save</Submit>
+ </VStack>
+ </ValidatedForm>
+ </Box>
+ );
+};
+
+export default CompanyForm;
diff --git a/apps/carbon/app/modules/settings/ui/Company/CompanyForm/index.ts b/apps/carbon/app/modules/settings/ui/Company/CompanyForm/index.ts
new file mode 100644
index 0000000000..e6641132ce
--- /dev/null
+++ b/apps/carbon/app/modules/settings/ui/Company/CompanyForm/index.ts
@@ -0,0 +1,3 @@
+import CompanyForm from "./CompanyForm";
+
+export default CompanyForm;
diff --git a/apps/carbon/app/modules/settings/ui/Company/CompanyLogoForm/CompanyLogoForm.tsx b/apps/carbon/app/modules/settings/ui/Company/CompanyLogoForm/CompanyLogoForm.tsx
new file mode 100644
index 0000000000..f87b6feec4
--- /dev/null
+++ b/apps/carbon/app/modules/settings/ui/Company/CompanyLogoForm/CompanyLogoForm.tsx
@@ -0,0 +1,81 @@
+import { File, useNotification } from "@carbon/react";
+import { Button, VStack } from "@chakra-ui/react";
+import { useSubmit } from "@remix-run/react";
+import type { ChangeEvent } from "react";
+import { Avatar } from "~/components";
+import { useSupabase } from "~/lib/supabase";
+import type { Company } from "~/modules/settings";
+import { path } from "~/utils/path";
+
+type CompanyLogoFormProps = {
+ company: Company;
+};
+
+const CompanyLogoForm = ({ company }: CompanyLogoFormProps) => {
+ const { supabase } = useSupabase();
+ const notification = useNotification();
+ const submit = useSubmit();
+
+ const uploadImage = async (e: ChangeEvent<HTMLInputElement>) => {
+ if (e.target.files && supabase) {
+ const logo = e.target.files[0];
+ const fileExtension = logo.name.substring(logo.name.lastIndexOf(".") + 1);
+
+ const imageUpload = await supabase.storage
+ .from("avatars")
+ .upload(`logo.${fileExtension}`, logo, {
+ cacheControl: `${12 * 60 * 60}`,
+ upsert: true,
+ });
+
+ if (imageUpload.error) {
+ notification.copyableError(imageUpload.error, "Failed to upload logo");
+ }
+
+ if (imageUpload.data?.path) {
+ submitLogoUrl(imageUpload.data.path);
+ }
+ }
+ };
+
+ const deleteImage = async () => {
+ if (supabase) {
+ const imageDelete = await supabase.storage
+ .from("avatars")
+ .remove([`${company.id}.png`]);
+
+ if (imageDelete.error) {
+ notification.copyableError(imageDelete.error, "Failed to remove image");
+ }
+
+ submitLogoUrl(null);
+ }
+ };
+
+ const submitLogoUrl = (logoUrl: string | null) => {
+ const formData = new FormData();
+ formData.append("intent", "photo");
+ if (logoUrl) formData.append("path", logoUrl);
+ submit(formData, {
+ method: "post",
+ action: path.to.profile,
+ });
+ };
+
+ return (
+ <VStack w="full" spacing={2} px={8}>
+ <Avatar size="2xl" path={company?.logo} title={company?.name ?? ""} />
+ <File accept="image/*" onChange={uploadImage}>
+ {company.logo ? "Change" : "Upload"}
+ </File>
+
+ {company.logo && (
+ <Button variant="outline" onClick={deleteImage}>
+ Remove
+ </Button>
+ )}
+ </VStack>
+ );
+};
+
+export default CompanyLogoForm;
diff --git a/apps/carbon/app/modules/settings/ui/Company/CompanyLogoForm/index.ts b/apps/carbon/app/modules/settings/ui/Company/CompanyLogoForm/index.ts
new file mode 100644
index 0000000000..e1af43519c
--- /dev/null
+++ b/apps/carbon/app/modules/settings/ui/Company/CompanyLogoForm/index.ts
@@ -0,0 +1,3 @@
+import CompanyLogoForm from "./CompanyLogoForm";
+
+export default CompanyLogoForm;
diff --git a/apps/carbon/app/modules/settings/ui/Company/index.ts b/apps/carbon/app/modules/settings/ui/Company/index.ts
new file mode 100644
index 0000000000..bf2aefe0e2
--- /dev/null
+++ b/apps/carbon/app/modules/settings/ui/Company/index.ts
@@ -0,0 +1,4 @@
+import CompanyForm from "./CompanyForm";
+import CompanyLogoForm from "./CompanyLogoForm";
+
+export { CompanyForm, CompanyLogoForm };
diff --git a/apps/carbon/app/modules/settings/ui/index.ts b/apps/carbon/app/modules/settings/ui/index.ts
index f930f5b8b3..fd9c564cf9 100644
--- a/apps/carbon/app/modules/settings/ui/index.ts
+++ b/apps/carbon/app/modules/settings/ui/index.ts
@@ -1,4 +1,5 @@
import useSettingsSidebar from "./useSettingsSidebar";
-export { useSettingsSidebar };
+export * from "./Company";
export * from "./Sequences";
+export { useSettingsSidebar };
diff --git a/apps/carbon/app/modules/settings/ui/useSettingsSidebar.tsx b/apps/carbon/app/modules/settings/ui/useSettingsSidebar.tsx
index cd9aef91c2..2f06a023cc 100644
--- a/apps/carbon/app/modules/settings/ui/useSettingsSidebar.tsx
+++ b/apps/carbon/app/modules/settings/ui/useSettingsSidebar.tsx
@@ -6,6 +6,11 @@ const settingsRoutes: AuthenticatedRouteGroup[] = [
{
name: "Configure",
routes: [
+ {
+ name: "Company",
+ to: path.to.company,
+ role: "employee",
+ },
{
name: "Sequences",
to: path.to.sequences,
diff --git a/apps/carbon/app/routes/x+/index.tsx b/apps/carbon/app/routes/x+/index.tsx
index f74b89a4c9..d7e0f6fe8b 100644
--- a/apps/carbon/app/routes/x+/index.tsx
+++ b/apps/carbon/app/routes/x+/index.tsx
@@ -1,20 +1,33 @@
import { PurchaseOrderPDFView } from "@carbon/documents";
+import { json, type LoaderFunctionArgs } from "@remix-run/node";
+import { useLoaderData } from "@remix-run/react";
+import { getPurchaseOrder } from "~/modules/purchasing";
+import { getCompany } from "~/modules/settings";
+import { requirePermissions } from "~/services/auth";
// import { Editor, useEditor } from "@carbon/react";
+export async function loader({ request }: LoaderFunctionArgs) {
+ const { client } = await requirePermissions(request, {});
+ const [company, purchaseOrder] = await Promise.all([
+ getCompany(client),
+ getPurchaseOrder(client, "cm0ol20h80l0h88u5240"),
+ ]);
+
+ if (company.error) throw company.error;
+ if (purchaseOrder.error) throw purchaseOrder.error;
+
+ return json({
+ company: company.data,
+ purchaseOrder: purchaseOrder.data,
+ });
+}
+
export default function AppIndexRoute() {
// const editor = useEditor(`<h2>Hello, World</h2><p>Welcome to Carbon!</p>`);
// return <Editor editor={editor} h="calc(100vh - 98px)" />;
+ const { company, purchaseOrder } = useLoaderData<typeof loader>();
+
return (
- <PurchaseOrderPDFView
- company={{
- name: "The Carbon Corporation",
- logo: "https://cdn.iconscout.com/icon/free/png-256/free-framer-logo-3609961-3014601.png",
- address: "123 Main St",
- city: "New York",
- state: "NY",
- zip: "10001",
- phone: "555-555-5555",
- }}
- />
+ <PurchaseOrderPDFView company={company} purchaseOrder={purchaseOrder} />
);
}
diff --git a/apps/carbon/app/routes/x+/settings+/company.tsx b/apps/carbon/app/routes/x+/settings+/company.tsx
new file mode 100644
index 0000000000..a2f0e3de34
--- /dev/null
+++ b/apps/carbon/app/routes/x+/settings+/company.tsx
@@ -0,0 +1,123 @@
+import { useColor } from "@carbon/react";
+import { Grid, VStack } from "@chakra-ui/react";
+import type { ActionFunctionArgs, LoaderFunctionArgs } from "@remix-run/node";
+import { json, redirect } from "@remix-run/node";
+import { useLoaderData } from "@remix-run/react";
+import { validationError } from "remix-validated-form";
+import { PageTitle } from "~/components/Layout";
+import {
+ CompanyForm,
+ CompanyLogoForm,
+ companyValidator,
+ getCompany,
+ updateCompany,
+ updateLogo,
+} from "~/modules/settings";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
+import type { Handle } from "~/utils/handle";
+import { assertIsPost } from "~/utils/http";
+import { path } from "~/utils/path";
+import { error, success } from "~/utils/result";
+
+export const handle: Handle = {
+ breadcrumb: "Company",
+ to: path.to.company,
+};
+
+export async function loader({ request }: LoaderFunctionArgs) {
+ const { client } = await requirePermissions(request, {});
+
+ const company = await getCompany(client);
+
+ if (company.error || !company.data) {
+ return redirect(
+ path.to.settings,
+ await flash(request, error(company.error, "Failed to get company"))
+ );
+ }
+
+ return json({ company: company.data });
+}
+
+export async function action({ request }: ActionFunctionArgs) {
+ assertIsPost(request);
+ const { client, userId } = await requirePermissions(request, {});
+ const formData = await request.formData();
+
+ if (formData.get("intent") === "about") {
+ const validation = await companyValidator.validate(formData);
+
+ if (validation.error) {
+ return validationError(validation.error);
+ }
+
+ const update = await updateCompany(client, {
+ ...validation.data,
+ updatedBy: userId,
+ });
+ if (update.error)
+ return json(
+ {},
+ await flash(request, error(update.error, "Failed to update company"))
+ );
+
+ return json({}, await flash(request, success("Updated company")));
+ }
+
+ if (formData.get("intent") === "photo") {
+ const logoPath = formData.get("path");
+ if (typeof logoPath === "string") {
+ const logoUpdate = await updateLogo(client, logoPath);
+ if (logoUpdate.error) {
+ return redirect(
+ path.to.company,
+ await flash(request, error(logoUpdate.error, "Failed to update logo"))
+ );
+ }
+
+ return redirect(
+ path.to.company,
+ await flash(request, success("Updated logo"))
+ );
+ } else {
+ return redirect(
+ path.to.company,
+ await flash(request, error(null, "Invalid logo path"))
+ );
+ }
+ }
+
+ return null;
+}
+
+export default function Company() {
+ const { company } = useLoaderData<typeof loader>();
+
+ const initialValues = {
+ name: company.name,
+ taxId: company.taxId ?? undefined,
+ addressLine1: company.addressLine1 ?? "",
+ addressLine2: company.addressLine2 ?? undefined,
+ city: company.city ?? "",
+ state: company.state ?? "",
+ postalCode: company.postalCode ?? "",
+ countryCode: company.countryCode ?? undefined,
+ phone: company.phone ?? undefined,
+ email: company.email ?? undefined,
+ website: company.website ?? undefined,
+ };
+
+ return (
+ <VStack w="full" h="full" spacing={0} p={8} bg={useColor("white")}>
+ <PageTitle
+ title="Company"
+ subtitle="This information will be displayed on document headers."
+ />
+ <Grid gridTemplateColumns={["1fr", "1fr auto"]} w="full" gridGap={8}>
+ <CompanyForm company={initialValues} />
+ <CompanyLogoForm company={company} />
+ </Grid>
+ </VStack>
+ );
+}
diff --git a/apps/carbon/app/utils/path.ts b/apps/carbon/app/utils/path.ts
index ac3d33b763..13253ac286 100644
--- a/apps/carbon/app/utils/path.ts
+++ b/apps/carbon/app/utils/path.ts
@@ -2,6 +2,7 @@ import { generatePath } from "@remix-run/react";
const x = "/x"; // from ~/routes/x+ folder
const api = "/api"; // from ~/routes/api+ folder
+const file = "/file"; // from ~/routes/file+ folder
export const path = {
to: {
@@ -39,6 +40,10 @@ export const path = {
workCells: (id: string) =>
generatePath(`${api}/resources/work-cells?location=${id}`),
},
+ file: {
+ purchaseOrder: (id: string) =>
+ generatePath(`${file}/purchase-order/${id}`),
+ },
authenticatedRoot: x,
abilities: `${x}/resources/abilities`,
ability: (id: string) => generatePath(`${x}/resources/ability/${id}`),
@@ -71,6 +76,7 @@ export const path = {
chartOfAccount: (id: string) =>
generatePath(`${x}/accounting/charts/${id}`),
chartOfAccounts: `${x}/accounting/charts`,
+ company: `${x}/settings/company`,
contractor: (id: string) =>
generatePath(`${x}/resources/contractors/${id}`),
contractors: `${x}/resources/contractors`,
diff --git a/packages/database/SCHEMA.md b/packages/database/SCHEMA.md
index 0f9779f08c..e38d393681 100644
--- a/packages/database/SCHEMA.md
+++ b/packages/database/SCHEMA.md
@@ -4767,11 +4767,12 @@ CREATE POLICY "Users can delete their own purchase order favorites" ON "purchase
CREATE OR REPLACE VIEW "purchaseOrders" AS
SELECT
p.*,
+ sm."name" AS "shippingMethodName",
+ st."name" AS "shippingTermName",
+ pt."name" AS "paymentTermName",
pd."receiptRequestedDate",
pd."receiptPromisedDate",
pd."dropShipment",
- pol."lineCount",
- pol."subtotal",
l."id" AS "locationId",
l."name" AS "locationName",
s."name" AS "supplierName",
@@ -4784,11 +4785,10 @@ CREATE OR REPLACE VIEW "purchaseOrders" AS
EXISTS(SELECT 1 FROM "purchaseOrderFavorite" pf WHERE pf."purchaseOrderId" = p.id AND pf."userId" = auth.uid()::text) AS favorite
FROM "purchaseOrder" p
LEFT JOIN "purchaseOrderDelivery" pd ON pd."id" = p."id"
- LEFT JOIN (
- SELECT "purchaseOrderId", COUNT(*) AS "lineCount", SUM("unitPrice" * "purchaseQuantity") AS "subtotal"
- FROM "purchaseOrderLine"
- GROUP BY "purchaseOrderId"
- ) pol ON pol."purchaseOrderId" = p."id"
+ LEFT JOIN "shippingMethod" sm ON sm."id" = pd."shippingMethodId"
+ LEFT JOIN "shippingTerm" st ON st."id" = pd."shippingTermId"
+ LEFT JOIN "purchaseOrderPayment" pp ON pp."id" = p."id"
+ LEFT JOIN "paymentTerm" pt ON pt."id" = pp."paymentTermId"
LEFT JOIN "location" l ON l."id" = pd."locationId"
LEFT JOIN "supplier" s ON s."id" = p."supplierId"
LEFT JOIN "user" u ON u."id" = p."createdBy"
@@ -7215,3 +7215,46 @@ CREATE TRIGGER create_customer_entries
FOR EACH ROW EXECUTE PROCEDURE public.create_customer_entries();
```
+
+
+## `company`
+
+```sql
+CREATE TABLE "company" (
+ "id" BOOLEAN NOT NULL DEFAULT TRUE,
+ "name" TEXT NOT NULL,
+ "taxId" TEXT,
+ "logo" TEXT,
+ "addressLine1" TEXT,
+ "addressLine2" TEXT,
+ "city" TEXT,
+ "state" TEXT,
+ "postalCode" TEXT,
+ "countryCode" TEXT,
+ "phone" TEXT,
+ "fax" TEXT,
+ "email" TEXT,
+ "website" TEXT,
+
+ CONSTRAINT "company_pkey" PRIMARY KEY ("id"),
+ -- this is a hack to make sure that this table only ever has one row
+ CONSTRAINT "accountDefault_id_check" CHECK ("id" = TRUE),
+ CONSTRAINT "accountDefault_id_unique" UNIQUE ("id")
+);
+
+ALTER TABLE "company" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Authenticated users can view company" ON "company"
+ FOR SELECT
+ USING (
+ auth.role() = 'authenticated'
+ );
+
+CREATE POLICY "Employees with settings_update can update company" ON "company"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('settings_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
+```
+
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index cf1770e7c2..e02909cede 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -4,9096 +4,9148 @@ export type Json =
| boolean
| null
| { [key: string]: Json | undefined }
- | Json[]
+ | Json[];
export interface Database {
graphql_public: {
Tables: {
- [_ in never]: never
- }
+ [_ in never]: never;
+ };
Views: {
- [_ in never]: never
- }
+ [_ in never]: never;
+ };
Functions: {
graphql: {
Args: {
- operationName?: string
- query?: string
- variables?: Json
- extensions?: Json
- }
- Returns: Json
- }
- }
+ operationName?: string;
+ query?: string;
+ variables?: Json;
+ extensions?: Json;
+ };
+ Returns: Json;
+ };
+ };
Enums: {
- [_ in never]: never
- }
+ [_ in never]: never;
+ };
CompositeTypes: {
- [_ in never]: never
- }
- }
+ [_ in never]: never;
+ };
+ };
public: {
Tables: {
ability: {
Row: {
- active: boolean
- createdAt: string
- createdBy: string
- curve: Json
- id: string
- name: string
- shadowWeeks: number
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ createdAt: string;
+ createdBy: string;
+ curve: Json;
+ id: string;
+ name: string;
+ shadowWeeks: number;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- createdAt?: string
- createdBy: string
- curve?: Json
- id?: string
- name: string
- shadowWeeks?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ curve?: Json;
+ id?: string;
+ name: string;
+ shadowWeeks?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- createdAt?: string
- createdBy?: string
- curve?: Json
- id?: string
- name?: string
- shadowWeeks?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ curve?: Json;
+ id?: string;
+ name?: string;
+ shadowWeeks?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "abilities_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "abilities_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "abilities_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "abilities_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "abilities_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "abilities_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "abilities_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "abilities_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
account: {
Row: {
- accountCategoryId: string | null
- accountSubcategoryId: string | null
- active: boolean
- class: Database["public"]["Enums"]["glAccountClass"] | null
+ accountCategoryId: string | null;
+ accountSubcategoryId: string | null;
+ active: boolean;
+ class: Database["public"]["Enums"]["glAccountClass"] | null;
consolidatedRate:
| Database["public"]["Enums"]["glConsolidatedRate"]
- | null
- createdAt: string
- createdBy: string
- directPosting: boolean
- id: string
- incomeBalance: Database["public"]["Enums"]["glIncomeBalance"]
- name: string
- number: string
- type: Database["public"]["Enums"]["glAccountType"]
- updatedAt: string | null
- updatedBy: string | null
- }
+ | null;
+ createdAt: string;
+ createdBy: string;
+ directPosting: boolean;
+ id: string;
+ incomeBalance: Database["public"]["Enums"]["glIncomeBalance"];
+ name: string;
+ number: string;
+ type: Database["public"]["Enums"]["glAccountType"];
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- accountCategoryId?: string | null
- accountSubcategoryId?: string | null
- active?: boolean
- class?: Database["public"]["Enums"]["glAccountClass"] | null
+ accountCategoryId?: string | null;
+ accountSubcategoryId?: string | null;
+ active?: boolean;
+ class?: Database["public"]["Enums"]["glAccountClass"] | null;
consolidatedRate?:
| Database["public"]["Enums"]["glConsolidatedRate"]
- | null
- createdAt?: string
- createdBy: string
- directPosting?: boolean
- id?: string
- incomeBalance: Database["public"]["Enums"]["glIncomeBalance"]
- name: string
- number: string
- type: Database["public"]["Enums"]["glAccountType"]
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ | null;
+ createdAt?: string;
+ createdBy: string;
+ directPosting?: boolean;
+ id?: string;
+ incomeBalance: Database["public"]["Enums"]["glIncomeBalance"];
+ name: string;
+ number: string;
+ type: Database["public"]["Enums"]["glAccountType"];
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- accountCategoryId?: string | null
- accountSubcategoryId?: string | null
- active?: boolean
- class?: Database["public"]["Enums"]["glAccountClass"] | null
+ accountCategoryId?: string | null;
+ accountSubcategoryId?: string | null;
+ active?: boolean;
+ class?: Database["public"]["Enums"]["glAccountClass"] | null;
consolidatedRate?:
| Database["public"]["Enums"]["glConsolidatedRate"]
- | null
- createdAt?: string
- createdBy?: string
- directPosting?: boolean
- id?: string
- incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"]
- name?: string
- number?: string
- type?: Database["public"]["Enums"]["glAccountType"]
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ | null;
+ createdAt?: string;
+ createdBy?: string;
+ directPosting?: boolean;
+ id?: string;
+ incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"];
+ name?: string;
+ number?: string;
+ type?: Database["public"]["Enums"]["glAccountType"];
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "account_accountCategoryId_fkey"
- columns: ["accountCategoryId"]
- referencedRelation: "accountCategory"
- referencedColumns: ["id"]
+ foreignKeyName: "account_accountCategoryId_fkey";
+ columns: ["accountCategoryId"];
+ referencedRelation: "accountCategory";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "account_accountCategoryId_fkey"
- columns: ["accountCategoryId"]
- referencedRelation: "accountCategories"
- referencedColumns: ["id"]
+ foreignKeyName: "account_accountCategoryId_fkey";
+ columns: ["accountCategoryId"];
+ referencedRelation: "accountCategories";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "account_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "account_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "account_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "account_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "account_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "account_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "account_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "account_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
accountCategory: {
Row: {
- category: string
- class: Database["public"]["Enums"]["glAccountClass"]
- createdAt: string
- createdBy: string
- id: string
- incomeBalance: Database["public"]["Enums"]["glIncomeBalance"]
- updatedAt: string | null
- updatedBy: string | null
- }
+ category: string;
+ class: Database["public"]["Enums"]["glAccountClass"];
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ incomeBalance: Database["public"]["Enums"]["glIncomeBalance"];
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- category: string
- class: Database["public"]["Enums"]["glAccountClass"]
- createdAt?: string
- createdBy: string
- id?: string
- incomeBalance: Database["public"]["Enums"]["glIncomeBalance"]
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ category: string;
+ class: Database["public"]["Enums"]["glAccountClass"];
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ incomeBalance: Database["public"]["Enums"]["glIncomeBalance"];
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- category?: string
- class?: Database["public"]["Enums"]["glAccountClass"]
- createdAt?: string
- createdBy?: string
- id?: string
- incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"]
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ category?: string;
+ class?: Database["public"]["Enums"]["glAccountClass"];
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"];
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "accountCategory_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "accountCategory_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "accountCategory_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "accountCategory_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
accountDefault: {
Row: {
- accumulatedDepreciationAccount: string
- accumulatedDepreciationOnDisposalAccount: string
- assetAquisitionCostAccount: string
- assetAquisitionCostOnDisposalAccount: string
- assetDepreciationExpenseAccount: string
- assetGainsAndLossesAccount: string
- bankCashAccount: string
- bankForeignCurrencyAccount: string
- bankLocalCurrencyAccount: string
- capacityVarianceAccount: string
- costOfGoodsSoldAccount: string
- customerPaymentDiscountAccount: string
- directCostAppliedAccount: string
- id: boolean
- interestAccount: string
- inventoryAccount: string
- inventoryAdjustmentVarianceAccount: string
- inventoryInterimAccrualAccount: string
- inventoryInvoicedNotReceivedAccount: string
- inventoryReceivedNotInvoicedAccount: string
- inventoryShippedNotInvoicedAccount: string
- maintenanceAccount: string
- materialVarianceAccount: string
- overheadAccount: string
- overheadCostAppliedAccount: string
- payablesAccount: string
- prepaymentAccount: string
- purchaseAccount: string
- purchaseTaxPayableAccount: string
- purchaseVarianceAccount: string
- receivablesAccount: string
- retainedEarningsAccount: string
- reverseChargeSalesTaxPayableAccount: string
- roundingAccount: string
- salesAccount: string
- salesDiscountAccount: string
- salesTaxPayableAccount: string
- serviceChargeAccount: string
- supplierPaymentDiscountAccount: string
- updatedBy: string | null
- workInProgressAccount: string
- }
+ accumulatedDepreciationAccount: string;
+ accumulatedDepreciationOnDisposalAccount: string;
+ assetAquisitionCostAccount: string;
+ assetAquisitionCostOnDisposalAccount: string;
+ assetDepreciationExpenseAccount: string;
+ assetGainsAndLossesAccount: string;
+ bankCashAccount: string;
+ bankForeignCurrencyAccount: string;
+ bankLocalCurrencyAccount: string;
+ capacityVarianceAccount: string;
+ costOfGoodsSoldAccount: string;
+ customerPaymentDiscountAccount: string;
+ directCostAppliedAccount: string;
+ id: boolean;
+ interestAccount: string;
+ inventoryAccount: string;
+ inventoryAdjustmentVarianceAccount: string;
+ inventoryInterimAccrualAccount: string;
+ inventoryInvoicedNotReceivedAccount: string;
+ inventoryReceivedNotInvoicedAccount: string;
+ inventoryShippedNotInvoicedAccount: string;
+ maintenanceAccount: string;
+ materialVarianceAccount: string;
+ overheadAccount: string;
+ overheadCostAppliedAccount: string;
+ payablesAccount: string;
+ prepaymentAccount: string;
+ purchaseAccount: string;
+ purchaseTaxPayableAccount: string;
+ purchaseVarianceAccount: string;
+ receivablesAccount: string;
+ retainedEarningsAccount: string;
+ reverseChargeSalesTaxPayableAccount: string;
+ roundingAccount: string;
+ salesAccount: string;
+ salesDiscountAccount: string;
+ salesTaxPayableAccount: string;
+ serviceChargeAccount: string;
+ supplierPaymentDiscountAccount: string;
+ updatedBy: string | null;
+ workInProgressAccount: string;
+ };
Insert: {
- accumulatedDepreciationAccount: string
- accumulatedDepreciationOnDisposalAccount: string
- assetAquisitionCostAccount: string
- assetAquisitionCostOnDisposalAccount: string
- assetDepreciationExpenseAccount: string
- assetGainsAndLossesAccount: string
- bankCashAccount: string
- bankForeignCurrencyAccount: string
- bankLocalCurrencyAccount: string
- capacityVarianceAccount: string
- costOfGoodsSoldAccount: string
- customerPaymentDiscountAccount: string
- directCostAppliedAccount: string
- id?: boolean
- interestAccount: string
- inventoryAccount: string
- inventoryAdjustmentVarianceAccount: string
- inventoryInterimAccrualAccount: string
- inventoryInvoicedNotReceivedAccount: string
- inventoryReceivedNotInvoicedAccount: string
- inventoryShippedNotInvoicedAccount: string
- maintenanceAccount: string
- materialVarianceAccount: string
- overheadAccount: string
- overheadCostAppliedAccount: string
- payablesAccount: string
- prepaymentAccount: string
- purchaseAccount: string
- purchaseTaxPayableAccount: string
- purchaseVarianceAccount: string
- receivablesAccount: string
- retainedEarningsAccount: string
- reverseChargeSalesTaxPayableAccount: string
- roundingAccount: string
- salesAccount: string
- salesDiscountAccount: string
- salesTaxPayableAccount: string
- serviceChargeAccount: string
- supplierPaymentDiscountAccount: string
- updatedBy?: string | null
- workInProgressAccount: string
- }
+ accumulatedDepreciationAccount: string;
+ accumulatedDepreciationOnDisposalAccount: string;
+ assetAquisitionCostAccount: string;
+ assetAquisitionCostOnDisposalAccount: string;
+ assetDepreciationExpenseAccount: string;
+ assetGainsAndLossesAccount: string;
+ bankCashAccount: string;
+ bankForeignCurrencyAccount: string;
+ bankLocalCurrencyAccount: string;
+ capacityVarianceAccount: string;
+ costOfGoodsSoldAccount: string;
+ customerPaymentDiscountAccount: string;
+ directCostAppliedAccount: string;
+ id?: boolean;
+ interestAccount: string;
+ inventoryAccount: string;
+ inventoryAdjustmentVarianceAccount: string;
+ inventoryInterimAccrualAccount: string;
+ inventoryInvoicedNotReceivedAccount: string;
+ inventoryReceivedNotInvoicedAccount: string;
+ inventoryShippedNotInvoicedAccount: string;
+ maintenanceAccount: string;
+ materialVarianceAccount: string;
+ overheadAccount: string;
+ overheadCostAppliedAccount: string;
+ payablesAccount: string;
+ prepaymentAccount: string;
+ purchaseAccount: string;
+ purchaseTaxPayableAccount: string;
+ purchaseVarianceAccount: string;
+ receivablesAccount: string;
+ retainedEarningsAccount: string;
+ reverseChargeSalesTaxPayableAccount: string;
+ roundingAccount: string;
+ salesAccount: string;
+ salesDiscountAccount: string;
+ salesTaxPayableAccount: string;
+ serviceChargeAccount: string;
+ supplierPaymentDiscountAccount: string;
+ updatedBy?: string | null;
+ workInProgressAccount: string;
+ };
Update: {
- accumulatedDepreciationAccount?: string
- accumulatedDepreciationOnDisposalAccount?: string
- assetAquisitionCostAccount?: string
- assetAquisitionCostOnDisposalAccount?: string
- assetDepreciationExpenseAccount?: string
- assetGainsAndLossesAccount?: string
- bankCashAccount?: string
- bankForeignCurrencyAccount?: string
- bankLocalCurrencyAccount?: string
- capacityVarianceAccount?: string
- costOfGoodsSoldAccount?: string
- customerPaymentDiscountAccount?: string
- directCostAppliedAccount?: string
- id?: boolean
- interestAccount?: string
- inventoryAccount?: string
- inventoryAdjustmentVarianceAccount?: string
- inventoryInterimAccrualAccount?: string
- inventoryInvoicedNotReceivedAccount?: string
- inventoryReceivedNotInvoicedAccount?: string
- inventoryShippedNotInvoicedAccount?: string
- maintenanceAccount?: string
- materialVarianceAccount?: string
- overheadAccount?: string
- overheadCostAppliedAccount?: string
- payablesAccount?: string
- prepaymentAccount?: string
- purchaseAccount?: string
- purchaseTaxPayableAccount?: string
- purchaseVarianceAccount?: string
- receivablesAccount?: string
- retainedEarningsAccount?: string
- reverseChargeSalesTaxPayableAccount?: string
- roundingAccount?: string
- salesAccount?: string
- salesDiscountAccount?: string
- salesTaxPayableAccount?: string
- serviceChargeAccount?: string
- supplierPaymentDiscountAccount?: string
- updatedBy?: string | null
- workInProgressAccount?: string
- }
+ accumulatedDepreciationAccount?: string;
+ accumulatedDepreciationOnDisposalAccount?: string;
+ assetAquisitionCostAccount?: string;
+ assetAquisitionCostOnDisposalAccount?: string;
+ assetDepreciationExpenseAccount?: string;
+ assetGainsAndLossesAccount?: string;
+ bankCashAccount?: string;
+ bankForeignCurrencyAccount?: string;
+ bankLocalCurrencyAccount?: string;
+ capacityVarianceAccount?: string;
+ costOfGoodsSoldAccount?: string;
+ customerPaymentDiscountAccount?: string;
+ directCostAppliedAccount?: string;
+ id?: boolean;
+ interestAccount?: string;
+ inventoryAccount?: string;
+ inventoryAdjustmentVarianceAccount?: string;
+ inventoryInterimAccrualAccount?: string;
+ inventoryInvoicedNotReceivedAccount?: string;
+ inventoryReceivedNotInvoicedAccount?: string;
+ inventoryShippedNotInvoicedAccount?: string;
+ maintenanceAccount?: string;
+ materialVarianceAccount?: string;
+ overheadAccount?: string;
+ overheadCostAppliedAccount?: string;
+ payablesAccount?: string;
+ prepaymentAccount?: string;
+ purchaseAccount?: string;
+ purchaseTaxPayableAccount?: string;
+ purchaseVarianceAccount?: string;
+ receivablesAccount?: string;
+ retainedEarningsAccount?: string;
+ reverseChargeSalesTaxPayableAccount?: string;
+ roundingAccount?: string;
+ salesAccount?: string;
+ salesDiscountAccount?: string;
+ salesTaxPayableAccount?: string;
+ serviceChargeAccount?: string;
+ supplierPaymentDiscountAccount?: string;
+ updatedBy?: string | null;
+ workInProgressAccount?: string;
+ };
Relationships: [
{
- foreignKeyName: "accountDefault_accumulatedDepreciationAccount_fkey"
- columns: ["accumulatedDepreciationAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_accumulatedDepreciationAccount_fkey";
+ columns: ["accumulatedDepreciationAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_accumulatedDepreciationAccount_fkey"
- columns: ["accumulatedDepreciationAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_accumulatedDepreciationAccount_fkey";
+ columns: ["accumulatedDepreciationAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_accumulatedDepreciationOnDisposalAccount_fkey"
- columns: ["accumulatedDepreciationOnDisposalAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_accumulatedDepreciationOnDisposalAccount_fkey";
+ columns: ["accumulatedDepreciationOnDisposalAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_accumulatedDepreciationOnDisposalAccount_fkey"
- columns: ["accumulatedDepreciationOnDisposalAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_accumulatedDepreciationOnDisposalAccount_fkey";
+ columns: ["accumulatedDepreciationOnDisposalAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_aquisitionCostAccount_fkey"
- columns: ["assetAquisitionCostAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_aquisitionCostAccount_fkey";
+ columns: ["assetAquisitionCostAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_aquisitionCostAccount_fkey"
- columns: ["assetAquisitionCostAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_aquisitionCostAccount_fkey";
+ columns: ["assetAquisitionCostAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_aquisitionCostOnDisposalAccount_fkey"
- columns: ["assetAquisitionCostOnDisposalAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_aquisitionCostOnDisposalAccount_fkey";
+ columns: ["assetAquisitionCostOnDisposalAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_aquisitionCostOnDisposalAccount_fkey"
- columns: ["assetAquisitionCostOnDisposalAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_aquisitionCostOnDisposalAccount_fkey";
+ columns: ["assetAquisitionCostOnDisposalAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_assetDepreciationExpenseAccount_fkey"
- columns: ["assetDepreciationExpenseAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_assetDepreciationExpenseAccount_fkey";
+ columns: ["assetDepreciationExpenseAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_assetDepreciationExpenseAccount_fkey"
- columns: ["assetDepreciationExpenseAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_assetDepreciationExpenseAccount_fkey";
+ columns: ["assetDepreciationExpenseAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_assetGainsAndLossesAccount_fkey"
- columns: ["assetGainsAndLossesAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_assetGainsAndLossesAccount_fkey";
+ columns: ["assetGainsAndLossesAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_assetGainsAndLossesAccount_fkey"
- columns: ["assetGainsAndLossesAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_assetGainsAndLossesAccount_fkey";
+ columns: ["assetGainsAndLossesAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_bankCashAccount_fkey"
- columns: ["bankCashAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_bankCashAccount_fkey";
+ columns: ["bankCashAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_bankCashAccount_fkey"
- columns: ["bankCashAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_bankCashAccount_fkey";
+ columns: ["bankCashAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_bankForeignCurrencyAccount_fkey"
- columns: ["bankForeignCurrencyAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_bankForeignCurrencyAccount_fkey";
+ columns: ["bankForeignCurrencyAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_bankForeignCurrencyAccount_fkey"
- columns: ["bankForeignCurrencyAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_bankForeignCurrencyAccount_fkey";
+ columns: ["bankForeignCurrencyAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_bankLocalCurrencyAccount_fkey"
- columns: ["bankLocalCurrencyAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_bankLocalCurrencyAccount_fkey";
+ columns: ["bankLocalCurrencyAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_bankLocalCurrencyAccount_fkey"
- columns: ["bankLocalCurrencyAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_bankLocalCurrencyAccount_fkey";
+ columns: ["bankLocalCurrencyAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_capacityVarianceAccount_fkey"
- columns: ["capacityVarianceAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_capacityVarianceAccount_fkey";
+ columns: ["capacityVarianceAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_capacityVarianceAccount_fkey"
- columns: ["capacityVarianceAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_capacityVarianceAccount_fkey";
+ columns: ["capacityVarianceAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_costOfGoodsSoldAccount_fkey"
- columns: ["costOfGoodsSoldAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_costOfGoodsSoldAccount_fkey";
+ columns: ["costOfGoodsSoldAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_costOfGoodsSoldAccount_fkey"
- columns: ["costOfGoodsSoldAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_costOfGoodsSoldAccount_fkey";
+ columns: ["costOfGoodsSoldAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_customerPaymentDiscountAccount_fkey"
- columns: ["customerPaymentDiscountAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_customerPaymentDiscountAccount_fkey";
+ columns: ["customerPaymentDiscountAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_customerPaymentDiscountAccount_fkey"
- columns: ["customerPaymentDiscountAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_customerPaymentDiscountAccount_fkey";
+ columns: ["customerPaymentDiscountAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_directCostAppliedAccount_fkey"
- columns: ["directCostAppliedAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_directCostAppliedAccount_fkey";
+ columns: ["directCostAppliedAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_directCostAppliedAccount_fkey"
- columns: ["directCostAppliedAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_directCostAppliedAccount_fkey";
+ columns: ["directCostAppliedAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_interestAccount_fkey"
- columns: ["interestAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_interestAccount_fkey";
+ columns: ["interestAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_interestAccount_fkey"
- columns: ["interestAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_interestAccount_fkey";
+ columns: ["interestAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_inventoryAccount_fkey"
- columns: ["inventoryAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_inventoryAccount_fkey";
+ columns: ["inventoryAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_inventoryAccount_fkey"
- columns: ["inventoryAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_inventoryAccount_fkey";
+ columns: ["inventoryAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_inventoryAdjustmentVarianceAccount_fkey"
- columns: ["inventoryAdjustmentVarianceAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_inventoryAdjustmentVarianceAccount_fkey";
+ columns: ["inventoryAdjustmentVarianceAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_inventoryAdjustmentVarianceAccount_fkey"
- columns: ["inventoryAdjustmentVarianceAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_inventoryAdjustmentVarianceAccount_fkey";
+ columns: ["inventoryAdjustmentVarianceAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_inventoryInterimAccrualAccount_fkey"
- columns: ["inventoryInterimAccrualAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_inventoryInterimAccrualAccount_fkey";
+ columns: ["inventoryInterimAccrualAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_inventoryInterimAccrualAccount_fkey"
- columns: ["inventoryInterimAccrualAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_inventoryInterimAccrualAccount_fkey";
+ columns: ["inventoryInterimAccrualAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_inventoryReceivedNotInvoicedAccount_fkey"
- columns: ["inventoryReceivedNotInvoicedAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_inventoryReceivedNotInvoicedAccount_fkey";
+ columns: ["inventoryReceivedNotInvoicedAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_inventoryReceivedNotInvoicedAccount_fkey"
- columns: ["inventoryReceivedNotInvoicedAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_inventoryReceivedNotInvoicedAccount_fkey";
+ columns: ["inventoryReceivedNotInvoicedAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_inventoryShippedNotInvoicedAccount_fkey"
- columns: ["inventoryShippedNotInvoicedAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_inventoryShippedNotInvoicedAccount_fkey";
+ columns: ["inventoryShippedNotInvoicedAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_inventoryShippedNotInvoicedAccount_fkey"
- columns: ["inventoryShippedNotInvoicedAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_inventoryShippedNotInvoicedAccount_fkey";
+ columns: ["inventoryShippedNotInvoicedAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_maintenanceAccount_fkey"
- columns: ["maintenanceAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_maintenanceAccount_fkey";
+ columns: ["maintenanceAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_maintenanceAccount_fkey"
- columns: ["maintenanceAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_maintenanceAccount_fkey";
+ columns: ["maintenanceAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_materialVarianceAccount_fkey"
- columns: ["materialVarianceAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_materialVarianceAccount_fkey";
+ columns: ["materialVarianceAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_materialVarianceAccount_fkey"
- columns: ["materialVarianceAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_materialVarianceAccount_fkey";
+ columns: ["materialVarianceAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_overheadAccount_fkey"
- columns: ["overheadAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_overheadAccount_fkey";
+ columns: ["overheadAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_overheadAccount_fkey"
- columns: ["overheadAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_overheadAccount_fkey";
+ columns: ["overheadAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_overheadCostAppliedAccount_fkey"
- columns: ["overheadCostAppliedAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_overheadCostAppliedAccount_fkey";
+ columns: ["overheadCostAppliedAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_overheadCostAppliedAccount_fkey"
- columns: ["overheadCostAppliedAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_overheadCostAppliedAccount_fkey";
+ columns: ["overheadCostAppliedAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_payablesAccount_fkey"
- columns: ["payablesAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_payablesAccount_fkey";
+ columns: ["payablesAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_payablesAccount_fkey"
- columns: ["payablesAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_payablesAccount_fkey";
+ columns: ["payablesAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_prepaymentAccount_fkey"
- columns: ["prepaymentAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_prepaymentAccount_fkey";
+ columns: ["prepaymentAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_prepaymentAccount_fkey"
- columns: ["prepaymentAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_prepaymentAccount_fkey";
+ columns: ["prepaymentAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_purchaseAccount_fkey"
- columns: ["purchaseAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_purchaseAccount_fkey";
+ columns: ["purchaseAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_purchaseAccount_fkey"
- columns: ["purchaseAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_purchaseAccount_fkey";
+ columns: ["purchaseAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_purchaseTaxPayableAccount_fkey"
- columns: ["purchaseTaxPayableAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_purchaseTaxPayableAccount_fkey";
+ columns: ["purchaseTaxPayableAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_purchaseTaxPayableAccount_fkey"
- columns: ["purchaseTaxPayableAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_purchaseTaxPayableAccount_fkey";
+ columns: ["purchaseTaxPayableAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_purchaseVarianceAccount_fkey"
- columns: ["purchaseVarianceAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_purchaseVarianceAccount_fkey";
+ columns: ["purchaseVarianceAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_purchaseVarianceAccount_fkey"
- columns: ["purchaseVarianceAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_purchaseVarianceAccount_fkey";
+ columns: ["purchaseVarianceAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_receivablesAccount_fkey"
- columns: ["receivablesAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_receivablesAccount_fkey";
+ columns: ["receivablesAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_receivablesAccount_fkey"
- columns: ["receivablesAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_receivablesAccount_fkey";
+ columns: ["receivablesAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_retainedEarningsAccount_fkey"
- columns: ["retainedEarningsAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_retainedEarningsAccount_fkey";
+ columns: ["retainedEarningsAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_retainedEarningsAccount_fkey"
- columns: ["retainedEarningsAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_retainedEarningsAccount_fkey";
+ columns: ["retainedEarningsAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_reverseChargeSalesTaxPayableAccount_fkey"
- columns: ["reverseChargeSalesTaxPayableAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_reverseChargeSalesTaxPayableAccount_fkey";
+ columns: ["reverseChargeSalesTaxPayableAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_reverseChargeSalesTaxPayableAccount_fkey"
- columns: ["reverseChargeSalesTaxPayableAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_reverseChargeSalesTaxPayableAccount_fkey";
+ columns: ["reverseChargeSalesTaxPayableAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_roundingAccount_fkey"
- columns: ["roundingAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_roundingAccount_fkey";
+ columns: ["roundingAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_roundingAccount_fkey"
- columns: ["roundingAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_roundingAccount_fkey";
+ columns: ["roundingAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_salesAccount_fkey"
- columns: ["salesAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_salesAccount_fkey";
+ columns: ["salesAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_salesAccount_fkey"
- columns: ["salesAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_salesAccount_fkey";
+ columns: ["salesAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_salesDiscountAccount_fkey"
- columns: ["salesDiscountAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_salesDiscountAccount_fkey";
+ columns: ["salesDiscountAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_salesDiscountAccount_fkey"
- columns: ["salesDiscountAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_salesDiscountAccount_fkey";
+ columns: ["salesDiscountAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_salesTaxPayableAccount_fkey"
- columns: ["salesTaxPayableAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_salesTaxPayableAccount_fkey";
+ columns: ["salesTaxPayableAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_salesTaxPayableAccount_fkey"
- columns: ["salesTaxPayableAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_salesTaxPayableAccount_fkey";
+ columns: ["salesTaxPayableAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_serviceChargeAccount_fkey"
- columns: ["serviceChargeAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_serviceChargeAccount_fkey";
+ columns: ["serviceChargeAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_serviceChargeAccount_fkey"
- columns: ["serviceChargeAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_serviceChargeAccount_fkey";
+ columns: ["serviceChargeAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_supplierPaymentDiscountAccount_fkey"
- columns: ["supplierPaymentDiscountAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_supplierPaymentDiscountAccount_fkey";
+ columns: ["supplierPaymentDiscountAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_supplierPaymentDiscountAccount_fkey"
- columns: ["supplierPaymentDiscountAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_supplierPaymentDiscountAccount_fkey";
+ columns: ["supplierPaymentDiscountAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "accountDefault_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "accountDefault_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "accountDefault_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "accountDefault_workInProgressAccount_fkey"
- columns: ["workInProgressAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_workInProgressAccount_fkey";
+ columns: ["workInProgressAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "accountDefault_workInProgressAccount_fkey"
- columns: ["workInProgressAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "accountDefault_workInProgressAccount_fkey";
+ columns: ["workInProgressAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
}
- ]
- }
+ ];
+ };
accountingPeriod: {
Row: {
- closedAt: string | null
- closedBy: string | null
- createdAt: string
- createdBy: string
- endDate: string
- id: string
- startDate: string
- status: Database["public"]["Enums"]["accountingPeriodStatus"]
- updatedAt: string | null
- updatedBy: string | null
- }
+ closedAt: string | null;
+ closedBy: string | null;
+ createdAt: string;
+ createdBy: string;
+ endDate: string;
+ id: string;
+ startDate: string;
+ status: Database["public"]["Enums"]["accountingPeriodStatus"];
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- closedAt?: string | null
- closedBy?: string | null
- createdAt?: string
- createdBy: string
- endDate: string
- id?: string
- startDate: string
- status?: Database["public"]["Enums"]["accountingPeriodStatus"]
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ closedAt?: string | null;
+ closedBy?: string | null;
+ createdAt?: string;
+ createdBy: string;
+ endDate: string;
+ id?: string;
+ startDate: string;
+ status?: Database["public"]["Enums"]["accountingPeriodStatus"];
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- closedAt?: string | null
- closedBy?: string | null
- createdAt?: string
- createdBy?: string
- endDate?: string
- id?: string
- startDate?: string
- status?: Database["public"]["Enums"]["accountingPeriodStatus"]
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ closedAt?: string | null;
+ closedBy?: string | null;
+ createdAt?: string;
+ createdBy?: string;
+ endDate?: string;
+ id?: string;
+ startDate?: string;
+ status?: Database["public"]["Enums"]["accountingPeriodStatus"];
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "accountingPeriod_closedBy_fkey"
- columns: ["closedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "accountingPeriod_closedBy_fkey";
+ columns: ["closedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "accountingPeriod_closedBy_fkey"
- columns: ["closedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "accountingPeriod_closedBy_fkey";
+ columns: ["closedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "accountingPeriod_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "accountingPeriod_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "accountingPeriod_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "accountingPeriod_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "accountingPeriod_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "accountingPeriod_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "accountingPeriod_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "accountingPeriod_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
accountSubcategory: {
Row: {
- accountCategoryId: string
- active: boolean
- createdAt: string
- createdBy: string
- id: string
- name: string
- updatedAt: string | null
- updatedBy: string | null
- }
+ accountCategoryId: string;
+ active: boolean;
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ name: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- accountCategoryId: string
- active?: boolean
- createdAt?: string
- createdBy: string
- id?: string
- name: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ accountCategoryId: string;
+ active?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ name: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- accountCategoryId?: string
- active?: boolean
- createdAt?: string
- createdBy?: string
- id?: string
- name?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ accountCategoryId?: string;
+ active?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ name?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "accountSubcategory_accountCategoryId_fkey"
- columns: ["accountCategoryId"]
- referencedRelation: "accountCategory"
- referencedColumns: ["id"]
+ foreignKeyName: "accountSubcategory_accountCategoryId_fkey";
+ columns: ["accountCategoryId"];
+ referencedRelation: "accountCategory";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "accountSubcategory_accountCategoryId_fkey"
- columns: ["accountCategoryId"]
- referencedRelation: "accountCategories"
- referencedColumns: ["id"]
+ foreignKeyName: "accountSubcategory_accountCategoryId_fkey";
+ columns: ["accountCategoryId"];
+ referencedRelation: "accountCategories";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "accountSubcategory_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "accountSubcategory_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "accountSubcategory_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "accountSubcategory_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "accountSubcategory_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "accountSubcategory_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "accountSubcategory_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "accountSubcategory_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
address: {
Row: {
- addressLine1: string | null
- addressLine2: string | null
- city: string | null
- countryId: number | null
- fax: string | null
- id: string
- phone: string | null
- postalCode: string | null
- state: string | null
- }
+ addressLine1: string | null;
+ addressLine2: string | null;
+ city: string | null;
+ countryId: number | null;
+ fax: string | null;
+ id: string;
+ phone: string | null;
+ postalCode: string | null;
+ state: string | null;
+ };
Insert: {
- addressLine1?: string | null
- addressLine2?: string | null
- city?: string | null
- countryId?: number | null
- fax?: string | null
- id?: string
- phone?: string | null
- postalCode?: string | null
- state?: string | null
- }
+ addressLine1?: string | null;
+ addressLine2?: string | null;
+ city?: string | null;
+ countryId?: number | null;
+ fax?: string | null;
+ id?: string;
+ phone?: string | null;
+ postalCode?: string | null;
+ state?: string | null;
+ };
Update: {
- addressLine1?: string | null
- addressLine2?: string | null
- city?: string | null
- countryId?: number | null
- fax?: string | null
- id?: string
- phone?: string | null
- postalCode?: string | null
- state?: string | null
- }
+ addressLine1?: string | null;
+ addressLine2?: string | null;
+ city?: string | null;
+ countryId?: number | null;
+ fax?: string | null;
+ id?: string;
+ phone?: string | null;
+ postalCode?: string | null;
+ state?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "address_countryId_fkey"
- columns: ["countryId"]
- referencedRelation: "country"
- referencedColumns: ["id"]
+ foreignKeyName: "address_countryId_fkey";
+ columns: ["countryId"];
+ referencedRelation: "country";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
attributeDataType: {
Row: {
- id: number
- isBoolean: boolean
- isDate: boolean
- isList: boolean
- isNumeric: boolean
- isText: boolean
- isUser: boolean
- label: string
- }
+ id: number;
+ isBoolean: boolean;
+ isDate: boolean;
+ isList: boolean;
+ isNumeric: boolean;
+ isText: boolean;
+ isUser: boolean;
+ label: string;
+ };
Insert: {
- id?: number
- isBoolean?: boolean
- isDate?: boolean
- isList?: boolean
- isNumeric?: boolean
- isText?: boolean
- isUser?: boolean
- label: string
- }
+ id?: number;
+ isBoolean?: boolean;
+ isDate?: boolean;
+ isList?: boolean;
+ isNumeric?: boolean;
+ isText?: boolean;
+ isUser?: boolean;
+ label: string;
+ };
Update: {
- id?: number
- isBoolean?: boolean
- isDate?: boolean
- isList?: boolean
- isNumeric?: boolean
- isText?: boolean
- isUser?: boolean
- label?: string
- }
- Relationships: []
- }
+ id?: number;
+ isBoolean?: boolean;
+ isDate?: boolean;
+ isList?: boolean;
+ isNumeric?: boolean;
+ isText?: boolean;
+ isUser?: boolean;
+ label?: string;
+ };
+ Relationships: [];
+ };
+ company: {
+ Row: {
+ addressLine1: string | null;
+ addressLine2: string | null;
+ city: string | null;
+ countryCode: string | null;
+ email: string | null;
+ fax: string | null;
+ id: boolean;
+ logo: string | null;
+ name: string;
+ phone: string | null;
+ postalCode: string | null;
+ state: string | null;
+ taxId: string | null;
+ website: string | null;
+ };
+ Insert: {
+ addressLine1?: string | null;
+ addressLine2?: string | null;
+ city?: string | null;
+ countryCode?: string | null;
+ email?: string | null;
+ fax?: string | null;
+ id?: boolean;
+ logo?: string | null;
+ name: string;
+ phone?: string | null;
+ postalCode?: string | null;
+ state?: string | null;
+ taxId?: string | null;
+ website?: string | null;
+ };
+ Update: {
+ addressLine1?: string | null;
+ addressLine2?: string | null;
+ city?: string | null;
+ countryCode?: string | null;
+ email?: string | null;
+ fax?: string | null;
+ id?: boolean;
+ logo?: string | null;
+ name?: string;
+ phone?: string | null;
+ postalCode?: string | null;
+ state?: string | null;
+ taxId?: string | null;
+ website?: string | null;
+ };
+ Relationships: [];
+ };
contact: {
Row: {
- addressLine1: string | null
- addressLine2: string | null
- birthday: string | null
- city: string | null
- countryId: number | null
- email: string
- fax: string | null
- firstName: string
- fullName: string | null
- homePhone: string | null
- id: string
- lastName: string
- mobilePhone: string | null
- notes: string | null
- postalCode: string | null
- state: string | null
- title: string | null
- workPhone: string | null
- }
+ addressLine1: string | null;
+ addressLine2: string | null;
+ birthday: string | null;
+ city: string | null;
+ countryId: number | null;
+ email: string;
+ fax: string | null;
+ firstName: string;
+ fullName: string | null;
+ homePhone: string | null;
+ id: string;
+ lastName: string;
+ mobilePhone: string | null;
+ notes: string | null;
+ postalCode: string | null;
+ state: string | null;
+ title: string | null;
+ workPhone: string | null;
+ };
Insert: {
- addressLine1?: string | null
- addressLine2?: string | null
- birthday?: string | null
- city?: string | null
- countryId?: number | null
- email: string
- fax?: string | null
- firstName: string
- fullName?: string | null
- homePhone?: string | null
- id?: string
- lastName: string
- mobilePhone?: string | null
- notes?: string | null
- postalCode?: string | null
- state?: string | null
- title?: string | null
- workPhone?: string | null
- }
+ addressLine1?: string | null;
+ addressLine2?: string | null;
+ birthday?: string | null;
+ city?: string | null;
+ countryId?: number | null;
+ email: string;
+ fax?: string | null;
+ firstName: string;
+ fullName?: string | null;
+ homePhone?: string | null;
+ id?: string;
+ lastName: string;
+ mobilePhone?: string | null;
+ notes?: string | null;
+ postalCode?: string | null;
+ state?: string | null;
+ title?: string | null;
+ workPhone?: string | null;
+ };
Update: {
- addressLine1?: string | null
- addressLine2?: string | null
- birthday?: string | null
- city?: string | null
- countryId?: number | null
- email?: string
- fax?: string | null
- firstName?: string
- fullName?: string | null
- homePhone?: string | null
- id?: string
- lastName?: string
- mobilePhone?: string | null
- notes?: string | null
- postalCode?: string | null
- state?: string | null
- title?: string | null
- workPhone?: string | null
- }
+ addressLine1?: string | null;
+ addressLine2?: string | null;
+ birthday?: string | null;
+ city?: string | null;
+ countryId?: number | null;
+ email?: string;
+ fax?: string | null;
+ firstName?: string;
+ fullName?: string | null;
+ homePhone?: string | null;
+ id?: string;
+ lastName?: string;
+ mobilePhone?: string | null;
+ notes?: string | null;
+ postalCode?: string | null;
+ state?: string | null;
+ title?: string | null;
+ workPhone?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "contact_countryId_fkey"
- columns: ["countryId"]
- referencedRelation: "country"
- referencedColumns: ["id"]
+ foreignKeyName: "contact_countryId_fkey";
+ columns: ["countryId"];
+ referencedRelation: "country";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
contractor: {
Row: {
- active: boolean
- createdAt: string
- createdBy: string
- hoursPerWeek: number
- id: string
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ createdAt: string;
+ createdBy: string;
+ hoursPerWeek: number;
+ id: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- createdAt?: string
- createdBy: string
- hoursPerWeek?: number
- id: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ hoursPerWeek?: number;
+ id: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- createdAt?: string
- createdBy?: string
- hoursPerWeek?: number
- id?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ hoursPerWeek?: number;
+ id?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "contractor_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "contractor_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "contractor_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "contractor_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "contractor_id_fkey"
- columns: ["id"]
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
+ foreignKeyName: "contractor_id_fkey";
+ columns: ["id"];
+ referencedRelation: "supplierContact";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "contractor_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "contractor_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "contractor_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "contractor_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
contractorAbility: {
Row: {
- abilityId: string
- contractorId: string
- createdAt: string
- createdBy: string
- }
+ abilityId: string;
+ contractorId: string;
+ createdAt: string;
+ createdBy: string;
+ };
Insert: {
- abilityId: string
- contractorId: string
- createdAt?: string
- createdBy: string
- }
+ abilityId: string;
+ contractorId: string;
+ createdAt?: string;
+ createdBy: string;
+ };
Update: {
- abilityId?: string
- contractorId?: string
- createdAt?: string
- createdBy?: string
- }
+ abilityId?: string;
+ contractorId?: string;
+ createdAt?: string;
+ createdBy?: string;
+ };
Relationships: [
{
- foreignKeyName: "contractorAbility_abilityId_fkey"
- columns: ["abilityId"]
- referencedRelation: "ability"
- referencedColumns: ["id"]
+ foreignKeyName: "contractorAbility_abilityId_fkey";
+ columns: ["abilityId"];
+ referencedRelation: "ability";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "contractorAbility_contractorId_fkey"
- columns: ["contractorId"]
- referencedRelation: "contractor"
- referencedColumns: ["id"]
+ foreignKeyName: "contractorAbility_contractorId_fkey";
+ columns: ["contractorId"];
+ referencedRelation: "contractor";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "contractorAbility_contractorId_fkey"
- columns: ["contractorId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierContactId"]
+ foreignKeyName: "contractorAbility_contractorId_fkey";
+ columns: ["contractorId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierContactId"];
},
{
- foreignKeyName: "contractorAbility_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "contractorAbility_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "contractorAbility_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "contractorAbility_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
costLedger: {
Row: {
- adjustment: boolean
- cost: number
- costLedgerType: Database["public"]["Enums"]["costLedgerType"]
- costPostedToGL: number
- createdAt: string
- documentId: string | null
+ adjustment: boolean;
+ cost: number;
+ costLedgerType: Database["public"]["Enums"]["costLedgerType"];
+ costPostedToGL: number;
+ createdAt: string;
+ documentId: string | null;
documentType:
| Database["public"]["Enums"]["partLedgerDocumentType"]
- | null
- entryNumber: number
- externalDocumentId: string | null
- id: string
- partId: string | null
- partLedgerType: Database["public"]["Enums"]["partLedgerType"]
- postingDate: string
- quantity: number
- }
+ | null;
+ entryNumber: number;
+ externalDocumentId: string | null;
+ id: string;
+ partId: string | null;
+ partLedgerType: Database["public"]["Enums"]["partLedgerType"];
+ postingDate: string;
+ quantity: number;
+ };
Insert: {
- adjustment?: boolean
- cost?: number
- costLedgerType: Database["public"]["Enums"]["costLedgerType"]
- costPostedToGL?: number
- createdAt?: string
- documentId?: string | null
+ adjustment?: boolean;
+ cost?: number;
+ costLedgerType: Database["public"]["Enums"]["costLedgerType"];
+ costPostedToGL?: number;
+ createdAt?: string;
+ documentId?: string | null;
documentType?:
| Database["public"]["Enums"]["partLedgerDocumentType"]
- | null
- entryNumber?: number
- externalDocumentId?: string | null
- id?: string
- partId?: string | null
- partLedgerType: Database["public"]["Enums"]["partLedgerType"]
- postingDate?: string
- quantity?: number
- }
+ | null;
+ entryNumber?: number;
+ externalDocumentId?: string | null;
+ id?: string;
+ partId?: string | null;
+ partLedgerType: Database["public"]["Enums"]["partLedgerType"];
+ postingDate?: string;
+ quantity?: number;
+ };
Update: {
- adjustment?: boolean
- cost?: number
- costLedgerType?: Database["public"]["Enums"]["costLedgerType"]
- costPostedToGL?: number
- createdAt?: string
- documentId?: string | null
+ adjustment?: boolean;
+ cost?: number;
+ costLedgerType?: Database["public"]["Enums"]["costLedgerType"];
+ costPostedToGL?: number;
+ createdAt?: string;
+ documentId?: string | null;
documentType?:
| Database["public"]["Enums"]["partLedgerDocumentType"]
- | null
- entryNumber?: number
- externalDocumentId?: string | null
- id?: string
- partId?: string | null
- partLedgerType?: Database["public"]["Enums"]["partLedgerType"]
- postingDate?: string
- quantity?: number
- }
- Relationships: []
- }
+ | null;
+ entryNumber?: number;
+ externalDocumentId?: string | null;
+ id?: string;
+ partId?: string | null;
+ partLedgerType?: Database["public"]["Enums"]["partLedgerType"];
+ postingDate?: string;
+ quantity?: number;
+ };
+ Relationships: [];
+ };
country: {
Row: {
- code: string
- id: number
- name: string
- }
+ code: string;
+ id: number;
+ name: string;
+ };
Insert: {
- code: string
- id?: number
- name: string
- }
+ code: string;
+ id?: number;
+ name: string;
+ };
Update: {
- code?: string
- id?: number
- name?: string
- }
- Relationships: []
- }
+ code?: string;
+ id?: number;
+ name?: string;
+ };
+ Relationships: [];
+ };
crew: {
Row: {
- crewLeaderId: string | null
- description: string | null
- groupId: string
- id: string
- name: string
- workCellId: string | null
- }
+ crewLeaderId: string | null;
+ description: string | null;
+ groupId: string;
+ id: string;
+ name: string;
+ workCellId: string | null;
+ };
Insert: {
- crewLeaderId?: string | null
- description?: string | null
- groupId: string
- id?: string
- name: string
- workCellId?: string | null
- }
+ crewLeaderId?: string | null;
+ description?: string | null;
+ groupId: string;
+ id?: string;
+ name: string;
+ workCellId?: string | null;
+ };
Update: {
- crewLeaderId?: string | null
- description?: string | null
- groupId?: string
- id?: string
- name?: string
- workCellId?: string | null
- }
+ crewLeaderId?: string | null;
+ description?: string | null;
+ groupId?: string;
+ id?: string;
+ name?: string;
+ workCellId?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "crew_crewLeaderId_fkey"
- columns: ["crewLeaderId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "crew_crewLeaderId_fkey";
+ columns: ["crewLeaderId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "crew_crewLeaderId_fkey"
- columns: ["crewLeaderId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "crew_crewLeaderId_fkey";
+ columns: ["crewLeaderId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "crew_groupId_fkey"
- columns: ["groupId"]
- referencedRelation: "group"
- referencedColumns: ["id"]
+ foreignKeyName: "crew_groupId_fkey";
+ columns: ["groupId"];
+ referencedRelation: "group";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "crew_workCellId_fkey"
- columns: ["workCellId"]
- referencedRelation: "workCell"
- referencedColumns: ["id"]
+ foreignKeyName: "crew_workCellId_fkey";
+ columns: ["workCellId"];
+ referencedRelation: "workCell";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
crewAbility: {
Row: {
- abilityId: string
- active: boolean
- crewId: string
- id: string
- }
+ abilityId: string;
+ active: boolean;
+ crewId: string;
+ id: string;
+ };
Insert: {
- abilityId: string
- active?: boolean
- crewId: string
- id?: string
- }
+ abilityId: string;
+ active?: boolean;
+ crewId: string;
+ id?: string;
+ };
Update: {
- abilityId?: string
- active?: boolean
- crewId?: string
- id?: string
- }
+ abilityId?: string;
+ active?: boolean;
+ crewId?: string;
+ id?: string;
+ };
Relationships: [
{
- foreignKeyName: "crewAbility_abilityId_fkey"
- columns: ["abilityId"]
- referencedRelation: "ability"
- referencedColumns: ["id"]
+ foreignKeyName: "crewAbility_abilityId_fkey";
+ columns: ["abilityId"];
+ referencedRelation: "ability";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "crewAbility_crewId_fkey"
- columns: ["crewId"]
- referencedRelation: "crew"
- referencedColumns: ["id"]
+ foreignKeyName: "crewAbility_crewId_fkey";
+ columns: ["crewId"];
+ referencedRelation: "crew";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
currency: {
Row: {
- active: boolean
- code: string
- createdAt: string
- createdBy: string
- exchangeRate: number
- id: string
- isBaseCurrency: boolean
- name: string
- symbol: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ code: string;
+ createdAt: string;
+ createdBy: string;
+ exchangeRate: number;
+ id: string;
+ isBaseCurrency: boolean;
+ name: string;
+ symbol: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- code: string
- createdAt?: string
- createdBy: string
- exchangeRate?: number
- id?: string
- isBaseCurrency?: boolean
- name: string
- symbol?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ code: string;
+ createdAt?: string;
+ createdBy: string;
+ exchangeRate?: number;
+ id?: string;
+ isBaseCurrency?: boolean;
+ name: string;
+ symbol?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- code?: string
- createdAt?: string
- createdBy?: string
- exchangeRate?: number
- id?: string
- isBaseCurrency?: boolean
- name?: string
- symbol?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ code?: string;
+ createdAt?: string;
+ createdBy?: string;
+ exchangeRate?: number;
+ id?: string;
+ isBaseCurrency?: boolean;
+ name?: string;
+ symbol?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "currency_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "currency_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "currency_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "currency_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "currency_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "currency_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "currency_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "currency_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
customer: {
Row: {
- accountManagerId: string | null
- createdAt: string
- createdBy: string | null
- customerStatusId: string | null
- customerTypeId: string | null
- id: string
- logo: string | null
- name: string
- taxId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ accountManagerId: string | null;
+ createdAt: string;
+ createdBy: string | null;
+ customerStatusId: string | null;
+ customerTypeId: string | null;
+ id: string;
+ logo: string | null;
+ name: string;
+ taxId: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- accountManagerId?: string | null
- createdAt?: string
- createdBy?: string | null
- customerStatusId?: string | null
- customerTypeId?: string | null
- id?: string
- logo?: string | null
- name: string
- taxId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ accountManagerId?: string | null;
+ createdAt?: string;
+ createdBy?: string | null;
+ customerStatusId?: string | null;
+ customerTypeId?: string | null;
+ id?: string;
+ logo?: string | null;
+ name: string;
+ taxId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- accountManagerId?: string | null
- createdAt?: string
- createdBy?: string | null
- customerStatusId?: string | null
- customerTypeId?: string | null
- id?: string
- logo?: string | null
- name?: string
- taxId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ accountManagerId?: string | null;
+ createdAt?: string;
+ createdBy?: string | null;
+ customerStatusId?: string | null;
+ customerTypeId?: string | null;
+ id?: string;
+ logo?: string | null;
+ name?: string;
+ taxId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "customer_accountManagerId_fkey"
- columns: ["accountManagerId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "customer_accountManagerId_fkey";
+ columns: ["accountManagerId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customer_accountManagerId_fkey"
- columns: ["accountManagerId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "customer_accountManagerId_fkey";
+ columns: ["accountManagerId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "customer_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "customer_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customer_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "customer_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "customer_customerStatusId_fkey"
- columns: ["customerStatusId"]
- referencedRelation: "customerStatus"
- referencedColumns: ["id"]
+ foreignKeyName: "customer_customerStatusId_fkey";
+ columns: ["customerStatusId"];
+ referencedRelation: "customerStatus";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customer_customerTypeId_fkey"
- columns: ["customerTypeId"]
- referencedRelation: "customerType"
- referencedColumns: ["id"]
+ foreignKeyName: "customer_customerTypeId_fkey";
+ columns: ["customerTypeId"];
+ referencedRelation: "customerType";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customer_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "customer_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customer_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "customer_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
customerAccount: {
Row: {
- customerId: string
- id: string
- }
+ customerId: string;
+ id: string;
+ };
Insert: {
- customerId: string
- id: string
- }
+ customerId: string;
+ id: string;
+ };
Update: {
- customerId?: string
- id?: string
- }
+ customerId?: string;
+ id?: string;
+ };
Relationships: [
{
- foreignKeyName: "customerAccount_customerId_fkey"
- columns: ["customerId"]
- referencedRelation: "customer"
- referencedColumns: ["id"]
+ foreignKeyName: "customerAccount_customerId_fkey";
+ columns: ["customerId"];
+ referencedRelation: "customer";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerAccount_customerId_fkey"
- columns: ["customerId"]
- referencedRelation: "customers"
- referencedColumns: ["id"]
+ foreignKeyName: "customerAccount_customerId_fkey";
+ columns: ["customerId"];
+ referencedRelation: "customers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerAccount_id_fkey"
- columns: ["id"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "customerAccount_id_fkey";
+ columns: ["id"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerAccount_id_fkey"
- columns: ["id"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "customerAccount_id_fkey";
+ columns: ["id"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
customerContact: {
Row: {
- contactId: string
- customerId: string
- customerLocationId: string | null
- id: string
- userId: string | null
- }
+ contactId: string;
+ customerId: string;
+ customerLocationId: string | null;
+ id: string;
+ userId: string | null;
+ };
Insert: {
- contactId: string
- customerId: string
- customerLocationId?: string | null
- id?: string
- userId?: string | null
- }
+ contactId: string;
+ customerId: string;
+ customerLocationId?: string | null;
+ id?: string;
+ userId?: string | null;
+ };
Update: {
- contactId?: string
- customerId?: string
- customerLocationId?: string | null
- id?: string
- userId?: string | null
- }
+ contactId?: string;
+ customerId?: string;
+ customerLocationId?: string | null;
+ id?: string;
+ userId?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "customerContact_contactId_fkey"
- columns: ["contactId"]
- referencedRelation: "contact"
- referencedColumns: ["id"]
+ foreignKeyName: "customerContact_contactId_fkey";
+ columns: ["contactId"];
+ referencedRelation: "contact";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerContact_customerId_fkey"
- columns: ["customerId"]
- referencedRelation: "customer"
- referencedColumns: ["id"]
+ foreignKeyName: "customerContact_customerId_fkey";
+ columns: ["customerId"];
+ referencedRelation: "customer";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerContact_customerId_fkey"
- columns: ["customerId"]
- referencedRelation: "customers"
- referencedColumns: ["id"]
+ foreignKeyName: "customerContact_customerId_fkey";
+ columns: ["customerId"];
+ referencedRelation: "customers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerContact_customerLocationId_fkey"
- columns: ["customerLocationId"]
- referencedRelation: "customerLocation"
- referencedColumns: ["id"]
+ foreignKeyName: "customerContact_customerLocationId_fkey";
+ columns: ["customerLocationId"];
+ referencedRelation: "customerLocation";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerContact_userId_fkey"
- columns: ["userId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "customerContact_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerContact_userId_fkey"
- columns: ["userId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "customerContact_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
customerLocation: {
Row: {
- addressId: string
- customerId: string
- id: string
- }
+ addressId: string;
+ customerId: string;
+ id: string;
+ };
Insert: {
- addressId: string
- customerId: string
- id?: string
- }
+ addressId: string;
+ customerId: string;
+ id?: string;
+ };
Update: {
- addressId?: string
- customerId?: string
- id?: string
- }
+ addressId?: string;
+ customerId?: string;
+ id?: string;
+ };
Relationships: [
{
- foreignKeyName: "customerLocation_addressId_fkey"
- columns: ["addressId"]
- referencedRelation: "address"
- referencedColumns: ["id"]
+ foreignKeyName: "customerLocation_addressId_fkey";
+ columns: ["addressId"];
+ referencedRelation: "address";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerLocation_customerId_fkey"
- columns: ["customerId"]
- referencedRelation: "customer"
- referencedColumns: ["id"]
+ foreignKeyName: "customerLocation_customerId_fkey";
+ columns: ["customerId"];
+ referencedRelation: "customer";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerLocation_customerId_fkey"
- columns: ["customerId"]
- referencedRelation: "customers"
- referencedColumns: ["id"]
+ foreignKeyName: "customerLocation_customerId_fkey";
+ columns: ["customerId"];
+ referencedRelation: "customers";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
customerPayment: {
Row: {
- currencyCode: string | null
- customerId: string
- invoiceCustomerContactId: string | null
- invoiceCustomerId: string | null
- invoiceCustomerLocationId: string | null
- paymentTermId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ currencyCode: string | null;
+ customerId: string;
+ invoiceCustomerContactId: string | null;
+ invoiceCustomerId: string | null;
+ invoiceCustomerLocationId: string | null;
+ paymentTermId: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- currencyCode?: string | null
- customerId: string
- invoiceCustomerContactId?: string | null
- invoiceCustomerId?: string | null
- invoiceCustomerLocationId?: string | null
- paymentTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ currencyCode?: string | null;
+ customerId: string;
+ invoiceCustomerContactId?: string | null;
+ invoiceCustomerId?: string | null;
+ invoiceCustomerLocationId?: string | null;
+ paymentTermId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- currencyCode?: string | null
- customerId?: string
- invoiceCustomerContactId?: string | null
- invoiceCustomerId?: string | null
- invoiceCustomerLocationId?: string | null
- paymentTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ currencyCode?: string | null;
+ customerId?: string;
+ invoiceCustomerContactId?: string | null;
+ invoiceCustomerId?: string | null;
+ invoiceCustomerLocationId?: string | null;
+ paymentTermId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "customerPayment_customerId_fkey"
- columns: ["customerId"]
- referencedRelation: "customer"
- referencedColumns: ["id"]
+ foreignKeyName: "customerPayment_customerId_fkey";
+ columns: ["customerId"];
+ referencedRelation: "customer";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerPayment_customerId_fkey"
- columns: ["customerId"]
- referencedRelation: "customers"
- referencedColumns: ["id"]
+ foreignKeyName: "customerPayment_customerId_fkey";
+ columns: ["customerId"];
+ referencedRelation: "customers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerPayment_invoiceCustomerContactId_fkey"
- columns: ["invoiceCustomerContactId"]
- referencedRelation: "customerContact"
- referencedColumns: ["id"]
+ foreignKeyName: "customerPayment_invoiceCustomerContactId_fkey";
+ columns: ["invoiceCustomerContactId"];
+ referencedRelation: "customerContact";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerPayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
- referencedRelation: "customer"
- referencedColumns: ["id"]
+ foreignKeyName: "customerPayment_invoiceCustomerId_fkey";
+ columns: ["invoiceCustomerId"];
+ referencedRelation: "customer";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerPayment_invoiceCustomerId_fkey"
- columns: ["invoiceCustomerId"]
- referencedRelation: "customers"
- referencedColumns: ["id"]
+ foreignKeyName: "customerPayment_invoiceCustomerId_fkey";
+ columns: ["invoiceCustomerId"];
+ referencedRelation: "customers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerPayment_invoiceCustomerLocationId_fkey"
- columns: ["invoiceCustomerLocationId"]
- referencedRelation: "customerLocation"
- referencedColumns: ["id"]
+ foreignKeyName: "customerPayment_invoiceCustomerLocationId_fkey";
+ columns: ["invoiceCustomerLocationId"];
+ referencedRelation: "customerLocation";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerPayment_paymentTermId_fkey"
- columns: ["paymentTermId"]
- referencedRelation: "paymentTerm"
- referencedColumns: ["id"]
+ foreignKeyName: "customerPayment_paymentTermId_fkey";
+ columns: ["paymentTermId"];
+ referencedRelation: "paymentTerm";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerPayment_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "customerPayment_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerPayment_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "customerPayment_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
customerShipping: {
Row: {
- customerId: string
- shippingCustomerContactId: string | null
- shippingCustomerId: string | null
- shippingCustomerLocationId: string | null
- shippingMethodId: string | null
- shippingTermId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ customerId: string;
+ shippingCustomerContactId: string | null;
+ shippingCustomerId: string | null;
+ shippingCustomerLocationId: string | null;
+ shippingMethodId: string | null;
+ shippingTermId: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- customerId: string
- shippingCustomerContactId?: string | null
- shippingCustomerId?: string | null
- shippingCustomerLocationId?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ customerId: string;
+ shippingCustomerContactId?: string | null;
+ shippingCustomerId?: string | null;
+ shippingCustomerLocationId?: string | null;
+ shippingMethodId?: string | null;
+ shippingTermId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- customerId?: string
- shippingCustomerContactId?: string | null
- shippingCustomerId?: string | null
- shippingCustomerLocationId?: string | null
- shippingMethodId?: string | null
- shippingTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ customerId?: string;
+ shippingCustomerContactId?: string | null;
+ shippingCustomerId?: string | null;
+ shippingCustomerLocationId?: string | null;
+ shippingMethodId?: string | null;
+ shippingTermId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "customerShipping_customerId_fkey"
- columns: ["customerId"]
- referencedRelation: "customer"
- referencedColumns: ["id"]
+ foreignKeyName: "customerShipping_customerId_fkey";
+ columns: ["customerId"];
+ referencedRelation: "customer";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerShipping_customerId_fkey"
- columns: ["customerId"]
- referencedRelation: "customers"
- referencedColumns: ["id"]
+ foreignKeyName: "customerShipping_customerId_fkey";
+ columns: ["customerId"];
+ referencedRelation: "customers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerShipping_shippingCustomerContactId_fkey"
- columns: ["shippingCustomerContactId"]
- referencedRelation: "customerContact"
- referencedColumns: ["id"]
+ foreignKeyName: "customerShipping_shippingCustomerContactId_fkey";
+ columns: ["shippingCustomerContactId"];
+ referencedRelation: "customerContact";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerShipping_shippingCustomerId_fkey"
- columns: ["shippingCustomerId"]
- referencedRelation: "customer"
- referencedColumns: ["id"]
+ foreignKeyName: "customerShipping_shippingCustomerId_fkey";
+ columns: ["shippingCustomerId"];
+ referencedRelation: "customer";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerShipping_shippingCustomerId_fkey"
- columns: ["shippingCustomerId"]
- referencedRelation: "customers"
- referencedColumns: ["id"]
+ foreignKeyName: "customerShipping_shippingCustomerId_fkey";
+ columns: ["shippingCustomerId"];
+ referencedRelation: "customers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerShipping_shippingCustomerLocationId_fkey"
- columns: ["shippingCustomerLocationId"]
- referencedRelation: "customerLocation"
- referencedColumns: ["id"]
+ foreignKeyName: "customerShipping_shippingCustomerLocationId_fkey";
+ columns: ["shippingCustomerLocationId"];
+ referencedRelation: "customerLocation";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerShipping_shippingMethodId_fkey"
- columns: ["shippingMethodId"]
- referencedRelation: "shippingMethod"
- referencedColumns: ["id"]
+ foreignKeyName: "customerShipping_shippingMethodId_fkey";
+ columns: ["shippingMethodId"];
+ referencedRelation: "shippingMethod";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerShipping_shippingTermId_fkey"
- columns: ["shippingTermId"]
- referencedRelation: "shippingTerm"
- referencedColumns: ["id"]
+ foreignKeyName: "customerShipping_shippingTermId_fkey";
+ columns: ["shippingTermId"];
+ referencedRelation: "shippingTerm";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerShipping_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "customerShipping_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerShipping_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "customerShipping_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
customerStatus: {
Row: {
- createdAt: string
- id: string
- name: string
- updatedAt: string | null
- }
+ createdAt: string;
+ id: string;
+ name: string;
+ updatedAt: string | null;
+ };
Insert: {
- createdAt?: string
- id?: string
- name: string
- updatedAt?: string | null
- }
+ createdAt?: string;
+ id?: string;
+ name: string;
+ updatedAt?: string | null;
+ };
Update: {
- createdAt?: string
- id?: string
- name?: string
- updatedAt?: string | null
- }
- Relationships: []
- }
+ createdAt?: string;
+ id?: string;
+ name?: string;
+ updatedAt?: string | null;
+ };
+ Relationships: [];
+ };
customerType: {
Row: {
- color: string | null
- createdAt: string
- createdBy: string
- id: string
- name: string
- protected: boolean
- updatedAt: string | null
- updatedBy: string | null
- }
+ color: string | null;
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ name: string;
+ protected: boolean;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- color?: string | null
- createdAt?: string
- createdBy: string
- id?: string
- name: string
- protected?: boolean
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ color?: string | null;
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ name: string;
+ protected?: boolean;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- color?: string | null
- createdAt?: string
- createdBy?: string
- id?: string
- name?: string
- protected?: boolean
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ color?: string | null;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ name?: string;
+ protected?: boolean;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "customerType_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "customerType_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerType_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "customerType_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "customerType_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "customerType_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customerType_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "customerType_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
department: {
Row: {
- color: string
- createdAt: string
- createdBy: string
- id: string
- name: string
- parentDepartmentId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ color: string;
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ name: string;
+ parentDepartmentId: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- color?: string
- createdAt?: string
- createdBy: string
- id?: string
- name: string
- parentDepartmentId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ color?: string;
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ name: string;
+ parentDepartmentId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- color?: string
- createdAt?: string
- createdBy?: string
- id?: string
- name?: string
- parentDepartmentId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ color?: string;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ name?: string;
+ parentDepartmentId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "department_parentDepartmentId_fkey"
- columns: ["parentDepartmentId"]
- referencedRelation: "department"
- referencedColumns: ["id"]
+ foreignKeyName: "department_parentDepartmentId_fkey";
+ columns: ["parentDepartmentId"];
+ referencedRelation: "department";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
document: {
Row: {
- active: boolean
- createdAt: string
- createdBy: string
- description: string | null
- id: string
- name: string
- path: string
- readGroups: string[] | null
- size: number
- type: string | null
- updatedAt: string | null
- updatedBy: string | null
- writeGroups: string[] | null
- }
+ active: boolean;
+ createdAt: string;
+ createdBy: string;
+ description: string | null;
+ id: string;
+ name: string;
+ path: string;
+ readGroups: string[] | null;
+ size: number;
+ type: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ writeGroups: string[] | null;
+ };
Insert: {
- active?: boolean
- createdAt?: string
- createdBy: string
- description?: string | null
- id?: string
- name: string
- path: string
- readGroups?: string[] | null
- size: number
- type?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- writeGroups?: string[] | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ description?: string | null;
+ id?: string;
+ name: string;
+ path: string;
+ readGroups?: string[] | null;
+ size: number;
+ type?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ writeGroups?: string[] | null;
+ };
Update: {
- active?: boolean
- createdAt?: string
- createdBy?: string
- description?: string | null
- id?: string
- name?: string
- path?: string
- readGroups?: string[] | null
- size?: number
- type?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- writeGroups?: string[] | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ description?: string | null;
+ id?: string;
+ name?: string;
+ path?: string;
+ readGroups?: string[] | null;
+ size?: number;
+ type?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ writeGroups?: string[] | null;
+ };
Relationships: [
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "document_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "document_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "document_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "document_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
documentFavorite: {
Row: {
- documentId: string
- userId: string
- }
+ documentId: string;
+ userId: string;
+ };
Insert: {
- documentId: string
- userId: string
- }
+ documentId: string;
+ userId: string;
+ };
Update: {
- documentId?: string
- userId?: string
- }
+ documentId?: string;
+ userId?: string;
+ };
Relationships: [
{
- foreignKeyName: "documentFavorites_documentId_fkey"
- columns: ["documentId"]
- referencedRelation: "document"
- referencedColumns: ["id"]
+ foreignKeyName: "documentFavorites_documentId_fkey";
+ columns: ["documentId"];
+ referencedRelation: "document";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "documentFavorites_documentId_fkey"
- columns: ["documentId"]
- referencedRelation: "documents"
- referencedColumns: ["id"]
+ foreignKeyName: "documentFavorites_documentId_fkey";
+ columns: ["documentId"];
+ referencedRelation: "documents";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "documentFavorites_userId_fkey"
- columns: ["userId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "documentFavorites_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "documentFavorites_userId_fkey"
- columns: ["userId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "documentFavorites_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
documentLabel: {
Row: {
- documentId: string
- label: string
- userId: string
- }
+ documentId: string;
+ label: string;
+ userId: string;
+ };
Insert: {
- documentId: string
- label: string
- userId: string
- }
+ documentId: string;
+ label: string;
+ userId: string;
+ };
Update: {
- documentId?: string
- label?: string
- userId?: string
- }
+ documentId?: string;
+ label?: string;
+ userId?: string;
+ };
Relationships: [
{
- foreignKeyName: "documentLabels_documentId_fkey"
- columns: ["documentId"]
- referencedRelation: "document"
- referencedColumns: ["id"]
+ foreignKeyName: "documentLabels_documentId_fkey";
+ columns: ["documentId"];
+ referencedRelation: "document";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "documentLabels_documentId_fkey"
- columns: ["documentId"]
- referencedRelation: "documents"
- referencedColumns: ["id"]
+ foreignKeyName: "documentLabels_documentId_fkey";
+ columns: ["documentId"];
+ referencedRelation: "documents";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "documentLabels_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "documentLabels_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
documentTransaction: {
Row: {
- createdAt: string
- documentId: string
- id: string
- type: Database["public"]["Enums"]["documentTransactionType"]
- userId: string
- }
+ createdAt: string;
+ documentId: string;
+ id: string;
+ type: Database["public"]["Enums"]["documentTransactionType"];
+ userId: string;
+ };
Insert: {
- createdAt?: string
- documentId: string
- id?: string
- type: Database["public"]["Enums"]["documentTransactionType"]
- userId: string
- }
+ createdAt?: string;
+ documentId: string;
+ id?: string;
+ type: Database["public"]["Enums"]["documentTransactionType"];
+ userId: string;
+ };
Update: {
- createdAt?: string
- documentId?: string
- id?: string
- type?: Database["public"]["Enums"]["documentTransactionType"]
- userId?: string
- }
+ createdAt?: string;
+ documentId?: string;
+ id?: string;
+ type?: Database["public"]["Enums"]["documentTransactionType"];
+ userId?: string;
+ };
Relationships: [
{
- foreignKeyName: "documentTransaction_documentId_fkey"
- columns: ["documentId"]
- referencedRelation: "document"
- referencedColumns: ["id"]
+ foreignKeyName: "documentTransaction_documentId_fkey";
+ columns: ["documentId"];
+ referencedRelation: "document";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "documentTransaction_documentId_fkey"
- columns: ["documentId"]
- referencedRelation: "documents"
- referencedColumns: ["id"]
+ foreignKeyName: "documentTransaction_documentId_fkey";
+ columns: ["documentId"];
+ referencedRelation: "documents";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "documentTransaction_userId_fkey"
- columns: ["userId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "documentTransaction_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "documentTransaction_userId_fkey"
- columns: ["userId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "documentTransaction_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
employee: {
Row: {
- employeeTypeId: string
- id: string
- }
+ employeeTypeId: string;
+ id: string;
+ };
Insert: {
- employeeTypeId: string
- id: string
- }
+ employeeTypeId: string;
+ id: string;
+ };
Update: {
- employeeTypeId?: string
- id?: string
- }
+ employeeTypeId?: string;
+ id?: string;
+ };
Relationships: [
{
- foreignKeyName: "employee_employeeTypeId_fkey"
- columns: ["employeeTypeId"]
- referencedRelation: "employeeType"
- referencedColumns: ["id"]
+ foreignKeyName: "employee_employeeTypeId_fkey";
+ columns: ["employeeTypeId"];
+ referencedRelation: "employeeType";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "employee_id_fkey"
- columns: ["id"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "employee_id_fkey";
+ columns: ["id"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "employee_id_fkey"
- columns: ["id"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "employee_id_fkey";
+ columns: ["id"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
employeeAbility: {
Row: {
- abilityId: string
- active: boolean
- employeeId: string
- id: string
- lastTrainingDate: string | null
- trainingCompleted: boolean | null
- trainingDays: number
- }
+ abilityId: string;
+ active: boolean;
+ employeeId: string;
+ id: string;
+ lastTrainingDate: string | null;
+ trainingCompleted: boolean | null;
+ trainingDays: number;
+ };
Insert: {
- abilityId: string
- active?: boolean
- employeeId: string
- id?: string
- lastTrainingDate?: string | null
- trainingCompleted?: boolean | null
- trainingDays?: number
- }
+ abilityId: string;
+ active?: boolean;
+ employeeId: string;
+ id?: string;
+ lastTrainingDate?: string | null;
+ trainingCompleted?: boolean | null;
+ trainingDays?: number;
+ };
Update: {
- abilityId?: string
- active?: boolean
- employeeId?: string
- id?: string
- lastTrainingDate?: string | null
- trainingCompleted?: boolean | null
- trainingDays?: number
- }
+ abilityId?: string;
+ active?: boolean;
+ employeeId?: string;
+ id?: string;
+ lastTrainingDate?: string | null;
+ trainingCompleted?: boolean | null;
+ trainingDays?: number;
+ };
Relationships: [
{
- foreignKeyName: "employeeAbilities_abilityId_fkey"
- columns: ["abilityId"]
- referencedRelation: "ability"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeAbilities_abilityId_fkey";
+ columns: ["abilityId"];
+ referencedRelation: "ability";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "employeeAbilities_employeeId_fkey"
- columns: ["employeeId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeAbilities_employeeId_fkey";
+ columns: ["employeeId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "employeeAbilities_employeeId_fkey"
- columns: ["employeeId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "employeeAbilities_employeeId_fkey";
+ columns: ["employeeId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
employeeJob: {
Row: {
- departmentId: string | null
- id: string
- locationId: string | null
- managerId: string | null
- shiftId: string | null
- startDate: string | null
- title: string | null
- workCellId: string | null
- }
+ departmentId: string | null;
+ id: string;
+ locationId: string | null;
+ managerId: string | null;
+ shiftId: string | null;
+ startDate: string | null;
+ title: string | null;
+ workCellId: string | null;
+ };
Insert: {
- departmentId?: string | null
- id: string
- locationId?: string | null
- managerId?: string | null
- shiftId?: string | null
- startDate?: string | null
- title?: string | null
- workCellId?: string | null
- }
+ departmentId?: string | null;
+ id: string;
+ locationId?: string | null;
+ managerId?: string | null;
+ shiftId?: string | null;
+ startDate?: string | null;
+ title?: string | null;
+ workCellId?: string | null;
+ };
Update: {
- departmentId?: string | null
- id?: string
- locationId?: string | null
- managerId?: string | null
- shiftId?: string | null
- startDate?: string | null
- title?: string | null
- workCellId?: string | null
- }
+ departmentId?: string | null;
+ id?: string;
+ locationId?: string | null;
+ managerId?: string | null;
+ shiftId?: string | null;
+ startDate?: string | null;
+ title?: string | null;
+ workCellId?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "employeeJob_departmentId_fkey"
- columns: ["departmentId"]
- referencedRelation: "department"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeJob_departmentId_fkey";
+ columns: ["departmentId"];
+ referencedRelation: "department";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "employeeJob_id_fkey"
- columns: ["id"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeJob_id_fkey";
+ columns: ["id"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "employeeJob_id_fkey"
- columns: ["id"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "employeeJob_id_fkey";
+ columns: ["id"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "employeeJob_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeJob_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "employeeJob_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "employeeJob_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "employeeJob_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "employeeJob_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "employeeJob_managerId_fkey"
- columns: ["managerId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeJob_managerId_fkey";
+ columns: ["managerId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "employeeJob_managerId_fkey"
- columns: ["managerId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "employeeJob_managerId_fkey";
+ columns: ["managerId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "employeeJob_shiftId_fkey"
- columns: ["shiftId"]
- referencedRelation: "shift"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeJob_shiftId_fkey";
+ columns: ["shiftId"];
+ referencedRelation: "shift";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "employeeJob_workCellId_fkey"
- columns: ["workCellId"]
- referencedRelation: "workCell"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeJob_workCellId_fkey";
+ columns: ["workCellId"];
+ referencedRelation: "workCell";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
employeeShift: {
Row: {
- employeeId: string
- id: string
- shiftId: string
- }
+ employeeId: string;
+ id: string;
+ shiftId: string;
+ };
Insert: {
- employeeId: string
- id?: string
- shiftId: string
- }
+ employeeId: string;
+ id?: string;
+ shiftId: string;
+ };
Update: {
- employeeId?: string
- id?: string
- shiftId?: string
- }
+ employeeId?: string;
+ id?: string;
+ shiftId?: string;
+ };
Relationships: [
{
- foreignKeyName: "employeeShift_employeeId_fkey"
- columns: ["employeeId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeShift_employeeId_fkey";
+ columns: ["employeeId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "employeeShift_employeeId_fkey"
- columns: ["employeeId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "employeeShift_employeeId_fkey";
+ columns: ["employeeId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "employeeShift_shiftId_fkey"
- columns: ["shiftId"]
- referencedRelation: "shift"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeShift_shiftId_fkey";
+ columns: ["shiftId"];
+ referencedRelation: "shift";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
employeeType: {
Row: {
- color: string
- createdAt: string
- id: string
- name: string
- protected: boolean
- updatedAt: string | null
- }
+ color: string;
+ createdAt: string;
+ id: string;
+ name: string;
+ protected: boolean;
+ updatedAt: string | null;
+ };
Insert: {
- color?: string
- createdAt?: string
- id?: string
- name: string
- protected?: boolean
- updatedAt?: string | null
- }
+ color?: string;
+ createdAt?: string;
+ id?: string;
+ name: string;
+ protected?: boolean;
+ updatedAt?: string | null;
+ };
Update: {
- color?: string
- createdAt?: string
- id?: string
- name?: string
- protected?: boolean
- updatedAt?: string | null
- }
- Relationships: []
- }
+ color?: string;
+ createdAt?: string;
+ id?: string;
+ name?: string;
+ protected?: boolean;
+ updatedAt?: string | null;
+ };
+ Relationships: [];
+ };
employeeTypePermission: {
Row: {
- create: boolean
- createdAt: string
- delete: boolean
- employeeTypeId: string
- featureId: string
- update: boolean
- updatedAt: string | null
- view: boolean
- }
+ create: boolean;
+ createdAt: string;
+ delete: boolean;
+ employeeTypeId: string;
+ featureId: string;
+ update: boolean;
+ updatedAt: string | null;
+ view: boolean;
+ };
Insert: {
- create?: boolean
- createdAt?: string
- delete?: boolean
- employeeTypeId: string
- featureId: string
- update?: boolean
- updatedAt?: string | null
- view?: boolean
- }
+ create?: boolean;
+ createdAt?: string;
+ delete?: boolean;
+ employeeTypeId: string;
+ featureId: string;
+ update?: boolean;
+ updatedAt?: string | null;
+ view?: boolean;
+ };
Update: {
- create?: boolean
- createdAt?: string
- delete?: boolean
- employeeTypeId?: string
- featureId?: string
- update?: boolean
- updatedAt?: string | null
- view?: boolean
- }
+ create?: boolean;
+ createdAt?: string;
+ delete?: boolean;
+ employeeTypeId?: string;
+ featureId?: string;
+ update?: boolean;
+ updatedAt?: string | null;
+ view?: boolean;
+ };
Relationships: [
{
- foreignKeyName: "employeeTypePermission_employeeTypeId_fkey"
- columns: ["employeeTypeId"]
- referencedRelation: "employeeType"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeTypePermission_employeeTypeId_fkey";
+ columns: ["employeeTypeId"];
+ referencedRelation: "employeeType";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "employeeTypePermission_featureId_fkey"
- columns: ["featureId"]
- referencedRelation: "feature"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeTypePermission_featureId_fkey";
+ columns: ["featureId"];
+ referencedRelation: "feature";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
equipment: {
Row: {
- active: boolean
- activeDate: string | null
- createdAt: string
- createdBy: string
- description: string | null
- equipmentTypeId: string
- id: string
- locationId: string
- name: string
- operatorsRequired: number
- setupHours: number
- updatedAt: string | null
- updatedBy: string | null
- workCellId: string | null
- }
+ active: boolean;
+ activeDate: string | null;
+ createdAt: string;
+ createdBy: string;
+ description: string | null;
+ equipmentTypeId: string;
+ id: string;
+ locationId: string;
+ name: string;
+ operatorsRequired: number;
+ setupHours: number;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ workCellId: string | null;
+ };
Insert: {
- active?: boolean
- activeDate?: string | null
- createdAt?: string
- createdBy: string
- description?: string | null
- equipmentTypeId: string
- id?: string
- locationId: string
- name: string
- operatorsRequired?: number
- setupHours?: number
- updatedAt?: string | null
- updatedBy?: string | null
- workCellId?: string | null
- }
+ active?: boolean;
+ activeDate?: string | null;
+ createdAt?: string;
+ createdBy: string;
+ description?: string | null;
+ equipmentTypeId: string;
+ id?: string;
+ locationId: string;
+ name: string;
+ operatorsRequired?: number;
+ setupHours?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ workCellId?: string | null;
+ };
Update: {
- active?: boolean
- activeDate?: string | null
- createdAt?: string
- createdBy?: string
- description?: string | null
- equipmentTypeId?: string
- id?: string
- locationId?: string
- name?: string
- operatorsRequired?: number
- setupHours?: number
- updatedAt?: string | null
- updatedBy?: string | null
- workCellId?: string | null
- }
+ active?: boolean;
+ activeDate?: string | null;
+ createdAt?: string;
+ createdBy?: string;
+ description?: string | null;
+ equipmentTypeId?: string;
+ id?: string;
+ locationId?: string;
+ name?: string;
+ operatorsRequired?: number;
+ setupHours?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ workCellId?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "equipment_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "equipment_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "equipment_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "equipment_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "equipment_equipmentTypeId_fkey"
- columns: ["equipmentTypeId"]
- referencedRelation: "equipmentType"
- referencedColumns: ["id"]
+ foreignKeyName: "equipment_equipmentTypeId_fkey";
+ columns: ["equipmentTypeId"];
+ referencedRelation: "equipmentType";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "equipment_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "equipment_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "equipment_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "equipment_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "equipment_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "equipment_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "equipment_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "equipment_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "equipment_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "equipment_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "equipment_workCellId_fkey"
- columns: ["workCellId"]
- referencedRelation: "workCell"
- referencedColumns: ["id"]
+ foreignKeyName: "equipment_workCellId_fkey";
+ columns: ["workCellId"];
+ referencedRelation: "workCell";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
equipmentType: {
Row: {
- active: boolean
- color: string
- createdAt: string
- createdBy: string
- description: string | null
- id: string
- name: string
- requiredAbility: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ color: string;
+ createdAt: string;
+ createdBy: string;
+ description: string | null;
+ id: string;
+ name: string;
+ requiredAbility: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- color?: string
- createdAt?: string
- createdBy: string
- description?: string | null
- id?: string
- name: string
- requiredAbility?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ color?: string;
+ createdAt?: string;
+ createdBy: string;
+ description?: string | null;
+ id?: string;
+ name: string;
+ requiredAbility?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- color?: string
- createdAt?: string
- createdBy?: string
- description?: string | null
- id?: string
- name?: string
- requiredAbility?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ color?: string;
+ createdAt?: string;
+ createdBy?: string;
+ description?: string | null;
+ id?: string;
+ name?: string;
+ requiredAbility?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "equipmentType_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "equipmentType_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "equipmentType_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "equipmentType_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "equipmentType_requiredAbility_fkey"
- columns: ["requiredAbility"]
- referencedRelation: "ability"
- referencedColumns: ["id"]
+ foreignKeyName: "equipmentType_requiredAbility_fkey";
+ columns: ["requiredAbility"];
+ referencedRelation: "ability";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "equipmentType_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "equipmentType_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "equipmentType_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "equipmentType_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
feature: {
Row: {
- createdAt: string
- id: string
- name: string
- updatedAt: string | null
- }
+ createdAt: string;
+ id: string;
+ name: string;
+ updatedAt: string | null;
+ };
Insert: {
- createdAt?: string
- id?: string
- name: string
- updatedAt?: string | null
- }
+ createdAt?: string;
+ id?: string;
+ name: string;
+ updatedAt?: string | null;
+ };
Update: {
- createdAt?: string
- id?: string
- name?: string
- updatedAt?: string | null
- }
- Relationships: []
- }
+ createdAt?: string;
+ id?: string;
+ name?: string;
+ updatedAt?: string | null;
+ };
+ Relationships: [];
+ };
fiscalYearSettings: {
Row: {
- id: boolean
- startMonth: Database["public"]["Enums"]["month"]
- taxStartMonth: Database["public"]["Enums"]["month"]
- updatedBy: string
- }
+ id: boolean;
+ startMonth: Database["public"]["Enums"]["month"];
+ taxStartMonth: Database["public"]["Enums"]["month"];
+ updatedBy: string;
+ };
Insert: {
- id?: boolean
- startMonth?: Database["public"]["Enums"]["month"]
- taxStartMonth?: Database["public"]["Enums"]["month"]
- updatedBy: string
- }
+ id?: boolean;
+ startMonth?: Database["public"]["Enums"]["month"];
+ taxStartMonth?: Database["public"]["Enums"]["month"];
+ updatedBy: string;
+ };
Update: {
- id?: boolean
- startMonth?: Database["public"]["Enums"]["month"]
- taxStartMonth?: Database["public"]["Enums"]["month"]
- updatedBy?: string
- }
+ id?: boolean;
+ startMonth?: Database["public"]["Enums"]["month"];
+ taxStartMonth?: Database["public"]["Enums"]["month"];
+ updatedBy?: string;
+ };
Relationships: [
{
- foreignKeyName: "fiscalYearSettings_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "fiscalYearSettings_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "fiscalYearSettings_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "fiscalYearSettings_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
group: {
Row: {
- createdAt: string
- id: string
- isCustomerOrgGroup: boolean
- isCustomerTypeGroup: boolean
- isEmployeeTypeGroup: boolean
- isIdentityGroup: boolean
- isSupplierOrgGroup: boolean
- isSupplierTypeGroup: boolean
- name: string
- updatedAt: string | null
- }
+ createdAt: string;
+ id: string;
+ isCustomerOrgGroup: boolean;
+ isCustomerTypeGroup: boolean;
+ isEmployeeTypeGroup: boolean;
+ isIdentityGroup: boolean;
+ isSupplierOrgGroup: boolean;
+ isSupplierTypeGroup: boolean;
+ name: string;
+ updatedAt: string | null;
+ };
Insert: {
- createdAt?: string
- id?: string
- isCustomerOrgGroup?: boolean
- isCustomerTypeGroup?: boolean
- isEmployeeTypeGroup?: boolean
- isIdentityGroup?: boolean
- isSupplierOrgGroup?: boolean
- isSupplierTypeGroup?: boolean
- name: string
- updatedAt?: string | null
- }
+ createdAt?: string;
+ id?: string;
+ isCustomerOrgGroup?: boolean;
+ isCustomerTypeGroup?: boolean;
+ isEmployeeTypeGroup?: boolean;
+ isIdentityGroup?: boolean;
+ isSupplierOrgGroup?: boolean;
+ isSupplierTypeGroup?: boolean;
+ name: string;
+ updatedAt?: string | null;
+ };
Update: {
- createdAt?: string
- id?: string
- isCustomerOrgGroup?: boolean
- isCustomerTypeGroup?: boolean
- isEmployeeTypeGroup?: boolean
- isIdentityGroup?: boolean
- isSupplierOrgGroup?: boolean
- isSupplierTypeGroup?: boolean
- name?: string
- updatedAt?: string | null
- }
- Relationships: []
- }
+ createdAt?: string;
+ id?: string;
+ isCustomerOrgGroup?: boolean;
+ isCustomerTypeGroup?: boolean;
+ isEmployeeTypeGroup?: boolean;
+ isIdentityGroup?: boolean;
+ isSupplierOrgGroup?: boolean;
+ isSupplierTypeGroup?: boolean;
+ name?: string;
+ updatedAt?: string | null;
+ };
+ Relationships: [];
+ };
holiday: {
Row: {
- createdAt: string
- createdBy: string
- date: string
- id: string
- name: string
- updatedAt: string | null
- updatedBy: string | null
- year: number | null
- }
+ createdAt: string;
+ createdBy: string;
+ date: string;
+ id: string;
+ name: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ year: number | null;
+ };
Insert: {
- createdAt?: string
- createdBy: string
- date: string
- id?: string
- name: string
- updatedAt?: string | null
- updatedBy?: string | null
- year?: number | null
- }
+ createdAt?: string;
+ createdBy: string;
+ date: string;
+ id?: string;
+ name: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ year?: number | null;
+ };
Update: {
- createdAt?: string
- createdBy?: string
- date?: string
- id?: string
- name?: string
- updatedAt?: string | null
- updatedBy?: string | null
- year?: number | null
- }
+ createdAt?: string;
+ createdBy?: string;
+ date?: string;
+ id?: string;
+ name?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ year?: number | null;
+ };
Relationships: [
{
- foreignKeyName: "holiday_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "holiday_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "holiday_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "holiday_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "holiday_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "holiday_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "holiday_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "holiday_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
journal: {
Row: {
- accountingPeriodId: string | null
- createdAt: string
- description: string | null
- id: number
- postingDate: string
- }
+ accountingPeriodId: string | null;
+ createdAt: string;
+ description: string | null;
+ id: number;
+ postingDate: string;
+ };
Insert: {
- accountingPeriodId?: string | null
- createdAt?: string
- description?: string | null
- id?: number
- postingDate?: string
- }
+ accountingPeriodId?: string | null;
+ createdAt?: string;
+ description?: string | null;
+ id?: number;
+ postingDate?: string;
+ };
Update: {
- accountingPeriodId?: string | null
- createdAt?: string
- description?: string | null
- id?: number
- postingDate?: string
- }
+ accountingPeriodId?: string | null;
+ createdAt?: string;
+ description?: string | null;
+ id?: number;
+ postingDate?: string;
+ };
Relationships: [
{
- foreignKeyName: "journal_accountPeriodId_fkey"
- columns: ["accountingPeriodId"]
- referencedRelation: "accountingPeriod"
- referencedColumns: ["id"]
+ foreignKeyName: "journal_accountPeriodId_fkey";
+ columns: ["accountingPeriodId"];
+ referencedRelation: "accountingPeriod";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
journalLine: {
Row: {
- accountNumber: string
- accrual: boolean
- amount: number
- createdAt: string
- description: string | null
- documentId: string | null
- documentLineReference: string | null
+ accountNumber: string;
+ accrual: boolean;
+ amount: number;
+ createdAt: string;
+ 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
- }
+ | null;
+ externalDocumentId: string | null;
+ id: string;
+ journalId: number;
+ journalLineReference: string;
+ quantity: number;
+ };
Insert: {
- accountNumber: string
- accrual?: boolean
- amount: number
- createdAt?: string
- description?: string | null
- documentId?: string | null
- documentLineReference?: string | null
+ accountNumber: string;
+ accrual?: boolean;
+ amount: number;
+ createdAt?: string;
+ 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
- }
+ | null;
+ externalDocumentId?: string | null;
+ id?: string;
+ journalId: number;
+ journalLineReference: string;
+ quantity?: number;
+ };
Update: {
- accountNumber?: string
- accrual?: boolean
- amount?: number
- createdAt?: string
- description?: string | null
- documentId?: string | null
- documentLineReference?: string | null
+ accountNumber?: string;
+ accrual?: boolean;
+ amount?: number;
+ createdAt?: string;
+ 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
- }
+ | null;
+ externalDocumentId?: string | null;
+ id?: string;
+ journalId?: number;
+ journalLineReference?: string;
+ quantity?: number;
+ };
Relationships: [
{
- foreignKeyName: "journalLine_accountNumber_fkey"
- columns: ["accountNumber"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "journalLine_accountNumber_fkey";
+ columns: ["accountNumber"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "journalLine_accountNumber_fkey"
- columns: ["accountNumber"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "journalLine_accountNumber_fkey";
+ columns: ["accountNumber"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
}
- ]
- }
+ ];
+ };
location: {
Row: {
- addressLine1: string
- addressLine2: string | null
- city: string
- country: string | null
- createdAt: string
- createdBy: string
- id: string
- latitude: number | null
- longitude: number | null
- name: string
- postalCode: string
- state: string
- timezone: string
- updatedAt: string | null
- updatedBy: string | null
- }
+ addressLine1: string;
+ addressLine2: string | null;
+ city: string;
+ country: string | null;
+ createdAt: string;
+ createdBy: string;
+ 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
- country?: string | null
- createdAt?: string
- createdBy: string
- id?: string
- latitude?: number | null
- longitude?: number | null
- name: string
- postalCode: string
- state: string
- timezone: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ addressLine1: string;
+ addressLine2?: string | null;
+ city: string;
+ country?: string | null;
+ createdAt?: string;
+ createdBy: string;
+ 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
- country?: string | null
- createdAt?: string
- createdBy?: string
- id?: string
- latitude?: number | null
- longitude?: number | null
- name?: string
- postalCode?: string
- state?: string
- timezone?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: []
- }
+ addressLine1?: string;
+ addressLine2?: string | null;
+ city?: string;
+ country?: string | null;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ latitude?: number | null;
+ longitude?: number | null;
+ name?: string;
+ postalCode?: string;
+ state?: string;
+ timezone?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
+ Relationships: [];
+ };
membership: {
Row: {
- groupId: string
- id: number
- memberGroupId: string | null
- memberUserId: string | null
- }
+ groupId: string;
+ id: number;
+ memberGroupId: string | null;
+ memberUserId: string | null;
+ };
Insert: {
- groupId: string
- id?: number
- memberGroupId?: string | null
- memberUserId?: string | null
- }
+ groupId: string;
+ id?: number;
+ memberGroupId?: string | null;
+ memberUserId?: string | null;
+ };
Update: {
- groupId?: string
- id?: number
- memberGroupId?: string | null
- memberUserId?: string | null
- }
+ groupId?: string;
+ id?: number;
+ memberGroupId?: string | null;
+ memberUserId?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "membership_groupId_fkey"
- columns: ["groupId"]
- referencedRelation: "group"
- referencedColumns: ["id"]
+ foreignKeyName: "membership_groupId_fkey";
+ columns: ["groupId"];
+ referencedRelation: "group";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "membership_memberGroupId_fkey"
- columns: ["memberGroupId"]
- referencedRelation: "group"
- referencedColumns: ["id"]
+ foreignKeyName: "membership_memberGroupId_fkey";
+ columns: ["memberGroupId"];
+ referencedRelation: "group";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "membership_memberUserId_fkey";
+ columns: ["memberUserId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "membership_memberUserId_fkey";
+ columns: ["memberUserId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
note: {
Row: {
- active: boolean
- createdAt: string
- createdBy: string
- documentId: string
- id: string
- note: string
- noteRichText: Json
- updatedAt: string | null
- }
+ active: boolean;
+ createdAt: string;
+ createdBy: string;
+ documentId: string;
+ id: string;
+ note: string;
+ noteRichText: Json;
+ updatedAt: string | null;
+ };
Insert: {
- active?: boolean
- createdAt?: string
- createdBy: string
- documentId: string
- id?: string
- note: string
- noteRichText?: Json
- updatedAt?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ documentId: string;
+ id?: string;
+ note: string;
+ noteRichText?: Json;
+ updatedAt?: string | null;
+ };
Update: {
- active?: boolean
- createdAt?: string
- createdBy?: string
- documentId?: string
- id?: string
- note?: string
- noteRichText?: Json
- updatedAt?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ documentId?: string;
+ id?: string;
+ note?: string;
+ noteRichText?: Json;
+ updatedAt?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "notes_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "notes_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "notes_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "notes_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
part: {
Row: {
- active: boolean
- approved: boolean
- approvedBy: string | null
- blocked: boolean
- createdAt: string
- createdBy: string
- description: string | null
- fromDate: string | null
- id: string
- manufacturerPartNumber: string | null
- name: string
- partGroupId: string | null
- partType: Database["public"]["Enums"]["partType"]
- replenishmentSystem: Database["public"]["Enums"]["partReplenishmentSystem"]
- toDate: string | null
- unitOfMeasureCode: string
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ approved: boolean;
+ approvedBy: string | null;
+ blocked: boolean;
+ createdAt: string;
+ createdBy: string;
+ description: string | null;
+ fromDate: string | null;
+ id: string;
+ manufacturerPartNumber: string | null;
+ name: string;
+ partGroupId: string | null;
+ partType: Database["public"]["Enums"]["partType"];
+ replenishmentSystem: Database["public"]["Enums"]["partReplenishmentSystem"];
+ toDate: string | null;
+ unitOfMeasureCode: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- approved?: boolean
- approvedBy?: string | null
- blocked?: boolean
- createdAt?: string
- createdBy: string
- description?: string | null
- fromDate?: string | null
- id: string
- manufacturerPartNumber?: string | null
- name: string
- partGroupId?: string | null
- partType: Database["public"]["Enums"]["partType"]
- replenishmentSystem: Database["public"]["Enums"]["partReplenishmentSystem"]
- toDate?: string | null
- unitOfMeasureCode: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ approved?: boolean;
+ approvedBy?: string | null;
+ blocked?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ description?: string | null;
+ fromDate?: string | null;
+ id: string;
+ manufacturerPartNumber?: string | null;
+ name: string;
+ partGroupId?: string | null;
+ partType: Database["public"]["Enums"]["partType"];
+ replenishmentSystem: Database["public"]["Enums"]["partReplenishmentSystem"];
+ toDate?: string | null;
+ unitOfMeasureCode: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- approved?: boolean
- approvedBy?: string | null
- blocked?: boolean
- createdAt?: string
- createdBy?: string
- description?: string | null
- fromDate?: string | null
- id?: string
- manufacturerPartNumber?: string | null
- name?: string
- partGroupId?: string | null
- partType?: Database["public"]["Enums"]["partType"]
- replenishmentSystem?: Database["public"]["Enums"]["partReplenishmentSystem"]
- toDate?: string | null
- unitOfMeasureCode?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ approved?: boolean;
+ approvedBy?: string | null;
+ blocked?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ description?: string | null;
+ fromDate?: string | null;
+ id?: string;
+ manufacturerPartNumber?: string | null;
+ name?: string;
+ partGroupId?: string | null;
+ partType?: Database["public"]["Enums"]["partType"];
+ replenishmentSystem?: Database["public"]["Enums"]["partReplenishmentSystem"];
+ toDate?: string | null;
+ unitOfMeasureCode?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "part_approvedBy_fkey"
- columns: ["approvedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "part_approvedBy_fkey";
+ columns: ["approvedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "part_approvedBy_fkey"
- columns: ["approvedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "part_approvedBy_fkey";
+ columns: ["approvedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "part_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "part_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "part_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "part_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "part_partGroupId_fkey"
- columns: ["partGroupId"]
- referencedRelation: "partGroup"
- referencedColumns: ["id"]
+ foreignKeyName: "part_partGroupId_fkey";
+ columns: ["partGroupId"];
+ referencedRelation: "partGroup";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "part_partGroupId_fkey"
- columns: ["partGroupId"]
- referencedRelation: "services"
- referencedColumns: ["partGroupId"]
+ foreignKeyName: "part_partGroupId_fkey";
+ columns: ["partGroupId"];
+ referencedRelation: "services";
+ referencedColumns: ["partGroupId"];
},
{
- foreignKeyName: "part_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode"]
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code"]
+ foreignKeyName: "part_unitOfMeasureCode_fkey";
+ columns: ["unitOfMeasureCode"];
+ referencedRelation: "unitOfMeasure";
+ referencedColumns: ["code"];
},
{
- foreignKeyName: "part_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "part_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "part_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "part_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
partCost: {
Row: {
- costingMethod: Database["public"]["Enums"]["partCostingMethod"]
- costIsAdjusted: boolean
- createdAt: string
- createdBy: string
- partId: string
- standardCost: number
- unitCost: number
- updatedAt: string | null
- updatedBy: string | null
- }
+ costingMethod: Database["public"]["Enums"]["partCostingMethod"];
+ costIsAdjusted: boolean;
+ createdAt: string;
+ createdBy: string;
+ partId: string;
+ standardCost: number;
+ unitCost: number;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- costingMethod: Database["public"]["Enums"]["partCostingMethod"]
- costIsAdjusted?: boolean
- createdAt?: string
- createdBy: string
- partId: string
- standardCost?: number
- unitCost?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ costingMethod: Database["public"]["Enums"]["partCostingMethod"];
+ costIsAdjusted?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ partId: string;
+ standardCost?: number;
+ unitCost?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- costingMethod?: Database["public"]["Enums"]["partCostingMethod"]
- costIsAdjusted?: boolean
- createdAt?: string
- createdBy?: string
- partId?: string
- standardCost?: number
- unitCost?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ costingMethod?: Database["public"]["Enums"]["partCostingMethod"];
+ costIsAdjusted?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ partId?: string;
+ standardCost?: number;
+ unitCost?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "partCost_partId_fkey"
- columns: ["partId"]
- referencedRelation: "part"
- referencedColumns: ["id"]
+ foreignKeyName: "partCost_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "part";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partCost_partId_fkey"
- columns: ["partId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["partId"]
+ foreignKeyName: "partCost_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["partId"];
},
{
- foreignKeyName: "partCost_partId_fkey"
- columns: ["partId"]
- referencedRelation: "parts"
- referencedColumns: ["id"]
+ foreignKeyName: "partCost_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "parts";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partGroup_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partGroup_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partGroup_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partGroup_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "partGroup_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partGroup_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partGroup_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partGroup_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
partGroup: {
Row: {
- active: boolean
- createdAt: string
- createdBy: string
- description: string | null
- id: string
- name: string
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ createdAt: string;
+ createdBy: string;
+ description: string | null;
+ id: string;
+ name: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- createdAt?: string
- createdBy: string
- description?: string | null
- id?: string
- name: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ description?: string | null;
+ id?: string;
+ name: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- createdAt?: string
- createdBy?: string
- description?: string | null
- id?: string
- name?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ description?: string | null;
+ id?: string;
+ name?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "partGroup_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partGroup_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partGroup_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partGroup_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "partGroup_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partGroup_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partGroup_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partGroup_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
partInventory: {
Row: {
- createdAt: string
- createdBy: string
- defaultShelfId: string | null
- locationId: string
- partId: string
- updatedAt: string | null
- updatedBy: string | null
- }
+ createdAt: string;
+ createdBy: string;
+ defaultShelfId: string | null;
+ locationId: string;
+ partId: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- createdAt?: string
- createdBy: string
- defaultShelfId?: string | null
- locationId: string
- partId: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ createdAt?: string;
+ createdBy: string;
+ defaultShelfId?: string | null;
+ locationId: string;
+ partId: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- createdAt?: string
- createdBy?: string
- defaultShelfId?: string | null
- locationId?: string
- partId?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ createdAt?: string;
+ createdBy?: string;
+ defaultShelfId?: string | null;
+ locationId?: string;
+ partId?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "partInventory_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partInventory_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partInventory_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partInventory_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "partInventory_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "partInventory_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partInventory_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "partInventory_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "partInventory_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "partInventory_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "partInventory_partId_fkey"
- columns: ["partId"]
- referencedRelation: "part"
- referencedColumns: ["id"]
+ foreignKeyName: "partInventory_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "part";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partInventory_partId_fkey"
- columns: ["partId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["partId"]
+ foreignKeyName: "partInventory_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["partId"];
},
{
- foreignKeyName: "partInventory_partId_fkey"
- columns: ["partId"]
- referencedRelation: "parts"
- referencedColumns: ["id"]
+ foreignKeyName: "partInventory_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "parts";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partInventory_shelfId_fkey"
- columns: ["defaultShelfId", "locationId"]
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
+ foreignKeyName: "partInventory_shelfId_fkey";
+ columns: ["defaultShelfId", "locationId"];
+ referencedRelation: "shelf";
+ referencedColumns: ["id", "locationId"];
},
{
- foreignKeyName: "partInventory_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partInventory_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partInventory_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partInventory_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
partLedger: {
Row: {
- createdAt: string
- documentId: string | null
+ createdAt: string;
+ documentId: string | null;
documentType:
| Database["public"]["Enums"]["partLedgerDocumentType"]
- | null
- entryNumber: number
- entryType: Database["public"]["Enums"]["partLedgerType"]
- externalDocumentId: string | null
- id: string
- locationId: string | null
- partId: string
- postingDate: string
- quantity: number
- shelfId: string | null
- }
+ | null;
+ entryNumber: number;
+ entryType: Database["public"]["Enums"]["partLedgerType"];
+ externalDocumentId: string | null;
+ id: string;
+ locationId: string | null;
+ partId: string;
+ postingDate: string;
+ quantity: number;
+ shelfId: string | null;
+ };
Insert: {
- createdAt?: string
- documentId?: string | null
+ createdAt?: string;
+ documentId?: string | null;
documentType?:
| Database["public"]["Enums"]["partLedgerDocumentType"]
- | null
- entryNumber?: number
- entryType: Database["public"]["Enums"]["partLedgerType"]
- externalDocumentId?: string | null
- id?: string
- locationId?: string | null
- partId: string
- postingDate?: string
- quantity: number
- shelfId?: string | null
- }
+ | null;
+ entryNumber?: number;
+ entryType: Database["public"]["Enums"]["partLedgerType"];
+ externalDocumentId?: string | null;
+ id?: string;
+ locationId?: string | null;
+ partId: string;
+ postingDate?: string;
+ quantity: number;
+ shelfId?: string | null;
+ };
Update: {
- createdAt?: string
- documentId?: string | null
+ createdAt?: string;
+ documentId?: string | null;
documentType?:
| Database["public"]["Enums"]["partLedgerDocumentType"]
- | null
- entryNumber?: number
- entryType?: Database["public"]["Enums"]["partLedgerType"]
- externalDocumentId?: string | null
- id?: string
- locationId?: string | null
- partId?: string
- postingDate?: string
- quantity?: number
- shelfId?: string | null
- }
+ | null;
+ entryNumber?: number;
+ entryType?: Database["public"]["Enums"]["partLedgerType"];
+ externalDocumentId?: string | null;
+ id?: string;
+ locationId?: string | null;
+ partId?: string;
+ postingDate?: string;
+ quantity?: number;
+ shelfId?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "partLedger_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "partLedger_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partLedger_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "partLedger_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "partLedger_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "partLedger_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "partLedger_partId_fkey"
- columns: ["partId"]
- referencedRelation: "part"
- referencedColumns: ["id"]
+ foreignKeyName: "partLedger_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "part";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partLedger_partId_fkey"
- columns: ["partId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["partId"]
+ foreignKeyName: "partLedger_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["partId"];
},
{
- foreignKeyName: "partLedger_partId_fkey"
- columns: ["partId"]
- referencedRelation: "parts"
- referencedColumns: ["id"]
+ foreignKeyName: "partLedger_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "parts";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partLedger_shelfId_fkey"
- columns: ["shelfId", "locationId"]
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
+ foreignKeyName: "partLedger_shelfId_fkey";
+ columns: ["shelfId", "locationId"];
+ referencedRelation: "shelf";
+ referencedColumns: ["id", "locationId"];
}
- ]
- }
+ ];
+ };
partner: {
Row: {
- active: boolean
- createdAt: string
- createdBy: string
- hoursPerWeek: number
- id: string
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ createdAt: string;
+ createdBy: string;
+ hoursPerWeek: number;
+ id: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- createdAt?: string
- createdBy: string
- hoursPerWeek?: number
- id: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ hoursPerWeek?: number;
+ id: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- createdAt?: string
- createdBy?: string
- hoursPerWeek?: number
- id?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ hoursPerWeek?: number;
+ id?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "partner_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partner_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partner_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partner_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "partner_id_fkey"
- columns: ["id"]
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
+ foreignKeyName: "partner_id_fkey";
+ columns: ["id"];
+ referencedRelation: "supplierLocation";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partner_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partner_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partner_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partner_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
partnerAbility: {
Row: {
- abilityId: string
- createdAt: string
- createdBy: string
- partnerId: string
- }
+ abilityId: string;
+ createdAt: string;
+ createdBy: string;
+ partnerId: string;
+ };
Insert: {
- abilityId: string
- createdAt?: string
- createdBy: string
- partnerId: string
- }
+ abilityId: string;
+ createdAt?: string;
+ createdBy: string;
+ partnerId: string;
+ };
Update: {
- abilityId?: string
- createdAt?: string
- createdBy?: string
- partnerId?: string
- }
+ abilityId?: string;
+ createdAt?: string;
+ createdBy?: string;
+ partnerId?: string;
+ };
Relationships: [
{
- foreignKeyName: "partnerAbility_abilityId_fkey"
- columns: ["abilityId"]
- referencedRelation: "ability"
- referencedColumns: ["id"]
+ foreignKeyName: "partnerAbility_abilityId_fkey";
+ columns: ["abilityId"];
+ referencedRelation: "ability";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partnerAbility_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partnerAbility_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partnerAbility_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partnerAbility_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "partnerAbility_partnerId_fkey"
- columns: ["partnerId"]
- referencedRelation: "partner"
- referencedColumns: ["id"]
+ foreignKeyName: "partnerAbility_partnerId_fkey";
+ columns: ["partnerId"];
+ referencedRelation: "partner";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partnerAbility_partnerId_fkey"
- columns: ["partnerId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierLocationId"]
+ foreignKeyName: "partnerAbility_partnerId_fkey";
+ columns: ["partnerId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierLocationId"];
}
- ]
- }
+ ];
+ };
partPlanning: {
Row: {
- createdAt: string
- createdBy: string
- critical: boolean
- demandAccumulationIncludesInventory: boolean
- demandAccumulationPeriod: number
- demandReschedulingPeriod: number
- locationId: string
- maximumOrderQuantity: number
- minimumOrderQuantity: number
- orderMultiple: number
- partId: string
- reorderingPolicy: Database["public"]["Enums"]["partReorderingPolicy"]
- reorderMaximumInventory: number
- reorderPoint: number
- reorderQuantity: number
- safetyStockLeadTime: number
- safetyStockQuantity: number
- updatedAt: string | null
- updatedBy: string | null
- }
+ createdAt: string;
+ createdBy: string;
+ critical: boolean;
+ demandAccumulationIncludesInventory: boolean;
+ demandAccumulationPeriod: number;
+ demandReschedulingPeriod: number;
+ locationId: string;
+ maximumOrderQuantity: number;
+ minimumOrderQuantity: number;
+ orderMultiple: number;
+ partId: string;
+ reorderingPolicy: Database["public"]["Enums"]["partReorderingPolicy"];
+ reorderMaximumInventory: number;
+ reorderPoint: number;
+ reorderQuantity: number;
+ safetyStockLeadTime: number;
+ safetyStockQuantity: number;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- createdAt?: string
- createdBy: string
- critical?: boolean
- demandAccumulationIncludesInventory?: boolean
- demandAccumulationPeriod?: number
- demandReschedulingPeriod?: number
- locationId: string
- maximumOrderQuantity?: number
- minimumOrderQuantity?: number
- orderMultiple?: number
- partId: string
- reorderingPolicy?: Database["public"]["Enums"]["partReorderingPolicy"]
- reorderMaximumInventory?: number
- reorderPoint?: number
- reorderQuantity?: number
- safetyStockLeadTime?: number
- safetyStockQuantity?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ createdAt?: string;
+ createdBy: string;
+ critical?: boolean;
+ demandAccumulationIncludesInventory?: boolean;
+ demandAccumulationPeriod?: number;
+ demandReschedulingPeriod?: number;
+ locationId: string;
+ maximumOrderQuantity?: number;
+ minimumOrderQuantity?: number;
+ orderMultiple?: number;
+ partId: string;
+ reorderingPolicy?: Database["public"]["Enums"]["partReorderingPolicy"];
+ reorderMaximumInventory?: number;
+ reorderPoint?: number;
+ reorderQuantity?: number;
+ safetyStockLeadTime?: number;
+ safetyStockQuantity?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- createdAt?: string
- createdBy?: string
- critical?: boolean
- demandAccumulationIncludesInventory?: boolean
- demandAccumulationPeriod?: number
- demandReschedulingPeriod?: number
- locationId?: string
- maximumOrderQuantity?: number
- minimumOrderQuantity?: number
- orderMultiple?: number
- partId?: string
- reorderingPolicy?: Database["public"]["Enums"]["partReorderingPolicy"]
- reorderMaximumInventory?: number
- reorderPoint?: number
- reorderQuantity?: number
- safetyStockLeadTime?: number
- safetyStockQuantity?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ createdAt?: string;
+ createdBy?: string;
+ critical?: boolean;
+ demandAccumulationIncludesInventory?: boolean;
+ demandAccumulationPeriod?: number;
+ demandReschedulingPeriod?: number;
+ locationId?: string;
+ maximumOrderQuantity?: number;
+ minimumOrderQuantity?: number;
+ orderMultiple?: number;
+ partId?: string;
+ reorderingPolicy?: Database["public"]["Enums"]["partReorderingPolicy"];
+ reorderMaximumInventory?: number;
+ reorderPoint?: number;
+ reorderQuantity?: number;
+ safetyStockLeadTime?: number;
+ safetyStockQuantity?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "partPlanning_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partPlanning_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partPlanning_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partPlanning_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "partPlanning_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "partPlanning_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partPlanning_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "partPlanning_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "partPlanning_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "partPlanning_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "partPlanning_partId_fkey"
- columns: ["partId"]
- referencedRelation: "part"
- referencedColumns: ["id"]
+ foreignKeyName: "partPlanning_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "part";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partPlanning_partId_fkey"
- columns: ["partId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["partId"]
+ foreignKeyName: "partPlanning_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["partId"];
},
{
- foreignKeyName: "partPlanning_partId_fkey"
- columns: ["partId"]
- referencedRelation: "parts"
- referencedColumns: ["id"]
+ foreignKeyName: "partPlanning_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "parts";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partPlanning_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partPlanning_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partPlanning_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partPlanning_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
partReplenishment: {
Row: {
- conversionFactor: number
- createdAt: string
- createdBy: string
- lotSize: number | null
- manufacturingBlocked: boolean
- manufacturingLeadTime: number
- manufacturingPolicy: Database["public"]["Enums"]["partManufacturingPolicy"]
- partId: string
- preferredSupplierId: string | null
- purchasingBlocked: boolean
- purchasingLeadTime: number
- purchasingUnitOfMeasureCode: string | null
- requiresConfiguration: boolean
- scrapPercentage: number
- updatedAt: string | null
- updatedBy: string | null
- }
+ conversionFactor: number;
+ createdAt: string;
+ createdBy: string;
+ lotSize: number | null;
+ manufacturingBlocked: boolean;
+ manufacturingLeadTime: number;
+ manufacturingPolicy: Database["public"]["Enums"]["partManufacturingPolicy"];
+ partId: string;
+ preferredSupplierId: string | null;
+ purchasingBlocked: boolean;
+ purchasingLeadTime: number;
+ purchasingUnitOfMeasureCode: string | null;
+ requiresConfiguration: boolean;
+ scrapPercentage: number;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- conversionFactor?: number
- createdAt?: string
- createdBy: string
- lotSize?: number | null
- manufacturingBlocked?: boolean
- manufacturingLeadTime?: number
- manufacturingPolicy?: Database["public"]["Enums"]["partManufacturingPolicy"]
- partId: string
- preferredSupplierId?: string | null
- purchasingBlocked?: boolean
- purchasingLeadTime?: number
- purchasingUnitOfMeasureCode?: string | null
- requiresConfiguration?: boolean
- scrapPercentage?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ conversionFactor?: number;
+ createdAt?: string;
+ createdBy: string;
+ lotSize?: number | null;
+ manufacturingBlocked?: boolean;
+ manufacturingLeadTime?: number;
+ manufacturingPolicy?: Database["public"]["Enums"]["partManufacturingPolicy"];
+ partId: string;
+ preferredSupplierId?: string | null;
+ purchasingBlocked?: boolean;
+ purchasingLeadTime?: number;
+ purchasingUnitOfMeasureCode?: string | null;
+ requiresConfiguration?: boolean;
+ scrapPercentage?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- conversionFactor?: number
- createdAt?: string
- createdBy?: string
- lotSize?: number | null
- manufacturingBlocked?: boolean
- manufacturingLeadTime?: number
- manufacturingPolicy?: Database["public"]["Enums"]["partManufacturingPolicy"]
- partId?: string
- preferredSupplierId?: string | null
- purchasingBlocked?: boolean
- purchasingLeadTime?: number
- purchasingUnitOfMeasureCode?: string | null
- requiresConfiguration?: boolean
- scrapPercentage?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ conversionFactor?: number;
+ createdAt?: string;
+ createdBy?: string;
+ lotSize?: number | null;
+ manufacturingBlocked?: boolean;
+ manufacturingLeadTime?: number;
+ manufacturingPolicy?: Database["public"]["Enums"]["partManufacturingPolicy"];
+ partId?: string;
+ preferredSupplierId?: string | null;
+ purchasingBlocked?: boolean;
+ purchasingLeadTime?: number;
+ purchasingUnitOfMeasureCode?: string | null;
+ requiresConfiguration?: boolean;
+ scrapPercentage?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "partReplenishment_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partReplenishment_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partReplenishment_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partReplenishment_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "partReplenishment_partId_fkey"
- columns: ["partId"]
- referencedRelation: "part"
- referencedColumns: ["id"]
+ foreignKeyName: "partReplenishment_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "part";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partReplenishment_partId_fkey"
- columns: ["partId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["partId"]
+ foreignKeyName: "partReplenishment_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["partId"];
},
{
- foreignKeyName: "partReplenishment_partId_fkey"
- columns: ["partId"]
- referencedRelation: "parts"
- referencedColumns: ["id"]
+ foreignKeyName: "partReplenishment_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "parts";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partReplenishment_preferredSupplierId_fkey"
- columns: ["preferredSupplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "partReplenishment_preferredSupplierId_fkey";
+ columns: ["preferredSupplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partReplenishment_preferredSupplierId_fkey"
- columns: ["preferredSupplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "partReplenishment_preferredSupplierId_fkey";
+ columns: ["preferredSupplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "partReplenishment_preferredSupplierId_fkey"
- columns: ["preferredSupplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "partReplenishment_preferredSupplierId_fkey";
+ columns: ["preferredSupplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "partReplenishment_preferredSupplierId_fkey"
- columns: ["preferredSupplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "partReplenishment_preferredSupplierId_fkey";
+ columns: ["preferredSupplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partReplenishment_preferredSupplierId_fkey"
- columns: ["preferredSupplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "partReplenishment_preferredSupplierId_fkey";
+ columns: ["preferredSupplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partReplenishment_purchaseUnitOfMeasureCode_fkey"
- columns: ["purchasingUnitOfMeasureCode"]
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code"]
+ foreignKeyName: "partReplenishment_purchaseUnitOfMeasureCode_fkey";
+ columns: ["purchasingUnitOfMeasureCode"];
+ referencedRelation: "unitOfMeasure";
+ referencedColumns: ["code"];
},
{
- foreignKeyName: "partReplenishment_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partReplenishment_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partReplenishment_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partReplenishment_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
partSupplier: {
Row: {
- active: boolean
- conversionFactor: number
- createdAt: string
- createdBy: string
- id: string
- minimumOrderQuantity: number | null
- partId: string
- supplierId: string
- supplierPartId: string | null
- supplierUnitOfMeasureCode: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ conversionFactor: number;
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ minimumOrderQuantity: number | null;
+ partId: string;
+ supplierId: string;
+ supplierPartId: string | null;
+ supplierUnitOfMeasureCode: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- conversionFactor?: number
- createdAt?: string
- createdBy: string
- id?: string
- minimumOrderQuantity?: number | null
- partId: string
- supplierId: string
- supplierPartId?: string | null
- supplierUnitOfMeasureCode?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ conversionFactor?: number;
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ minimumOrderQuantity?: number | null;
+ partId: string;
+ supplierId: string;
+ supplierPartId?: string | null;
+ supplierUnitOfMeasureCode?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- conversionFactor?: number
- createdAt?: string
- createdBy?: string
- id?: string
- minimumOrderQuantity?: number | null
- partId?: string
- supplierId?: string
- supplierPartId?: string | null
- supplierUnitOfMeasureCode?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ conversionFactor?: number;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ minimumOrderQuantity?: number | null;
+ partId?: string;
+ supplierId?: string;
+ supplierPartId?: string | null;
+ supplierUnitOfMeasureCode?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "partSupplier_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partSupplier_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partSupplier_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partSupplier_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "partSupplier_partId_fkey"
- columns: ["partId"]
- referencedRelation: "part"
- referencedColumns: ["id"]
+ foreignKeyName: "partSupplier_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "part";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partSupplier_partId_fkey"
- columns: ["partId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["partId"]
+ foreignKeyName: "partSupplier_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["partId"];
},
{
- foreignKeyName: "partSupplier_partId_fkey"
- columns: ["partId"]
- referencedRelation: "parts"
- referencedColumns: ["id"]
+ foreignKeyName: "partSupplier_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "parts";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partSupplier_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "partSupplier_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partSupplier_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "partSupplier_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "partSupplier_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "partSupplier_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "partSupplier_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "partSupplier_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partSupplier_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "partSupplier_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partSupplier_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partSupplier_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partSupplier_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partSupplier_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
partUnitSalePrice: {
Row: {
- allowInvoiceDiscount: boolean
- createdAt: string
- createdBy: string
- currencyCode: string
- partId: string
- priceIncludesTax: boolean
- salesBlocked: boolean
- salesUnitOfMeasureCode: string | null
- unitSalePrice: number
- updatedAt: string | null
- updatedBy: string | null
- }
+ allowInvoiceDiscount: boolean;
+ createdAt: string;
+ createdBy: string;
+ currencyCode: string;
+ partId: string;
+ priceIncludesTax: boolean;
+ salesBlocked: boolean;
+ salesUnitOfMeasureCode: string | null;
+ unitSalePrice: number;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- allowInvoiceDiscount?: boolean
- createdAt?: string
- createdBy: string
- currencyCode: string
- partId: string
- priceIncludesTax?: boolean
- salesBlocked?: boolean
- salesUnitOfMeasureCode?: string | null
- unitSalePrice?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ allowInvoiceDiscount?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ currencyCode: string;
+ partId: string;
+ priceIncludesTax?: boolean;
+ salesBlocked?: boolean;
+ salesUnitOfMeasureCode?: string | null;
+ unitSalePrice?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- allowInvoiceDiscount?: boolean
- createdAt?: string
- createdBy?: string
- currencyCode?: string
- partId?: string
- priceIncludesTax?: boolean
- salesBlocked?: boolean
- salesUnitOfMeasureCode?: string | null
- unitSalePrice?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ allowInvoiceDiscount?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ currencyCode?: string;
+ partId?: string;
+ priceIncludesTax?: boolean;
+ salesBlocked?: boolean;
+ salesUnitOfMeasureCode?: string | null;
+ unitSalePrice?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "partUnitSalePrice_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partUnitSalePrice_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partUnitSalePrice_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partUnitSalePrice_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "partUnitSalePrice_currencyCode_fkey"
- columns: ["currencyCode"]
- referencedRelation: "currency"
- referencedColumns: ["code"]
+ foreignKeyName: "partUnitSalePrice_currencyCode_fkey";
+ columns: ["currencyCode"];
+ referencedRelation: "currency";
+ referencedColumns: ["code"];
},
{
- foreignKeyName: "partUnitSalePrice_partId_fkey"
- columns: ["partId"]
- referencedRelation: "part"
- referencedColumns: ["id"]
+ foreignKeyName: "partUnitSalePrice_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "part";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partUnitSalePrice_partId_fkey"
- columns: ["partId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["partId"]
+ foreignKeyName: "partUnitSalePrice_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["partId"];
},
{
- foreignKeyName: "partUnitSalePrice_partId_fkey"
- columns: ["partId"]
- referencedRelation: "parts"
- referencedColumns: ["id"]
+ foreignKeyName: "partUnitSalePrice_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "parts";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partUnitSalePrice_salesUnitOfMeasureId_fkey"
- columns: ["salesUnitOfMeasureCode"]
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code"]
+ foreignKeyName: "partUnitSalePrice_salesUnitOfMeasureId_fkey";
+ columns: ["salesUnitOfMeasureCode"];
+ referencedRelation: "unitOfMeasure";
+ referencedColumns: ["code"];
},
{
- foreignKeyName: "partUnitSalePrice_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "partUnitSalePrice_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "partUnitSalePrice_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "partUnitSalePrice_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
paymentTerm: {
Row: {
- active: boolean
- calculationMethod: Database["public"]["Enums"]["paymentTermCalculationMethod"]
- createdAt: string
- createdBy: string
- daysDiscount: number
- daysDue: number
- discountPercentage: number
- id: string
- name: string
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ calculationMethod: Database["public"]["Enums"]["paymentTermCalculationMethod"];
+ createdAt: string;
+ createdBy: string;
+ daysDiscount: number;
+ daysDue: number;
+ discountPercentage: number;
+ id: string;
+ name: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- calculationMethod?: Database["public"]["Enums"]["paymentTermCalculationMethod"]
- createdAt?: string
- createdBy: string
- daysDiscount?: number
- daysDue?: number
- discountPercentage?: number
- id?: string
- name: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ calculationMethod?: Database["public"]["Enums"]["paymentTermCalculationMethod"];
+ createdAt?: string;
+ createdBy: string;
+ daysDiscount?: number;
+ daysDue?: number;
+ discountPercentage?: number;
+ id?: string;
+ name: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- calculationMethod?: Database["public"]["Enums"]["paymentTermCalculationMethod"]
- createdAt?: string
- createdBy?: string
- daysDiscount?: number
- daysDue?: number
- discountPercentage?: number
- id?: string
- name?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ calculationMethod?: Database["public"]["Enums"]["paymentTermCalculationMethod"];
+ createdAt?: string;
+ createdBy?: string;
+ daysDiscount?: number;
+ daysDue?: number;
+ discountPercentage?: number;
+ id?: string;
+ name?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "paymentTerm_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "paymentTerm_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "paymentTerm_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "paymentTerm_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "paymentTerm_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "paymentTerm_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "paymentTerm_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "paymentTerm_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
postingGroupInventory: {
Row: {
- capacityVarianceAccount: string
- costOfGoodsSoldAccount: string
- directCostAppliedAccount: string
- id: string
- inventoryAccount: string
- inventoryAdjustmentVarianceAccount: string
- inventoryInterimAccrualAccount: string
- inventoryInvoicedNotReceivedAccount: string
- inventoryReceivedNotInvoicedAccount: string
- inventoryShippedNotInvoicedAccount: string
- locationId: string | null
- materialVarianceAccount: string
- overheadAccount: string
- overheadCostAppliedAccount: string
- partGroupId: string | null
- purchaseVarianceAccount: string
- updatedBy: string | null
- workInProgressAccount: string
- }
+ capacityVarianceAccount: string;
+ costOfGoodsSoldAccount: string;
+ directCostAppliedAccount: string;
+ id: string;
+ inventoryAccount: string;
+ inventoryAdjustmentVarianceAccount: string;
+ inventoryInterimAccrualAccount: string;
+ inventoryInvoicedNotReceivedAccount: string;
+ inventoryReceivedNotInvoicedAccount: string;
+ inventoryShippedNotInvoicedAccount: string;
+ locationId: string | null;
+ materialVarianceAccount: string;
+ overheadAccount: string;
+ overheadCostAppliedAccount: string;
+ partGroupId: string | null;
+ purchaseVarianceAccount: string;
+ updatedBy: string | null;
+ workInProgressAccount: string;
+ };
Insert: {
- capacityVarianceAccount: string
- costOfGoodsSoldAccount: string
- directCostAppliedAccount: string
- id?: string
- inventoryAccount: string
- inventoryAdjustmentVarianceAccount: string
- inventoryInterimAccrualAccount: string
- inventoryInvoicedNotReceivedAccount: string
- inventoryReceivedNotInvoicedAccount: string
- inventoryShippedNotInvoicedAccount: string
- locationId?: string | null
- materialVarianceAccount: string
- overheadAccount: string
- overheadCostAppliedAccount: string
- partGroupId?: string | null
- purchaseVarianceAccount: string
- updatedBy?: string | null
- workInProgressAccount: string
- }
+ capacityVarianceAccount: string;
+ costOfGoodsSoldAccount: string;
+ directCostAppliedAccount: string;
+ id?: string;
+ inventoryAccount: string;
+ inventoryAdjustmentVarianceAccount: string;
+ inventoryInterimAccrualAccount: string;
+ inventoryInvoicedNotReceivedAccount: string;
+ inventoryReceivedNotInvoicedAccount: string;
+ inventoryShippedNotInvoicedAccount: string;
+ locationId?: string | null;
+ materialVarianceAccount: string;
+ overheadAccount: string;
+ overheadCostAppliedAccount: string;
+ partGroupId?: string | null;
+ purchaseVarianceAccount: string;
+ updatedBy?: string | null;
+ workInProgressAccount: string;
+ };
Update: {
- capacityVarianceAccount?: string
- costOfGoodsSoldAccount?: string
- directCostAppliedAccount?: string
- id?: string
- inventoryAccount?: string
- inventoryAdjustmentVarianceAccount?: string
- inventoryInterimAccrualAccount?: string
- inventoryInvoicedNotReceivedAccount?: string
- inventoryReceivedNotInvoicedAccount?: string
- inventoryShippedNotInvoicedAccount?: string
- locationId?: string | null
- materialVarianceAccount?: string
- overheadAccount?: string
- overheadCostAppliedAccount?: string
- partGroupId?: string | null
- purchaseVarianceAccount?: string
- updatedBy?: string | null
- workInProgressAccount?: string
- }
+ capacityVarianceAccount?: string;
+ costOfGoodsSoldAccount?: string;
+ directCostAppliedAccount?: string;
+ id?: string;
+ inventoryAccount?: string;
+ inventoryAdjustmentVarianceAccount?: string;
+ inventoryInterimAccrualAccount?: string;
+ inventoryInvoicedNotReceivedAccount?: string;
+ inventoryReceivedNotInvoicedAccount?: string;
+ inventoryShippedNotInvoicedAccount?: string;
+ locationId?: string | null;
+ materialVarianceAccount?: string;
+ overheadAccount?: string;
+ overheadCostAppliedAccount?: string;
+ partGroupId?: string | null;
+ purchaseVarianceAccount?: string;
+ updatedBy?: string | null;
+ workInProgressAccount?: string;
+ };
Relationships: [
{
- foreignKeyName: "postingGroupInventory_capacityVarianceAccount_fkey"
- columns: ["capacityVarianceAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_capacityVarianceAccount_fkey";
+ columns: ["capacityVarianceAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_capacityVarianceAccount_fkey"
- columns: ["capacityVarianceAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_capacityVarianceAccount_fkey";
+ columns: ["capacityVarianceAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_costOfGoodsSoldAccount_fkey"
- columns: ["costOfGoodsSoldAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_costOfGoodsSoldAccount_fkey";
+ columns: ["costOfGoodsSoldAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_costOfGoodsSoldAccount_fkey"
- columns: ["costOfGoodsSoldAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_costOfGoodsSoldAccount_fkey";
+ columns: ["costOfGoodsSoldAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_directCostAppliedAccount_fkey"
- columns: ["directCostAppliedAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_directCostAppliedAccount_fkey";
+ columns: ["directCostAppliedAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_directCostAppliedAccount_fkey"
- columns: ["directCostAppliedAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_directCostAppliedAccount_fkey";
+ columns: ["directCostAppliedAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_inventoryAccount_fkey"
- columns: ["inventoryAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_inventoryAccount_fkey";
+ columns: ["inventoryAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_inventoryAccount_fkey"
- columns: ["inventoryAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_inventoryAccount_fkey";
+ columns: ["inventoryAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_inventoryAdjustmentVarianceAccount_fkey"
- columns: ["inventoryAdjustmentVarianceAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_inventoryAdjustmentVarianceAccount_fkey";
+ columns: ["inventoryAdjustmentVarianceAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_inventoryAdjustmentVarianceAccount_fkey"
- columns: ["inventoryAdjustmentVarianceAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_inventoryAdjustmentVarianceAccount_fkey";
+ columns: ["inventoryAdjustmentVarianceAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_inventoryInterimAccrualAccount_fkey"
- columns: ["inventoryInterimAccrualAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_inventoryInterimAccrualAccount_fkey";
+ columns: ["inventoryInterimAccrualAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_inventoryInterimAccrualAccount_fkey"
- columns: ["inventoryInterimAccrualAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_inventoryInterimAccrualAccount_fkey";
+ columns: ["inventoryInterimAccrualAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_inventoryInvoicedNotReceivedAccount_fkey"
- columns: ["inventoryInvoicedNotReceivedAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_inventoryInvoicedNotReceivedAccount_fkey";
+ columns: ["inventoryInvoicedNotReceivedAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_inventoryInvoicedNotReceivedAccount_fkey"
- columns: ["inventoryInvoicedNotReceivedAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_inventoryInvoicedNotReceivedAccount_fkey";
+ columns: ["inventoryInvoicedNotReceivedAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_inventoryReceivedNotInvoicedAccount_fkey"
- columns: ["inventoryReceivedNotInvoicedAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_inventoryReceivedNotInvoicedAccount_fkey";
+ columns: ["inventoryReceivedNotInvoicedAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_inventoryReceivedNotInvoicedAccount_fkey"
- columns: ["inventoryReceivedNotInvoicedAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_inventoryReceivedNotInvoicedAccount_fkey";
+ columns: ["inventoryReceivedNotInvoicedAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_inventoryShippedNotInvoicedAccount_fkey"
- columns: ["inventoryShippedNotInvoicedAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_inventoryShippedNotInvoicedAccount_fkey";
+ columns: ["inventoryShippedNotInvoicedAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_inventoryShippedNotInvoicedAccount_fkey"
- columns: ["inventoryShippedNotInvoicedAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_inventoryShippedNotInvoicedAccount_fkey";
+ columns: ["inventoryShippedNotInvoicedAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "postingGroupInventory_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "postingGroupInventory_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "postingGroupInventory_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "postingGroupInventory_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "postingGroupInventory_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "postingGroupInventory_materialVarianceAccount_fkey"
- columns: ["materialVarianceAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_materialVarianceAccount_fkey";
+ columns: ["materialVarianceAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_materialVarianceAccount_fkey"
- columns: ["materialVarianceAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_materialVarianceAccount_fkey";
+ columns: ["materialVarianceAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_overheadAccount_fkey"
- columns: ["overheadAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_overheadAccount_fkey";
+ columns: ["overheadAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_overheadAccount_fkey"
- columns: ["overheadAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_overheadAccount_fkey";
+ columns: ["overheadAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_overheadCostAppliedAccount_fkey"
- columns: ["overheadCostAppliedAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_overheadCostAppliedAccount_fkey";
+ columns: ["overheadCostAppliedAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_overheadCostAppliedAccount_fkey"
- columns: ["overheadCostAppliedAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_overheadCostAppliedAccount_fkey";
+ columns: ["overheadCostAppliedAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_partGroupId_fkey"
- columns: ["partGroupId"]
- referencedRelation: "partGroup"
- referencedColumns: ["id"]
+ foreignKeyName: "postingGroupInventory_partGroupId_fkey";
+ columns: ["partGroupId"];
+ referencedRelation: "partGroup";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "postingGroupInventory_partGroupId_fkey"
- columns: ["partGroupId"]
- referencedRelation: "services"
- referencedColumns: ["partGroupId"]
+ foreignKeyName: "postingGroupInventory_partGroupId_fkey";
+ columns: ["partGroupId"];
+ referencedRelation: "services";
+ referencedColumns: ["partGroupId"];
},
{
- foreignKeyName: "postingGroupInventory_purchaseVarianceAccount_fkey"
- columns: ["purchaseVarianceAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_purchaseVarianceAccount_fkey";
+ columns: ["purchaseVarianceAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_purchaseVarianceAccount_fkey"
- columns: ["purchaseVarianceAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_purchaseVarianceAccount_fkey";
+ columns: ["purchaseVarianceAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "postingGroupInventory_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "postingGroupInventory_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "postingGroupInventory_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "postingGroupInventory_workInProgressAccount_fkey"
- columns: ["workInProgressAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_workInProgressAccount_fkey";
+ columns: ["workInProgressAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupInventory_workInProgressAccount_fkey"
- columns: ["workInProgressAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupInventory_workInProgressAccount_fkey";
+ columns: ["workInProgressAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
}
- ]
- }
+ ];
+ };
postingGroupPurchasing: {
Row: {
- id: string
- partGroupId: string | null
- payablesAccount: string
- purchaseAccount: string
- purchaseCreditAccount: string
- purchaseDiscountAccount: string
- purchasePrepaymentAccount: string
- purchaseTaxPayableAccount: string
- supplierTypeId: string | null
- updatedBy: string | null
- }
+ id: string;
+ partGroupId: string | null;
+ payablesAccount: string;
+ purchaseAccount: string;
+ purchaseCreditAccount: string;
+ purchaseDiscountAccount: string;
+ purchasePrepaymentAccount: string;
+ purchaseTaxPayableAccount: string;
+ supplierTypeId: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- id?: string
- partGroupId?: string | null
- payablesAccount: string
- purchaseAccount: string
- purchaseCreditAccount: string
- purchaseDiscountAccount: string
- purchasePrepaymentAccount: string
- purchaseTaxPayableAccount: string
- supplierTypeId?: string | null
- updatedBy?: string | null
- }
+ id?: string;
+ partGroupId?: string | null;
+ payablesAccount: string;
+ purchaseAccount: string;
+ purchaseCreditAccount: string;
+ purchaseDiscountAccount: string;
+ purchasePrepaymentAccount: string;
+ purchaseTaxPayableAccount: string;
+ supplierTypeId?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- id?: string
- partGroupId?: string | null
- payablesAccount?: string
- purchaseAccount?: string
- purchaseCreditAccount?: string
- purchaseDiscountAccount?: string
- purchasePrepaymentAccount?: string
- purchaseTaxPayableAccount?: string
- supplierTypeId?: string | null
- updatedBy?: string | null
- }
+ id?: string;
+ partGroupId?: string | null;
+ payablesAccount?: string;
+ purchaseAccount?: string;
+ purchaseCreditAccount?: string;
+ purchaseDiscountAccount?: string;
+ purchasePrepaymentAccount?: string;
+ purchaseTaxPayableAccount?: string;
+ supplierTypeId?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "postingGroupPurchasing_partGroupId_fkey"
- columns: ["partGroupId"]
- referencedRelation: "partGroup"
- referencedColumns: ["id"]
+ foreignKeyName: "postingGroupPurchasing_partGroupId_fkey";
+ columns: ["partGroupId"];
+ referencedRelation: "partGroup";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "postingGroupPurchasing_partGroupId_fkey"
- columns: ["partGroupId"]
- referencedRelation: "services"
- referencedColumns: ["partGroupId"]
+ foreignKeyName: "postingGroupPurchasing_partGroupId_fkey";
+ columns: ["partGroupId"];
+ referencedRelation: "services";
+ referencedColumns: ["partGroupId"];
},
{
- foreignKeyName: "postingGroupPurchasing_payablesAccount_fkey"
- columns: ["payablesAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupPurchasing_payablesAccount_fkey";
+ columns: ["payablesAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupPurchasing_payablesAccount_fkey"
- columns: ["payablesAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupPurchasing_payablesAccount_fkey";
+ columns: ["payablesAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseAccount_fkey"
- columns: ["purchaseAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupPurchasing_purchaseAccount_fkey";
+ columns: ["purchaseAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseAccount_fkey"
- columns: ["purchaseAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupPurchasing_purchaseAccount_fkey";
+ columns: ["purchaseAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseCreditAccount_fkey"
- columns: ["purchaseCreditAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupPurchasing_purchaseCreditAccount_fkey";
+ columns: ["purchaseCreditAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseCreditAccount_fkey"
- columns: ["purchaseCreditAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupPurchasing_purchaseCreditAccount_fkey";
+ columns: ["purchaseCreditAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseDiscountAccount_fkey"
- columns: ["purchaseDiscountAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupPurchasing_purchaseDiscountAccount_fkey";
+ columns: ["purchaseDiscountAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseDiscountAccount_fkey"
- columns: ["purchaseDiscountAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupPurchasing_purchaseDiscountAccount_fkey";
+ columns: ["purchaseDiscountAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupPurchasing_purchasePrepaymentAccount_fkey"
- columns: ["purchasePrepaymentAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupPurchasing_purchasePrepaymentAccount_fkey";
+ columns: ["purchasePrepaymentAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupPurchasing_purchasePrepaymentAccount_fkey"
- columns: ["purchasePrepaymentAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupPurchasing_purchasePrepaymentAccount_fkey";
+ columns: ["purchasePrepaymentAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseTaxPayableAccount_fkey"
- columns: ["purchaseTaxPayableAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupPurchasing_purchaseTaxPayableAccount_fkey";
+ columns: ["purchaseTaxPayableAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupPurchasing_purchaseTaxPayableAccount_fkey"
- columns: ["purchaseTaxPayableAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupPurchasing_purchaseTaxPayableAccount_fkey";
+ columns: ["purchaseTaxPayableAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupPurchasing_supplierTypeId_fkey"
- columns: ["supplierTypeId"]
- referencedRelation: "supplierType"
- referencedColumns: ["id"]
+ foreignKeyName: "postingGroupPurchasing_supplierTypeId_fkey";
+ columns: ["supplierTypeId"];
+ referencedRelation: "supplierType";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "postingGroupPurchasing_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "postingGroupPurchasing_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "postingGroupPurchasing_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
postingGroupSales: {
Row: {
- customerTypeId: string | null
- id: string
- partGroupId: string | null
- receivablesAccount: string
- salesAccount: string
- salesCreditAccount: string
- salesDiscountAccount: string
- salesPrepaymentAccount: string
- salesTaxPayableAccount: string
- updatedBy: string | null
- }
+ customerTypeId: string | null;
+ id: string;
+ partGroupId: string | null;
+ receivablesAccount: string;
+ salesAccount: string;
+ salesCreditAccount: string;
+ salesDiscountAccount: string;
+ salesPrepaymentAccount: string;
+ salesTaxPayableAccount: string;
+ updatedBy: string | null;
+ };
Insert: {
- customerTypeId?: string | null
- id?: string
- partGroupId?: string | null
- receivablesAccount: string
- salesAccount: string
- salesCreditAccount: string
- salesDiscountAccount: string
- salesPrepaymentAccount: string
- salesTaxPayableAccount: string
- updatedBy?: string | null
- }
+ customerTypeId?: string | null;
+ id?: string;
+ partGroupId?: string | null;
+ receivablesAccount: string;
+ salesAccount: string;
+ salesCreditAccount: string;
+ salesDiscountAccount: string;
+ salesPrepaymentAccount: string;
+ salesTaxPayableAccount: string;
+ updatedBy?: string | null;
+ };
Update: {
- customerTypeId?: string | null
- id?: string
- partGroupId?: string | null
- receivablesAccount?: string
- salesAccount?: string
- salesCreditAccount?: string
- salesDiscountAccount?: string
- salesPrepaymentAccount?: string
- salesTaxPayableAccount?: string
- updatedBy?: string | null
- }
+ customerTypeId?: string | null;
+ id?: string;
+ partGroupId?: string | null;
+ receivablesAccount?: string;
+ salesAccount?: string;
+ salesCreditAccount?: string;
+ salesDiscountAccount?: string;
+ salesPrepaymentAccount?: string;
+ salesTaxPayableAccount?: string;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "postingGroupSales_customerTypeId_fkey"
- columns: ["customerTypeId"]
- referencedRelation: "customerType"
- referencedColumns: ["id"]
+ foreignKeyName: "postingGroupSales_customerTypeId_fkey";
+ columns: ["customerTypeId"];
+ referencedRelation: "customerType";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "postingGroupSales_partGroupId_fkey"
- columns: ["partGroupId"]
- referencedRelation: "partGroup"
- referencedColumns: ["id"]
+ foreignKeyName: "postingGroupSales_partGroupId_fkey";
+ columns: ["partGroupId"];
+ referencedRelation: "partGroup";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "postingGroupSales_partGroupId_fkey"
- columns: ["partGroupId"]
- referencedRelation: "services"
- referencedColumns: ["partGroupId"]
+ foreignKeyName: "postingGroupSales_partGroupId_fkey";
+ columns: ["partGroupId"];
+ referencedRelation: "services";
+ referencedColumns: ["partGroupId"];
},
{
- foreignKeyName: "postingGroupSales_receivablesAccount_fkey"
- columns: ["receivablesAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupSales_receivablesAccount_fkey";
+ columns: ["receivablesAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupSales_receivablesAccount_fkey"
- columns: ["receivablesAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupSales_receivablesAccount_fkey";
+ columns: ["receivablesAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupSales_salesAccount_fkey"
- columns: ["salesAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupSales_salesAccount_fkey";
+ columns: ["salesAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupSales_salesAccount_fkey"
- columns: ["salesAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupSales_salesAccount_fkey";
+ columns: ["salesAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupSales_salesCreditAccount_fkey"
- columns: ["salesCreditAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupSales_salesCreditAccount_fkey";
+ columns: ["salesCreditAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupSales_salesCreditAccount_fkey"
- columns: ["salesCreditAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupSales_salesCreditAccount_fkey";
+ columns: ["salesCreditAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupSales_salesDiscountAccount_fkey"
- columns: ["salesDiscountAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupSales_salesDiscountAccount_fkey";
+ columns: ["salesDiscountAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupSales_salesDiscountAccount_fkey"
- columns: ["salesDiscountAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupSales_salesDiscountAccount_fkey";
+ columns: ["salesDiscountAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupSales_salesPrepaymentAccount_fkey"
- columns: ["salesPrepaymentAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupSales_salesPrepaymentAccount_fkey";
+ columns: ["salesPrepaymentAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupSales_salesPrepaymentAccount_fkey"
- columns: ["salesPrepaymentAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupSales_salesPrepaymentAccount_fkey";
+ columns: ["salesPrepaymentAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupSales_salesTaxPayableAccount_fkey"
- columns: ["salesTaxPayableAccount"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupSales_salesTaxPayableAccount_fkey";
+ columns: ["salesTaxPayableAccount"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupSales_salesTaxPayableAccount_fkey"
- columns: ["salesTaxPayableAccount"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "postingGroupSales_salesTaxPayableAccount_fkey";
+ columns: ["salesTaxPayableAccount"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "postingGroupSales_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "postingGroupSales_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "postingGroupSales_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "postingGroupSales_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
purchaseInvoice: {
Row: {
- balance: number
- createdAt: string
- createdBy: string
- currencyCode: string
- 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
- updatedBy: string | null
- }
+ balance: number;
+ createdAt: string;
+ createdBy: string;
+ currencyCode: string;
+ 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;
+ updatedBy: string | null;
+ };
Insert: {
- balance?: number
- createdAt?: string
- createdBy: string
- currencyCode: string
- 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
- updatedBy?: string | null
- }
+ balance?: number;
+ createdAt?: string;
+ createdBy: string;
+ currencyCode: string;
+ 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;
+ updatedBy?: string | null;
+ };
Update: {
- balance?: number
- createdAt?: string
- createdBy?: string
- currencyCode?: string
- 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
- updatedBy?: string | null
- }
+ balance?: number;
+ createdAt?: string;
+ createdBy?: string;
+ currencyCode?: string;
+ 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;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "purchaseInvoice_currencyCode_fkey"
- columns: ["currencyCode"]
- referencedRelation: "currency"
- referencedColumns: ["code"]
+ foreignKeyName: "purchaseInvoice_currencyCode_fkey";
+ columns: ["currencyCode"];
+ referencedRelation: "currency";
+ referencedColumns: ["code"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierContactId_fkey"
- columns: ["invoiceSupplierContactId"]
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierContactId_fkey";
+ columns: ["invoiceSupplierContactId"];
+ referencedRelation: "supplierContact";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierLocationId_fkey"
- columns: ["invoiceSupplierLocationId"]
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierLocationId_fkey";
+ columns: ["invoiceSupplierLocationId"];
+ referencedRelation: "supplierLocation";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_paymentTermId_fkey"
- columns: ["paymentTermId"]
- referencedRelation: "paymentTerm"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_paymentTermId_fkey";
+ columns: ["paymentTermId"];
+ referencedRelation: "paymentTerm";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseInvoice_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseInvoice_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
purchaseInvoiceLine: {
Row: {
- accountNumber: string | null
- assetId: string | null
- createdAt: string
- createdBy: string
- currencyCode: string
- description: string | null
- exchangeRate: number
- id: string
- invoiceId: string
- invoiceLineType: Database["public"]["Enums"]["payableLineType"]
- locationId: string | null
- partId: string | null
- purchaseOrderId: string | null
- purchaseOrderLineId: string | null
- quantity: number
- serviceId: string | null
- shelfId: string | null
- totalAmount: number | null
- unitOfMeasureCode: string | null
- unitPrice: number
- updatedAt: string | null
- updatedBy: string | null
- }
+ accountNumber: string | null;
+ assetId: string | null;
+ createdAt: string;
+ createdBy: string;
+ currencyCode: string;
+ description: string | null;
+ exchangeRate: number;
+ id: string;
+ invoiceId: string;
+ invoiceLineType: Database["public"]["Enums"]["payableLineType"];
+ locationId: string | null;
+ partId: string | null;
+ purchaseOrderId: string | null;
+ purchaseOrderLineId: string | null;
+ quantity: number;
+ serviceId: string | null;
+ shelfId: string | null;
+ totalAmount: number | null;
+ unitOfMeasureCode: string | null;
+ unitPrice: number;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- accountNumber?: string | null
- assetId?: string | null
- createdAt?: string
- createdBy: string
- currencyCode: string
- description?: string | null
- exchangeRate?: number
- id?: string
- invoiceId: string
- invoiceLineType: Database["public"]["Enums"]["payableLineType"]
- locationId?: string | null
- partId?: string | null
- purchaseOrderId?: string | null
- purchaseOrderLineId?: string | null
- quantity?: number
- serviceId?: string | null
- shelfId?: string | null
- totalAmount?: number | null
- unitOfMeasureCode?: string | null
- unitPrice?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ accountNumber?: string | null;
+ assetId?: string | null;
+ createdAt?: string;
+ createdBy: string;
+ currencyCode: string;
+ description?: string | null;
+ exchangeRate?: number;
+ id?: string;
+ invoiceId: string;
+ invoiceLineType: Database["public"]["Enums"]["payableLineType"];
+ locationId?: string | null;
+ partId?: string | null;
+ purchaseOrderId?: string | null;
+ purchaseOrderLineId?: string | null;
+ quantity?: number;
+ serviceId?: string | null;
+ shelfId?: string | null;
+ totalAmount?: number | null;
+ unitOfMeasureCode?: string | null;
+ unitPrice?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- accountNumber?: string | null
- assetId?: string | null
- createdAt?: string
- createdBy?: string
- currencyCode?: string
- description?: string | null
- exchangeRate?: number
- id?: string
- invoiceId?: string
- invoiceLineType?: Database["public"]["Enums"]["payableLineType"]
- locationId?: string | null
- partId?: string | null
- purchaseOrderId?: string | null
- purchaseOrderLineId?: string | null
- quantity?: number
- serviceId?: string | null
- shelfId?: string | null
- totalAmount?: number | null
- unitOfMeasureCode?: string | null
- unitPrice?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ accountNumber?: string | null;
+ assetId?: string | null;
+ createdAt?: string;
+ createdBy?: string;
+ currencyCode?: string;
+ description?: string | null;
+ exchangeRate?: number;
+ id?: string;
+ invoiceId?: string;
+ invoiceLineType?: Database["public"]["Enums"]["payableLineType"];
+ locationId?: string | null;
+ partId?: string | null;
+ purchaseOrderId?: string | null;
+ purchaseOrderLineId?: string | null;
+ quantity?: number;
+ serviceId?: string | null;
+ shelfId?: string | null;
+ totalAmount?: number | null;
+ unitOfMeasureCode?: string | null;
+ unitPrice?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "purchaseInvoiceLines_accountNumber_fkey"
- columns: ["accountNumber"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "purchaseInvoiceLines_accountNumber_fkey";
+ columns: ["accountNumber"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "purchaseInvoiceLines_accountNumber_fkey"
- columns: ["accountNumber"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "purchaseInvoiceLines_accountNumber_fkey";
+ columns: ["accountNumber"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceLines_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceLines_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseInvoiceLines_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "purchaseInvoiceLines_currencyCode_fkey"
- columns: ["currencyCode"]
- referencedRelation: "currency"
- referencedColumns: ["code"]
+ foreignKeyName: "purchaseInvoiceLines_currencyCode_fkey";
+ columns: ["currencyCode"];
+ referencedRelation: "currency";
+ referencedColumns: ["code"];
},
{
- foreignKeyName: "purchaseInvoiceLines_invoiceId_fkey"
- columns: ["invoiceId"]
- referencedRelation: "purchaseInvoice"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceLines_invoiceId_fkey";
+ columns: ["invoiceId"];
+ referencedRelation: "purchaseInvoice";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceLines_invoiceId_fkey"
- columns: ["invoiceId"]
- referencedRelation: "purchaseInvoices"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceLines_invoiceId_fkey";
+ columns: ["invoiceId"];
+ referencedRelation: "purchaseInvoices";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceLines_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "purchaseInvoiceLines_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "purchaseInvoiceLines_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "purchaseInvoiceLines_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "purchaseInvoiceLines_partId_fkey"
- columns: ["partId"]
- referencedRelation: "part"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceLines_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "part";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceLines_partId_fkey"
- columns: ["partId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["partId"]
+ foreignKeyName: "purchaseInvoiceLines_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["partId"];
},
{
- foreignKeyName: "purchaseInvoiceLines_partId_fkey"
- columns: ["partId"]
- referencedRelation: "parts"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceLines_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "parts";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- referencedRelation: "purchaseOrder"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey";
+ columns: ["purchaseOrderId"];
+ referencedRelation: "purchaseOrder";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderId_fkey";
+ columns: ["purchaseOrderId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceLines_purchaseOrderLineId_fkey"
- columns: ["purchaseOrderLineId"]
- referencedRelation: "purchaseOrderLine"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceLines_purchaseOrderLineId_fkey";
+ columns: ["purchaseOrderLineId"];
+ referencedRelation: "purchaseOrderLine";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceLines_serviceId_fkey"
- columns: ["serviceId"]
- referencedRelation: "service"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceLines_serviceId_fkey";
+ columns: ["serviceId"];
+ referencedRelation: "service";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceLines_serviceId_fkey"
- columns: ["serviceId"]
- referencedRelation: "services"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceLines_serviceId_fkey";
+ columns: ["serviceId"];
+ referencedRelation: "services";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceLines_shelfId_fkey"
- columns: ["shelfId", "locationId"]
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
+ foreignKeyName: "purchaseInvoiceLines_shelfId_fkey";
+ columns: ["shelfId", "locationId"];
+ referencedRelation: "shelf";
+ referencedColumns: ["id", "locationId"];
},
{
- foreignKeyName: "purchaseInvoiceLines_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode"]
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code"]
+ foreignKeyName: "purchaseInvoiceLines_unitOfMeasureCode_fkey";
+ columns: ["unitOfMeasureCode"];
+ referencedRelation: "unitOfMeasure";
+ referencedColumns: ["code"];
},
{
- foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseInvoiceLines_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
purchaseInvoicePaymentRelation: {
Row: {
- id: string
- invoiceId: string
- paymentId: string
- }
+ id: string;
+ invoiceId: string;
+ paymentId: string;
+ };
Insert: {
- id?: string
- invoiceId: string
- paymentId: string
- }
+ id?: string;
+ invoiceId: string;
+ paymentId: string;
+ };
Update: {
- id?: string
- invoiceId?: string
- paymentId?: string
- }
+ id?: string;
+ invoiceId?: string;
+ paymentId?: string;
+ };
Relationships: [
{
- foreignKeyName: "purchasePayments_invoiceId_fkey"
- columns: ["invoiceId"]
- referencedRelation: "purchaseInvoice"
- referencedColumns: ["id"]
+ foreignKeyName: "purchasePayments_invoiceId_fkey";
+ columns: ["invoiceId"];
+ referencedRelation: "purchaseInvoice";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchasePayments_invoiceId_fkey"
- columns: ["invoiceId"]
- referencedRelation: "purchaseInvoices"
- referencedColumns: ["id"]
+ foreignKeyName: "purchasePayments_invoiceId_fkey";
+ columns: ["invoiceId"];
+ referencedRelation: "purchaseInvoices";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchasePayments_paymentId_fkey"
- columns: ["paymentId"]
- referencedRelation: "purchasePayment"
- referencedColumns: ["id"]
+ foreignKeyName: "purchasePayments_paymentId_fkey";
+ columns: ["paymentId"];
+ referencedRelation: "purchasePayment";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
purchaseInvoicePriceChange: {
Row: {
- id: string
- invoiceId: string
- invoiceLineId: string
- newPrice: number
- newQuantity: number
- previousPrice: number
- previousQuantity: number
- updatedBy: string
- }
+ 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
- }
+ 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
- }
+ id?: string;
+ invoiceId?: string;
+ invoiceLineId?: string;
+ newPrice?: number;
+ newQuantity?: number;
+ previousPrice?: number;
+ previousQuantity?: number;
+ updatedBy?: string;
+ };
Relationships: [
{
- foreignKeyName: "purchaseInvoicePriceChange_invoiceId_fkey"
- columns: ["invoiceId"]
- referencedRelation: "purchaseInvoice"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoicePriceChange_invoiceId_fkey";
+ columns: ["invoiceId"];
+ referencedRelation: "purchaseInvoice";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoicePriceChange_invoiceId_fkey"
- columns: ["invoiceId"]
- referencedRelation: "purchaseInvoices"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoicePriceChange_invoiceId_fkey";
+ columns: ["invoiceId"];
+ referencedRelation: "purchaseInvoices";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoicePriceChange_invoiceLineId_fkey"
- columns: ["invoiceLineId"]
- referencedRelation: "purchaseInvoiceLine"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoicePriceChange_invoiceLineId_fkey";
+ columns: ["invoiceLineId"];
+ referencedRelation: "purchaseInvoiceLine";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseInvoicePriceChange_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
purchaseInvoiceStatusHistory: {
Row: {
- createdAt: string
- id: string
- invoiceId: string
- status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- }
+ createdAt: string;
+ id: string;
+ invoiceId: string;
+ status: Database["public"]["Enums"]["purchaseInvoiceStatus"];
+ };
Insert: {
- createdAt?: string
- id?: string
- invoiceId: string
- status: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- }
+ createdAt?: string;
+ id?: string;
+ invoiceId: string;
+ status: Database["public"]["Enums"]["purchaseInvoiceStatus"];
+ };
Update: {
- createdAt?: string
- id?: string
- invoiceId?: string
- status?: Database["public"]["Enums"]["purchaseInvoiceStatus"]
- }
+ createdAt?: string;
+ id?: string;
+ invoiceId?: string;
+ status?: Database["public"]["Enums"]["purchaseInvoiceStatus"];
+ };
Relationships: [
{
- foreignKeyName: "purchaseInvoiceStatusHistory_invoiceId_fkey"
- columns: ["invoiceId"]
- referencedRelation: "purchaseInvoice"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceStatusHistory_invoiceId_fkey";
+ columns: ["invoiceId"];
+ referencedRelation: "purchaseInvoice";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoiceStatusHistory_invoiceId_fkey"
- columns: ["invoiceId"]
- referencedRelation: "purchaseInvoices"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoiceStatusHistory_invoiceId_fkey";
+ columns: ["invoiceId"];
+ referencedRelation: "purchaseInvoices";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
purchaseOrder: {
Row: {
- closedAt: string | null
- closedBy: string | null
- createdAt: string
- createdBy: string
- id: string
- notes: string | null
- orderDate: string
- purchaseOrderId: string
- status: Database["public"]["Enums"]["purchaseOrderStatus"]
- supplierContactId: string | null
- supplierId: string
- supplierReference: string | null
- type: Database["public"]["Enums"]["purchaseOrderType"]
- updatedAt: string | null
- updatedBy: string | null
- }
+ closedAt: string | null;
+ closedBy: string | null;
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ notes: string | null;
+ orderDate: string;
+ purchaseOrderId: string;
+ status: Database["public"]["Enums"]["purchaseOrderStatus"];
+ supplierContactId: string | null;
+ supplierId: string;
+ supplierReference: string | null;
+ type: Database["public"]["Enums"]["purchaseOrderType"];
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- closedAt?: string | null
- closedBy?: string | null
- createdAt?: string
- createdBy: string
- id?: string
- notes?: string | null
- orderDate?: string
- purchaseOrderId: string
- status?: Database["public"]["Enums"]["purchaseOrderStatus"]
- supplierContactId?: string | null
- supplierId: string
- supplierReference?: string | null
- type: Database["public"]["Enums"]["purchaseOrderType"]
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ closedAt?: string | null;
+ closedBy?: string | null;
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ notes?: string | null;
+ orderDate?: string;
+ purchaseOrderId: string;
+ status?: Database["public"]["Enums"]["purchaseOrderStatus"];
+ supplierContactId?: string | null;
+ supplierId: string;
+ supplierReference?: string | null;
+ type: Database["public"]["Enums"]["purchaseOrderType"];
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- closedAt?: string | null
- closedBy?: string | null
- createdAt?: string
- createdBy?: string
- id?: string
- notes?: string | null
- orderDate?: string
- purchaseOrderId?: string
- status?: Database["public"]["Enums"]["purchaseOrderStatus"]
- supplierContactId?: string | null
- supplierId?: string
- supplierReference?: string | null
- type?: Database["public"]["Enums"]["purchaseOrderType"]
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ closedAt?: string | null;
+ closedBy?: string | null;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ notes?: string | null;
+ orderDate?: string;
+ purchaseOrderId?: string;
+ status?: Database["public"]["Enums"]["purchaseOrderStatus"];
+ supplierContactId?: string | null;
+ supplierId?: string;
+ supplierReference?: string | null;
+ type?: Database["public"]["Enums"]["purchaseOrderType"];
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey";
+ columns: ["closedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey";
+ columns: ["closedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseOrder_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "purchaseOrder_supplierContactId_fkey"
- columns: ["supplierContactId"]
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_supplierContactId_fkey";
+ columns: ["supplierContactId"];
+ referencedRelation: "supplierContact";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseOrder_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseOrder_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseOrder_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
purchaseOrderDelivery: {
Row: {
- customerId: string | null
- customerLocationId: string | 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
- trackingNumber: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ customerId: string | null;
+ customerLocationId: string | 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;
+ trackingNumber: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- customerId?: string | null
- customerLocationId?: string | 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
- trackingNumber?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ customerId?: string | null;
+ customerLocationId?: string | 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;
+ trackingNumber?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- customerId?: string | null
- customerLocationId?: string | 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
- trackingNumber?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ customerId?: string | null;
+ customerLocationId?: string | 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;
+ trackingNumber?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
- columns: ["customerId"]
- referencedRelation: "customer"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderDelivery_customerId_fkey";
+ columns: ["customerId"];
+ referencedRelation: "customer";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderDelivery_customerId_fkey"
- columns: ["customerId"]
- referencedRelation: "customers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderDelivery_customerId_fkey";
+ columns: ["customerId"];
+ referencedRelation: "customers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderDelivery_customerLocationId_fkey"
- columns: ["customerLocationId"]
- referencedRelation: "customerLocation"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderDelivery_customerLocationId_fkey";
+ columns: ["customerLocationId"];
+ referencedRelation: "customerLocation";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderDelivery_id_fkey"
- columns: ["id"]
- referencedRelation: "purchaseOrder"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderDelivery_id_fkey";
+ columns: ["id"];
+ referencedRelation: "purchaseOrder";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderDelivery_id_fkey"
- columns: ["id"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderDelivery_id_fkey";
+ columns: ["id"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderDelivery_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "purchaseOrderDelivery_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "purchaseOrderDelivery_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "purchaseOrderDelivery_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "purchaseOrderDelivery_shippingMethodId_fkey"
- columns: ["shippingMethodId"]
- referencedRelation: "shippingMethod"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderDelivery_shippingMethodId_fkey";
+ columns: ["shippingMethodId"];
+ referencedRelation: "shippingMethod";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderDelivery_shippingTermId_fkey"
- columns: ["shippingTermId"]
- referencedRelation: "shippingTerm"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderDelivery_shippingTermId_fkey";
+ columns: ["shippingTermId"];
+ referencedRelation: "shippingTerm";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseOrderDelivery_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
purchaseOrderFavorite: {
Row: {
- purchaseOrderId: string
- userId: string
- }
+ purchaseOrderId: string;
+ userId: string;
+ };
Insert: {
- purchaseOrderId: string
- userId: string
- }
+ purchaseOrderId: string;
+ userId: string;
+ };
Update: {
- purchaseOrderId?: string
- userId?: string
- }
+ purchaseOrderId?: string;
+ userId?: string;
+ };
Relationships: [
{
- foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- referencedRelation: "purchaseOrder"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey";
+ columns: ["purchaseOrderId"];
+ referencedRelation: "purchaseOrder";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderFavorites_purchaseOrderId_fkey";
+ columns: ["purchaseOrderId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderFavorites_userId_fkey"
- columns: ["userId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderFavorites_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderFavorites_userId_fkey"
- columns: ["userId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseOrderFavorites_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
purchaseOrderLine: {
Row: {
- accountNumber: string | null
- assetId: string | null
- createdAt: string
- createdBy: string
- description: string | null
- id: string
- invoicedComplete: boolean
- locationId: string | null
- partId: string | null
- purchaseOrderId: string
- purchaseOrderLineType: Database["public"]["Enums"]["purchaseOrderLineType"]
- purchaseQuantity: number | null
- quantityInvoiced: number | null
- quantityReceived: number | null
- quantityToInvoice: number | null
- quantityToReceive: number | null
- receivedComplete: boolean
- requiresInspection: boolean
- serviceId: string | null
- setupPrice: number | null
- shelfId: string | null
- unitOfMeasureCode: string | null
- unitPrice: number | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ accountNumber: string | null;
+ assetId: string | null;
+ createdAt: string;
+ createdBy: string;
+ description: string | null;
+ id: string;
+ invoicedComplete: boolean;
+ locationId: string | null;
+ partId: string | null;
+ purchaseOrderId: string;
+ purchaseOrderLineType: Database["public"]["Enums"]["purchaseOrderLineType"];
+ purchaseQuantity: number | null;
+ quantityInvoiced: number | null;
+ quantityReceived: number | null;
+ quantityToInvoice: number | null;
+ quantityToReceive: number | null;
+ receivedComplete: boolean;
+ requiresInspection: boolean;
+ serviceId: string | null;
+ setupPrice: number | null;
+ shelfId: string | null;
+ unitOfMeasureCode: string | null;
+ unitPrice: number | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- accountNumber?: string | null
- assetId?: string | null
- createdAt?: string
- createdBy: string
- description?: string | null
- id?: string
- invoicedComplete?: boolean
- locationId?: string | null
- partId?: string | null
- purchaseOrderId: string
- purchaseOrderLineType: Database["public"]["Enums"]["purchaseOrderLineType"]
- purchaseQuantity?: number | null
- quantityInvoiced?: number | null
- quantityReceived?: number | null
- quantityToInvoice?: number | null
- quantityToReceive?: number | null
- receivedComplete?: boolean
- requiresInspection?: boolean
- serviceId?: string | null
- setupPrice?: number | null
- shelfId?: string | null
- unitOfMeasureCode?: string | null
- unitPrice?: number | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ accountNumber?: string | null;
+ assetId?: string | null;
+ createdAt?: string;
+ createdBy: string;
+ description?: string | null;
+ id?: string;
+ invoicedComplete?: boolean;
+ locationId?: string | null;
+ partId?: string | null;
+ purchaseOrderId: string;
+ purchaseOrderLineType: Database["public"]["Enums"]["purchaseOrderLineType"];
+ purchaseQuantity?: number | null;
+ quantityInvoiced?: number | null;
+ quantityReceived?: number | null;
+ quantityToInvoice?: number | null;
+ quantityToReceive?: number | null;
+ receivedComplete?: boolean;
+ requiresInspection?: boolean;
+ serviceId?: string | null;
+ setupPrice?: number | null;
+ shelfId?: string | null;
+ unitOfMeasureCode?: string | null;
+ unitPrice?: number | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- accountNumber?: string | null
- assetId?: string | null
- createdAt?: string
- createdBy?: string
- description?: string | null
- id?: string
- invoicedComplete?: boolean
- locationId?: string | null
- partId?: string | null
- purchaseOrderId?: string
- purchaseOrderLineType?: Database["public"]["Enums"]["purchaseOrderLineType"]
- purchaseQuantity?: number | null
- quantityInvoiced?: number | null
- quantityReceived?: number | null
- quantityToInvoice?: number | null
- quantityToReceive?: number | null
- receivedComplete?: boolean
- requiresInspection?: boolean
- serviceId?: string | null
- setupPrice?: number | null
- shelfId?: string | null
- unitOfMeasureCode?: string | null
- unitPrice?: number | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ accountNumber?: string | null;
+ assetId?: string | null;
+ createdAt?: string;
+ createdBy?: string;
+ description?: string | null;
+ id?: string;
+ invoicedComplete?: boolean;
+ locationId?: string | null;
+ partId?: string | null;
+ purchaseOrderId?: string;
+ purchaseOrderLineType?: Database["public"]["Enums"]["purchaseOrderLineType"];
+ purchaseQuantity?: number | null;
+ quantityInvoiced?: number | null;
+ quantityReceived?: number | null;
+ quantityToInvoice?: number | null;
+ quantityToReceive?: number | null;
+ receivedComplete?: boolean;
+ requiresInspection?: boolean;
+ serviceId?: string | null;
+ setupPrice?: number | null;
+ shelfId?: string | null;
+ unitOfMeasureCode?: string | null;
+ unitPrice?: number | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "purchaseOrderLine_accountNumber_fkey"
- columns: ["accountNumber"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "purchaseOrderLine_accountNumber_fkey";
+ columns: ["accountNumber"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "purchaseOrderLine_accountNumber_fkey"
- columns: ["accountNumber"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "purchaseOrderLine_accountNumber_fkey";
+ columns: ["accountNumber"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "purchaseOrderLine_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderLine_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderLine_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseOrderLine_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "purchaseOrderLine_partId_fkey"
- columns: ["partId"]
- referencedRelation: "part"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderLine_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "part";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderLine_partId_fkey"
- columns: ["partId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["partId"]
+ foreignKeyName: "purchaseOrderLine_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["partId"];
},
{
- foreignKeyName: "purchaseOrderLine_partId_fkey"
- columns: ["partId"]
- referencedRelation: "parts"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderLine_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "parts";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- referencedRelation: "purchaseOrder"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey";
+ columns: ["purchaseOrderId"];
+ referencedRelation: "purchaseOrder";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderLine_purchaseOrderId_fkey";
+ columns: ["purchaseOrderId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderLine_serviceId_fkey"
- columns: ["serviceId"]
- referencedRelation: "service"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderLine_serviceId_fkey";
+ columns: ["serviceId"];
+ referencedRelation: "service";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderLine_serviceId_fkey"
- columns: ["serviceId"]
- referencedRelation: "services"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderLine_serviceId_fkey";
+ columns: ["serviceId"];
+ referencedRelation: "services";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderLine_shelfId_fkey"
- columns: ["shelfId", "locationId"]
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
+ foreignKeyName: "purchaseOrderLine_shelfId_fkey";
+ columns: ["shelfId", "locationId"];
+ referencedRelation: "shelf";
+ referencedColumns: ["id", "locationId"];
},
{
- foreignKeyName: "purchaseOrderLine_unitOfMeasureCode_fkey"
- columns: ["unitOfMeasureCode"]
- referencedRelation: "unitOfMeasure"
- referencedColumns: ["code"]
+ foreignKeyName: "purchaseOrderLine_unitOfMeasureCode_fkey";
+ columns: ["unitOfMeasureCode"];
+ referencedRelation: "unitOfMeasure";
+ referencedColumns: ["code"];
},
{
- foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderLine_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderLine_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseOrderLine_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
purchaseOrderPayment: {
Row: {
- currencyCode: string
- id: string
- invoiceSupplierContactId: string | null
- invoiceSupplierId: string | null
- invoiceSupplierLocationId: string | null
- paymentComplete: boolean
- paymentTermId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ currencyCode: string;
+ id: string;
+ invoiceSupplierContactId: string | null;
+ invoiceSupplierId: string | null;
+ invoiceSupplierLocationId: string | null;
+ paymentComplete: boolean;
+ paymentTermId: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- currencyCode?: string
- id: string
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentComplete?: boolean
- paymentTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ currencyCode?: string;
+ id: string;
+ invoiceSupplierContactId?: string | null;
+ invoiceSupplierId?: string | null;
+ invoiceSupplierLocationId?: string | null;
+ paymentComplete?: boolean;
+ paymentTermId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- currencyCode?: string
- id?: string
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentComplete?: boolean
- paymentTermId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ currencyCode?: string;
+ id?: string;
+ invoiceSupplierContactId?: string | null;
+ invoiceSupplierId?: string | null;
+ invoiceSupplierLocationId?: string | null;
+ paymentComplete?: boolean;
+ paymentTermId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "purchaseOrderPayment_currencyCode_fkey"
- columns: ["currencyCode"]
- referencedRelation: "currency"
- referencedColumns: ["code"]
+ foreignKeyName: "purchaseOrderPayment_currencyCode_fkey";
+ columns: ["currencyCode"];
+ referencedRelation: "currency";
+ referencedColumns: ["code"];
},
{
- foreignKeyName: "purchaseOrderPayment_id_fkey"
- columns: ["id"]
- referencedRelation: "purchaseOrder"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderPayment_id_fkey";
+ columns: ["id"];
+ referencedRelation: "purchaseOrder";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderPayment_id_fkey"
- columns: ["id"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderPayment_id_fkey";
+ columns: ["id"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierContactId_fkey"
- columns: ["invoiceSupplierContactId"]
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierContactId_fkey";
+ columns: ["invoiceSupplierContactId"];
+ referencedRelation: "supplierContact";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderPayment_invoiceSupplierLocationId_fkey"
- columns: ["invoiceSupplierLocationId"]
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderPayment_invoiceSupplierLocationId_fkey";
+ columns: ["invoiceSupplierLocationId"];
+ referencedRelation: "supplierLocation";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderPayment_paymentTermId_fkey"
- columns: ["paymentTermId"]
- referencedRelation: "paymentTerm"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderPayment_paymentTermId_fkey";
+ columns: ["paymentTermId"];
+ referencedRelation: "paymentTerm";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
purchaseOrderStatusHistory: {
Row: {
- createdAt: string
- createdBy: string
- id: string
- purchaseOrderId: string
- status: Database["public"]["Enums"]["purchaseOrderStatus"]
- }
+ 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"]
- }
+ 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"]
- }
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ purchaseOrderId?: string;
+ status?: Database["public"]["Enums"]["purchaseOrderStatus"];
+ };
Relationships: [
{
- foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseOrderStatusHistory_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- referencedRelation: "purchaseOrder"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey";
+ columns: ["purchaseOrderId"];
+ referencedRelation: "purchaseOrder";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderStatusHistory_purchaseOrderId_fkey";
+ columns: ["purchaseOrderId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
purchaseOrderTransaction: {
Row: {
- createdAt: string
- id: string
- purchaseOrderId: string
- type: Database["public"]["Enums"]["purchaseOrderTransactionType"]
- userId: string
- }
+ 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
- }
+ 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
- }
+ createdAt?: string;
+ id?: string;
+ purchaseOrderId?: string;
+ type?: Database["public"]["Enums"]["purchaseOrderTransactionType"];
+ userId?: string;
+ };
Relationships: [
{
- foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- referencedRelation: "purchaseOrder"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey";
+ columns: ["purchaseOrderId"];
+ referencedRelation: "purchaseOrder";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey"
- columns: ["purchaseOrderId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderTransaction_purchaseOrderId_fkey";
+ columns: ["purchaseOrderId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderTransaction_userId_fkey"
- columns: ["userId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrderTransaction_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrderTransaction_userId_fkey"
- columns: ["userId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseOrderTransaction_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
purchasePayment: {
Row: {
- createdAt: string
- createdBy: string
- currencyCode: string
- exchangeRate: number
- id: string
- paymentDate: string | null
- paymentId: string
- supplierId: string
- totalAmount: number
- updatedAt: string | null
- updatedBy: string | null
- }
+ createdAt: string;
+ createdBy: string;
+ currencyCode: string;
+ exchangeRate: number;
+ id: string;
+ paymentDate: string | null;
+ paymentId: string;
+ supplierId: string;
+ totalAmount: number;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- createdAt?: string
- createdBy: string
- currencyCode: string
- exchangeRate?: number
- id?: string
- paymentDate?: string | null
- paymentId: string
- supplierId: string
- totalAmount?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ createdAt?: string;
+ createdBy: string;
+ currencyCode: string;
+ exchangeRate?: number;
+ id?: string;
+ paymentDate?: string | null;
+ paymentId: string;
+ supplierId: string;
+ totalAmount?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- createdAt?: string
- createdBy?: string
- currencyCode?: string
- exchangeRate?: number
- id?: string
- paymentDate?: string | null
- paymentId?: string
- supplierId?: string
- totalAmount?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ createdAt?: string;
+ createdBy?: string;
+ currencyCode?: string;
+ exchangeRate?: number;
+ id?: string;
+ paymentDate?: string | null;
+ paymentId?: string;
+ supplierId?: string;
+ totalAmount?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "purchasePayment_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchasePayment_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchasePayment_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchasePayment_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "purchasePayment_currencyCode_fkey"
- columns: ["currencyCode"]
- referencedRelation: "currency"
- referencedColumns: ["code"]
+ foreignKeyName: "purchasePayment_currencyCode_fkey";
+ columns: ["currencyCode"];
+ referencedRelation: "currency";
+ referencedColumns: ["code"];
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "purchasePayment_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchasePayment_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchasePayment_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchasePayment_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchasePayment_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchasePayment_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchasePayment_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchasePayment_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchasePayment_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchasePayment_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
receipt: {
Row: {
- createdAt: string
- createdBy: string
- externalDocumentId: string | null
- id: string
- invoiced: boolean | null
- locationId: string | null
- postingDate: string | null
- receiptId: string
+ createdAt: string;
+ createdBy: string;
+ 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
- updatedAt: string | null
- updatedBy: string | null
- }
+ | null;
+ sourceDocumentId: string | null;
+ sourceDocumentReadableId: string | null;
+ status: Database["public"]["Enums"]["receiptStatus"];
+ supplierId: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- createdAt?: string
- createdBy: string
- externalDocumentId?: string | null
- id?: string
- invoiced?: boolean | null
- locationId?: string | null
- postingDate?: string | null
- receiptId: string
+ createdAt?: string;
+ createdBy: string;
+ 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
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ | null;
+ sourceDocumentId?: string | null;
+ sourceDocumentReadableId?: string | null;
+ status?: Database["public"]["Enums"]["receiptStatus"];
+ supplierId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- createdAt?: string
- createdBy?: string
- externalDocumentId?: string | null
- id?: string
- invoiced?: boolean | null
- locationId?: string | null
- postingDate?: string | null
- receiptId?: string
+ createdAt?: string;
+ createdBy?: string;
+ 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
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ | null;
+ sourceDocumentId?: string | null;
+ sourceDocumentReadableId?: string | null;
+ status?: Database["public"]["Enums"]["receiptStatus"];
+ supplierId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "receipt_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "receipt_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receipt_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "receipt_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "receipt_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "receipt_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receipt_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "receipt_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "receipt_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "receipt_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "receipt_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "receipt_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "receipt_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "receipt_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "receipt_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receipt_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "receipt_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receipt_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "receipt_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
receiptLine: {
Row: {
- createdAt: string
- createdBy: string
- id: string
- lineId: string | null
- locationId: string | null
- orderQuantity: number
- outstandingQuantity: number
- partId: string
- receiptId: string
- receivedQuantity: number
- shelfId: string | null
- unitOfMeasure: string
- unitPrice: number
- updatedAt: string | null
- updatedBy: string | null
- }
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ lineId: string | null;
+ locationId: string | null;
+ orderQuantity: number;
+ outstandingQuantity: number;
+ partId: string;
+ receiptId: string;
+ receivedQuantity: number;
+ shelfId: string | null;
+ unitOfMeasure: string;
+ unitPrice: number;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- createdAt?: string
- createdBy: string
- id?: string
- lineId?: string | null
- locationId?: string | null
- orderQuantity: number
- outstandingQuantity?: number
- partId: string
- receiptId: string
- receivedQuantity?: number
- shelfId?: string | null
- unitOfMeasure: string
- unitPrice: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ lineId?: string | null;
+ locationId?: string | null;
+ orderQuantity: number;
+ outstandingQuantity?: number;
+ partId: string;
+ receiptId: string;
+ receivedQuantity?: number;
+ shelfId?: string | null;
+ unitOfMeasure: string;
+ unitPrice: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- createdAt?: string
- createdBy?: string
- id?: string
- lineId?: string | null
- locationId?: string | null
- orderQuantity?: number
- outstandingQuantity?: number
- partId?: string
- receiptId?: string
- receivedQuantity?: number
- shelfId?: string | null
- unitOfMeasure?: string
- unitPrice?: number
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ lineId?: string | null;
+ locationId?: string | null;
+ orderQuantity?: number;
+ outstandingQuantity?: number;
+ partId?: string;
+ receiptId?: string;
+ receivedQuantity?: number;
+ shelfId?: string | null;
+ unitOfMeasure?: string;
+ unitPrice?: number;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "receiptLine_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "receiptLine_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receiptLine_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "receiptLine_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "receiptLine_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "receiptLine_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receiptLine_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "receiptLine_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "receiptLine_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "receiptLine_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "receiptLine_partId_fkey"
- columns: ["partId"]
- referencedRelation: "part"
- referencedColumns: ["id"]
+ foreignKeyName: "receiptLine_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "part";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receiptLine_partId_fkey"
- columns: ["partId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["partId"]
+ foreignKeyName: "receiptLine_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["partId"];
},
{
- foreignKeyName: "receiptLine_partId_fkey"
- columns: ["partId"]
- referencedRelation: "parts"
- referencedColumns: ["id"]
+ foreignKeyName: "receiptLine_partId_fkey";
+ columns: ["partId"];
+ referencedRelation: "parts";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receiptLine_receiptId_fkey"
- columns: ["receiptId"]
- referencedRelation: "receipt"
- referencedColumns: ["id"]
+ foreignKeyName: "receiptLine_receiptId_fkey";
+ columns: ["receiptId"];
+ referencedRelation: "receipt";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receiptLine_receiptId_fkey"
- columns: ["receiptId"]
- referencedRelation: "receiptsPostedNotInvoiced"
- referencedColumns: ["id"]
+ foreignKeyName: "receiptLine_receiptId_fkey";
+ columns: ["receiptId"];
+ referencedRelation: "receiptsPostedNotInvoiced";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receiptLine_shelfId_fkey"
- columns: ["shelfId", "locationId"]
- referencedRelation: "shelf"
- referencedColumns: ["id", "locationId"]
+ foreignKeyName: "receiptLine_shelfId_fkey";
+ columns: ["shelfId", "locationId"];
+ referencedRelation: "shelf";
+ referencedColumns: ["id", "locationId"];
},
{
- foreignKeyName: "receiptLine_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "receiptLine_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receiptLine_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "receiptLine_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
search: {
Row: {
- description: string | null
- entity: Database["public"]["Enums"]["searchEntity"] | null
- fts: unknown | null
- id: number
- link: string
- name: string
- uuid: string | null
- }
+ description: string | null;
+ entity: Database["public"]["Enums"]["searchEntity"] | null;
+ fts: unknown | null;
+ id: number;
+ link: string;
+ name: string;
+ uuid: string | null;
+ };
Insert: {
- description?: string | null
- entity?: Database["public"]["Enums"]["searchEntity"] | null
- fts?: unknown | null
- id?: number
- link: string
- name: string
- uuid?: string | null
- }
+ description?: string | null;
+ entity?: Database["public"]["Enums"]["searchEntity"] | null;
+ fts?: unknown | null;
+ id?: number;
+ link: string;
+ name: string;
+ uuid?: string | null;
+ };
Update: {
- description?: string | null
- entity?: Database["public"]["Enums"]["searchEntity"] | null
- fts?: unknown | null
- id?: number
- link?: string
- name?: string
- uuid?: string | null
- }
- Relationships: []
- }
+ description?: string | null;
+ entity?: Database["public"]["Enums"]["searchEntity"] | null;
+ fts?: unknown | null;
+ id?: number;
+ link?: string;
+ name?: string;
+ uuid?: string | null;
+ };
+ Relationships: [];
+ };
sequence: {
Row: {
- id: string
- name: string
- next: number
- prefix: string | null
- size: number
- step: number
- suffix: string | null
- table: string
- updatedAt: string | null
- updatedBy: string | null
- }
+ 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: {
- id?: string
- name: string
- next?: number
- prefix?: string | null
- size?: number
- step?: number
- suffix?: string | null
- table: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ 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: {
- id?: string
- name?: string
- next?: number
- prefix?: string | null
- size?: number
- step?: number
- suffix?: string | null
- table?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ 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: "sequence_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "sequence_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "sequence_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "sequence_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
service: {
Row: {
- active: boolean
- approved: boolean
- approvedBy: string | null
- blocked: boolean
- createdAt: string
- createdBy: string
- description: string | null
- fromDate: string | null
- id: string
- name: string
- partGroupId: string | null
- serviceType: Database["public"]["Enums"]["serviceType"]
- toDate: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ approved: boolean;
+ approvedBy: string | null;
+ blocked: boolean;
+ createdAt: string;
+ createdBy: string;
+ description: string | null;
+ fromDate: string | null;
+ id: string;
+ name: string;
+ partGroupId: string | null;
+ serviceType: Database["public"]["Enums"]["serviceType"];
+ toDate: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- approved?: boolean
- approvedBy?: string | null
- blocked?: boolean
- createdAt?: string
- createdBy: string
- description?: string | null
- fromDate?: string | null
- id: string
- name: string
- partGroupId?: string | null
- serviceType: Database["public"]["Enums"]["serviceType"]
- toDate?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ approved?: boolean;
+ approvedBy?: string | null;
+ blocked?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ description?: string | null;
+ fromDate?: string | null;
+ id: string;
+ name: string;
+ partGroupId?: string | null;
+ serviceType: Database["public"]["Enums"]["serviceType"];
+ toDate?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- approved?: boolean
- approvedBy?: string | null
- blocked?: boolean
- createdAt?: string
- createdBy?: string
- description?: string | null
- fromDate?: string | null
- id?: string
- name?: string
- partGroupId?: string | null
- serviceType?: Database["public"]["Enums"]["serviceType"]
- toDate?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ approved?: boolean;
+ approvedBy?: string | null;
+ blocked?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ description?: string | null;
+ fromDate?: string | null;
+ id?: string;
+ name?: string;
+ partGroupId?: string | null;
+ serviceType?: Database["public"]["Enums"]["serviceType"];
+ toDate?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "service_approvedBy_fkey"
- columns: ["approvedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "service_approvedBy_fkey";
+ columns: ["approvedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "service_approvedBy_fkey"
- columns: ["approvedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "service_approvedBy_fkey";
+ columns: ["approvedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "service_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "service_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "service_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "service_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "service_partGroupId_fkey"
- columns: ["partGroupId"]
- referencedRelation: "partGroup"
- referencedColumns: ["id"]
+ foreignKeyName: "service_partGroupId_fkey";
+ columns: ["partGroupId"];
+ referencedRelation: "partGroup";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "service_partGroupId_fkey"
- columns: ["partGroupId"]
- referencedRelation: "services"
- referencedColumns: ["partGroupId"]
+ foreignKeyName: "service_partGroupId_fkey";
+ columns: ["partGroupId"];
+ referencedRelation: "services";
+ referencedColumns: ["partGroupId"];
},
{
- foreignKeyName: "service_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "service_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "service_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "service_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
serviceSupplier: {
Row: {
- active: boolean
- createdAt: string
- createdBy: string
- id: string
- serviceId: string
- supplierId: string
- supplierServiceId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ serviceId: string;
+ supplierId: string;
+ supplierServiceId: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- createdAt?: string
- createdBy: string
- id?: string
- serviceId: string
- supplierId: string
- supplierServiceId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ serviceId: string;
+ supplierId: string;
+ supplierServiceId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- createdAt?: string
- createdBy?: string
- id?: string
- serviceId?: string
- supplierId?: string
- supplierServiceId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ serviceId?: string;
+ supplierId?: string;
+ supplierServiceId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "serviceSupplier_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "serviceSupplier_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "serviceSupplier_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "serviceSupplier_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "serviceSupplier_serviceId_fkey"
- columns: ["serviceId"]
- referencedRelation: "service"
- referencedColumns: ["id"]
+ foreignKeyName: "serviceSupplier_serviceId_fkey";
+ columns: ["serviceId"];
+ referencedRelation: "service";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "serviceSupplier_serviceId_fkey"
- columns: ["serviceId"]
- referencedRelation: "services"
- referencedColumns: ["id"]
+ foreignKeyName: "serviceSupplier_serviceId_fkey";
+ columns: ["serviceId"];
+ referencedRelation: "services";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "serviceSupplier_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "serviceSupplier_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "serviceSupplier_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "serviceSupplier_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "serviceSupplier_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "serviceSupplier_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "serviceSupplier_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "serviceSupplier_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "serviceSupplier_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "serviceSupplier_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "serviceSupplier_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "serviceSupplier_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "serviceSupplier_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "serviceSupplier_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
shelf: {
Row: {
- active: boolean
- createdAt: string
- createdBy: string
- id: string
- locationId: string
- updatedAt: string | null
- updatedBy: string | null
- warehouseId: string | null
- }
+ active: boolean;
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ locationId: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ warehouseId: string | null;
+ };
Insert: {
- active?: boolean
- createdAt?: string
- createdBy: string
- id: string
- locationId: string
- updatedAt?: string | null
- updatedBy?: string | null
- warehouseId?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ id: string;
+ locationId: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ warehouseId?: string | null;
+ };
Update: {
- active?: boolean
- createdAt?: string
- createdBy?: string
- id?: string
- locationId?: string
- updatedAt?: string | null
- updatedBy?: string | null
- warehouseId?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ locationId?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ warehouseId?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "shelf_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "shelf_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "shelf_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "shelf_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "shelf_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "shelf_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "shelf_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "shelf_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "shelf_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "shelf_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "shelf_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "shelf_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "shelf_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "shelf_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "shelf_warehouseId_fkey"
- columns: ["warehouseId"]
- referencedRelation: "warehouse"
- referencedColumns: ["id"]
+ foreignKeyName: "shelf_warehouseId_fkey";
+ columns: ["warehouseId"];
+ referencedRelation: "warehouse";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
shift: {
Row: {
- active: boolean
- endTime: string
- friday: boolean
- id: string
- locationId: string
- monday: boolean
- name: string
- saturday: boolean
- startTime: string
- sunday: boolean
- thursday: boolean
- tuesday: boolean
- wednesday: boolean
- }
+ active: boolean;
+ endTime: string;
+ friday: boolean;
+ id: string;
+ locationId: string;
+ monday: boolean;
+ name: string;
+ saturday: boolean;
+ startTime: string;
+ sunday: boolean;
+ thursday: boolean;
+ tuesday: boolean;
+ wednesday: boolean;
+ };
Insert: {
- active?: boolean
- endTime: string
- friday?: boolean
- id?: string
- locationId: string
- monday?: boolean
- name: string
- saturday?: boolean
- startTime: string
- sunday?: boolean
- thursday?: boolean
- tuesday?: boolean
- wednesday?: boolean
- }
+ active?: boolean;
+ endTime: string;
+ friday?: boolean;
+ id?: string;
+ locationId: string;
+ monday?: boolean;
+ name: string;
+ saturday?: boolean;
+ startTime: string;
+ sunday?: boolean;
+ thursday?: boolean;
+ tuesday?: boolean;
+ wednesday?: boolean;
+ };
Update: {
- active?: boolean
- endTime?: string
- friday?: boolean
- id?: string
- locationId?: string
- monday?: boolean
- name?: string
- saturday?: boolean
- startTime?: string
- sunday?: boolean
- thursday?: boolean
- tuesday?: boolean
- wednesday?: boolean
- }
+ active?: boolean;
+ endTime?: string;
+ friday?: boolean;
+ id?: string;
+ locationId?: string;
+ monday?: boolean;
+ name?: string;
+ saturday?: boolean;
+ startTime?: string;
+ sunday?: boolean;
+ thursday?: boolean;
+ tuesday?: boolean;
+ wednesday?: boolean;
+ };
Relationships: [
{
- foreignKeyName: "shifts_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "shifts_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "shifts_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "shifts_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "shifts_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "shifts_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
}
- ]
- }
+ ];
+ };
shippingMethod: {
Row: {
- active: boolean
- carrier: Database["public"]["Enums"]["shippingCarrier"]
- carrierAccountId: string | null
- createdAt: string
- createdBy: string
- id: string
- name: string
- trackingUrl: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ carrier: Database["public"]["Enums"]["shippingCarrier"];
+ carrierAccountId: string | null;
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ name: string;
+ trackingUrl: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- carrier?: Database["public"]["Enums"]["shippingCarrier"]
- carrierAccountId?: string | null
- createdAt?: string
- createdBy: string
- id?: string
- name: string
- trackingUrl?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ carrier?: Database["public"]["Enums"]["shippingCarrier"];
+ carrierAccountId?: string | null;
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ name: string;
+ trackingUrl?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- carrier?: Database["public"]["Enums"]["shippingCarrier"]
- carrierAccountId?: string | null
- createdAt?: string
- createdBy?: string
- id?: string
- name?: string
- trackingUrl?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ carrier?: Database["public"]["Enums"]["shippingCarrier"];
+ carrierAccountId?: string | null;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ name?: string;
+ trackingUrl?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "shippingMethod_carrierAccountId_fkey"
- columns: ["carrierAccountId"]
- referencedRelation: "account"
- referencedColumns: ["number"]
+ foreignKeyName: "shippingMethod_carrierAccountId_fkey";
+ columns: ["carrierAccountId"];
+ referencedRelation: "account";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "shippingMethod_carrierAccountId_fkey"
- columns: ["carrierAccountId"]
- referencedRelation: "accounts"
- referencedColumns: ["number"]
+ foreignKeyName: "shippingMethod_carrierAccountId_fkey";
+ columns: ["carrierAccountId"];
+ referencedRelation: "accounts";
+ referencedColumns: ["number"];
},
{
- foreignKeyName: "shippingMethod_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "shippingMethod_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "shippingMethod_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "shippingMethod_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "shippingMethod_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "shippingMethod_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "shippingMethod_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "shippingMethod_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
shippingTerm: {
Row: {
- active: boolean
- createdAt: string
- createdBy: string
- id: string
- name: string
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ name: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- createdAt?: string
- createdBy: string
- id?: string
- name: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ name: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- createdAt?: string
- createdBy?: string
- id?: string
- name?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ name?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "shippingTerm_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "shippingTerm_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "shippingTerm_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "shippingTerm_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "shippingTerm_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "shippingTerm_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "shippingTerm_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "shippingTerm_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
supplier: {
Row: {
- accountManagerId: string | null
- createdAt: string
- createdBy: string | null
- id: string
- logo: string | null
- name: string
- supplierStatusId: string | null
- supplierTypeId: string | null
- taxId: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ accountManagerId: string | null;
+ createdAt: string;
+ createdBy: string | null;
+ id: string;
+ logo: string | null;
+ name: string;
+ supplierStatusId: string | null;
+ supplierTypeId: string | null;
+ taxId: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- accountManagerId?: string | null
- createdAt?: string
- createdBy?: string | null
- id?: string
- logo?: string | null
- name: string
- supplierStatusId?: string | null
- supplierTypeId?: string | null
- taxId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ accountManagerId?: string | null;
+ createdAt?: string;
+ createdBy?: string | null;
+ id?: string;
+ logo?: string | null;
+ name: string;
+ supplierStatusId?: string | null;
+ supplierTypeId?: string | null;
+ taxId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- accountManagerId?: string | null
- createdAt?: string
- createdBy?: string | null
- id?: string
- logo?: string | null
- name?: string
- supplierStatusId?: string | null
- supplierTypeId?: string | null
- taxId?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ accountManagerId?: string | null;
+ createdAt?: string;
+ createdBy?: string | null;
+ id?: string;
+ logo?: string | null;
+ name?: string;
+ supplierStatusId?: string | null;
+ supplierTypeId?: string | null;
+ taxId?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "supplier_accountManagerId_fkey"
- columns: ["accountManagerId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "supplier_accountManagerId_fkey";
+ columns: ["accountManagerId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplier_accountManagerId_fkey"
- columns: ["accountManagerId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "supplier_accountManagerId_fkey";
+ columns: ["accountManagerId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "supplier_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "supplier_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplier_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "supplier_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "supplier_supplierStatusId_fkey"
- columns: ["supplierStatusId"]
- referencedRelation: "supplierStatus"
- referencedColumns: ["id"]
+ foreignKeyName: "supplier_supplierStatusId_fkey";
+ columns: ["supplierStatusId"];
+ referencedRelation: "supplierStatus";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplier_supplierTypeId_fkey"
- columns: ["supplierTypeId"]
- referencedRelation: "supplierType"
- referencedColumns: ["id"]
+ foreignKeyName: "supplier_supplierTypeId_fkey";
+ columns: ["supplierTypeId"];
+ referencedRelation: "supplierType";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplier_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "supplier_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplier_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "supplier_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
supplierAccount: {
Row: {
- id: string
- supplierId: string
- }
+ id: string;
+ supplierId: string;
+ };
Insert: {
- id: string
- supplierId: string
- }
+ id: string;
+ supplierId: string;
+ };
Update: {
- id?: string
- supplierId?: string
- }
+ id?: string;
+ supplierId?: string;
+ };
Relationships: [
{
- foreignKeyName: "supplierAccount_id_fkey"
- columns: ["id"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierAccount_id_fkey";
+ columns: ["id"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierAccount_id_fkey"
- columns: ["id"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "supplierAccount_id_fkey";
+ columns: ["id"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierAccount_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierAccount_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierAccount_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierAccount_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierAccount_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierAccount_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
supplierContact: {
Row: {
- contactId: string
- id: string
- supplierId: string
- supplierLocationId: string | null
- userId: string | null
- }
+ contactId: string;
+ id: string;
+ supplierId: string;
+ supplierLocationId: string | null;
+ userId: string | null;
+ };
Insert: {
- contactId: string
- id?: string
- supplierId: string
- supplierLocationId?: string | null
- userId?: string | null
- }
+ contactId: string;
+ id?: string;
+ supplierId: string;
+ supplierLocationId?: string | null;
+ userId?: string | null;
+ };
Update: {
- contactId?: string
- id?: string
- supplierId?: string
- supplierLocationId?: string | null
- userId?: string | null
- }
+ contactId?: string;
+ id?: string;
+ supplierId?: string;
+ supplierLocationId?: string | null;
+ userId?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "supplierContact_contactId_fkey"
- columns: ["contactId"]
- referencedRelation: "contact"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierContact_contactId_fkey";
+ columns: ["contactId"];
+ referencedRelation: "contact";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierContact_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierContact_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierContact_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierContact_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierContact_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierContact_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierContact_supplierLocationId_fkey"
- columns: ["supplierLocationId"]
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierContact_supplierLocationId_fkey";
+ columns: ["supplierLocationId"];
+ referencedRelation: "supplierLocation";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierContact_userId_fkey"
- columns: ["userId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierContact_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierContact_userId_fkey"
- columns: ["userId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "supplierContact_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
supplierLedger: {
Row: {
- amount: number
- createdAt: string
- documentId: string | null
+ amount: number;
+ createdAt: string;
+ documentId: string | null;
documentType:
| Database["public"]["Enums"]["supplierLedgerDocumentType"]
- | null
- entryNumber: number
- externalDocumentId: string | null
- id: string
- postingDate: string
- supplierId: string
- }
+ | null;
+ entryNumber: number;
+ externalDocumentId: string | null;
+ id: string;
+ postingDate: string;
+ supplierId: string;
+ };
Insert: {
- amount: number
- createdAt?: string
- documentId?: string | null
+ amount: number;
+ createdAt?: string;
+ documentId?: string | null;
documentType?:
| Database["public"]["Enums"]["supplierLedgerDocumentType"]
- | null
- entryNumber?: number
- externalDocumentId?: string | null
- id?: string
- postingDate?: string
- supplierId: string
- }
+ | null;
+ entryNumber?: number;
+ externalDocumentId?: string | null;
+ id?: string;
+ postingDate?: string;
+ supplierId: string;
+ };
Update: {
- amount?: number
- createdAt?: string
- documentId?: string | null
+ amount?: number;
+ createdAt?: string;
+ documentId?: string | null;
documentType?:
| Database["public"]["Enums"]["supplierLedgerDocumentType"]
- | null
- entryNumber?: number
- externalDocumentId?: string | null
- id?: string
- postingDate?: string
- supplierId?: string
- }
+ | null;
+ entryNumber?: number;
+ externalDocumentId?: string | null;
+ id?: string;
+ postingDate?: string;
+ supplierId?: string;
+ };
Relationships: [
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierLedger_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierLedger_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierLedger_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierLedger_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierLedger_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierLedger_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
supplierLocation: {
Row: {
- addressId: string
- id: string
- supplierId: string
- }
+ addressId: string;
+ id: string;
+ supplierId: string;
+ };
Insert: {
- addressId: string
- id?: string
- supplierId: string
- }
+ addressId: string;
+ id?: string;
+ supplierId: string;
+ };
Update: {
- addressId?: string
- id?: string
- supplierId?: string
- }
+ addressId?: string;
+ id?: string;
+ supplierId?: string;
+ };
Relationships: [
{
- foreignKeyName: "supplierLocation_addressId_fkey"
- columns: ["addressId"]
- referencedRelation: "address"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierLocation_addressId_fkey";
+ columns: ["addressId"];
+ referencedRelation: "address";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierLocation_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierLocation_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierLocation_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierLocation_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierLocation_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierLocation_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
supplierPayment: {
Row: {
- currencyCode: string | null
- invoiceSupplierContactId: string | null
- invoiceSupplierId: string | null
- invoiceSupplierLocationId: string | null
- paymentTermId: string | null
- supplierId: string
- updatedAt: string | null
- updatedBy: string | null
- }
+ currencyCode: string | null;
+ invoiceSupplierContactId: string | null;
+ invoiceSupplierId: string | null;
+ invoiceSupplierLocationId: string | null;
+ paymentTermId: string | null;
+ supplierId: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- currencyCode?: string | null
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentTermId?: string | null
- supplierId: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ currencyCode?: string | null;
+ invoiceSupplierContactId?: string | null;
+ invoiceSupplierId?: string | null;
+ invoiceSupplierLocationId?: string | null;
+ paymentTermId?: string | null;
+ supplierId: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- currencyCode?: string | null
- invoiceSupplierContactId?: string | null
- invoiceSupplierId?: string | null
- invoiceSupplierLocationId?: string | null
- paymentTermId?: string | null
- supplierId?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ currencyCode?: string | null;
+ invoiceSupplierContactId?: string | null;
+ invoiceSupplierId?: string | null;
+ invoiceSupplierLocationId?: string | null;
+ paymentTermId?: string | null;
+ supplierId?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "supplierPayment_invoiceSupplierContactId_fkey"
- columns: ["invoiceSupplierContactId"]
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierPayment_invoiceSupplierContactId_fkey";
+ columns: ["invoiceSupplierContactId"];
+ referencedRelation: "supplierContact";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierPayment_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierPayment_invoiceSupplierLocationId_fkey"
- columns: ["invoiceSupplierLocationId"]
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierPayment_invoiceSupplierLocationId_fkey";
+ columns: ["invoiceSupplierLocationId"];
+ referencedRelation: "supplierLocation";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierPayment_paymentTermId_fkey"
- columns: ["paymentTermId"]
- referencedRelation: "paymentTerm"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierPayment_paymentTermId_fkey";
+ columns: ["paymentTermId"];
+ referencedRelation: "paymentTerm";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierPayment_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierPayment_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierPayment_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierPayment_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierPayment_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierPayment_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierPayment_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierPayment_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierPayment_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "supplierPayment_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
supplierShipping: {
Row: {
- shippingMethodId: string | null
- shippingSupplierContactId: string | null
- shippingSupplierId: string | null
- shippingSupplierLocationId: string | null
- shippingTermId: string | null
- supplierId: string
- updatedAt: string | null
- updatedBy: 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: {
- shippingMethodId?: string | null
- shippingSupplierContactId?: string | null
- shippingSupplierId?: string | null
- shippingSupplierLocationId?: string | null
- shippingTermId?: string | null
- supplierId: string
- updatedAt?: string | null
- updatedBy?: 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: {
- shippingMethodId?: string | null
- shippingSupplierContactId?: string | null
- shippingSupplierId?: string | null
- shippingSupplierLocationId?: string | null
- shippingTermId?: string | null
- supplierId?: string
- updatedAt?: string | null
- updatedBy?: 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: "supplierShipping_shippingMethodId_fkey"
- columns: ["shippingMethodId"]
- referencedRelation: "shippingMethod"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierShipping_shippingMethodId_fkey";
+ columns: ["shippingMethodId"];
+ referencedRelation: "shippingMethod";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierShipping_shippingSupplierContactId_fkey"
- columns: ["shippingSupplierContactId"]
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierShipping_shippingSupplierContactId_fkey";
+ columns: ["shippingSupplierContactId"];
+ referencedRelation: "supplierContact";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey";
+ columns: ["shippingSupplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey";
+ columns: ["shippingSupplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey";
+ columns: ["shippingSupplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey";
+ columns: ["shippingSupplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierShipping_shippingSupplierId_fkey"
- columns: ["shippingSupplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierShipping_shippingSupplierId_fkey";
+ columns: ["shippingSupplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierShipping_shippingSupplierLocationId_fkey"
- columns: ["shippingSupplierLocationId"]
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierShipping_shippingSupplierLocationId_fkey";
+ columns: ["shippingSupplierLocationId"];
+ referencedRelation: "supplierLocation";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierShipping_shippingTermId_fkey"
- columns: ["shippingTermId"]
- referencedRelation: "shippingTerm"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierShipping_shippingTermId_fkey";
+ columns: ["shippingTermId"];
+ referencedRelation: "shippingTerm";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierShipping_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierShipping_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "supplierShipping_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierShipping_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierShipping_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierShipping_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierShipping_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierShipping_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierShipping_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "supplierShipping_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
supplierStatus: {
Row: {
- createdAt: string
- id: string
- name: string
- updatedAt: string | null
- }
+ createdAt: string;
+ id: string;
+ name: string;
+ updatedAt: string | null;
+ };
Insert: {
- createdAt?: string
- id?: string
- name: string
- updatedAt?: string | null
- }
+ createdAt?: string;
+ id?: string;
+ name: string;
+ updatedAt?: string | null;
+ };
Update: {
- createdAt?: string
- id?: string
- name?: string
- updatedAt?: string | null
- }
- Relationships: []
- }
+ createdAt?: string;
+ id?: string;
+ name?: string;
+ updatedAt?: string | null;
+ };
+ Relationships: [];
+ };
supplierType: {
Row: {
- color: string | null
- createdAt: string
- createdBy: string
- id: string
- name: string
- protected: boolean
- updatedAt: string | null
- updatedBy: string | null
- }
+ color: string | null;
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ name: string;
+ protected: boolean;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- color?: string | null
- createdAt?: string
- createdBy: string
- id?: string
- name: string
- protected?: boolean
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ color?: string | null;
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ name: string;
+ protected?: boolean;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- color?: string | null
- createdAt?: string
- createdBy?: string
- id?: string
- name?: string
- protected?: boolean
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ color?: string | null;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ name?: string;
+ protected?: boolean;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "supplierType_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierType_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierType_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "supplierType_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "supplierType_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "supplierType_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplierType_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "supplierType_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
unitOfMeasure: {
Row: {
- active: boolean
- code: string
- createdAt: string
- createdBy: string
- id: string
- name: string
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ code: string;
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ name: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- code: string
- createdAt?: string
- createdBy: string
- id?: string
- name: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ code: string;
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ name: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- code?: string
- createdAt?: string
- createdBy?: string
- id?: string
- name?: string
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ code?: string;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ name?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "unitOfMeasure_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "unitOfMeasure_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "unitOfMeasure_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "unitOfMeasure_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "unitOfMeasure_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "unitOfMeasure_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "unitOfMeasure_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "unitOfMeasure_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
user: {
Row: {
- about: string
- active: boolean | null
- avatarUrl: string | null
- createdAt: string
- email: string
- emailVerified: string | null
- firstName: string
- fullName: string | null
- id: string
- lastName: string
- updatedAt: string | null
- }
+ about: string;
+ active: boolean | null;
+ avatarUrl: string | null;
+ createdAt: string;
+ email: string;
+ emailVerified: string | null;
+ firstName: string;
+ fullName: string | null;
+ id: string;
+ lastName: string;
+ updatedAt: string | null;
+ };
Insert: {
- about?: string
- active?: boolean | null
- avatarUrl?: string | null
- createdAt?: string
- email: string
- emailVerified?: string | null
- firstName: string
- fullName?: string | null
- id: string
- lastName: string
- updatedAt?: string | null
- }
+ about?: string;
+ active?: boolean | null;
+ avatarUrl?: string | null;
+ createdAt?: string;
+ email: string;
+ emailVerified?: string | null;
+ firstName: string;
+ fullName?: string | null;
+ id: string;
+ lastName: string;
+ updatedAt?: string | null;
+ };
Update: {
- about?: string
- active?: boolean | null
- avatarUrl?: string | null
- createdAt?: string
- email?: string
- emailVerified?: string | null
- firstName?: string
- fullName?: string | null
- id?: string
- lastName?: string
- updatedAt?: string | null
- }
- Relationships: []
- }
+ about?: string;
+ active?: boolean | null;
+ avatarUrl?: string | null;
+ createdAt?: string;
+ email?: string;
+ emailVerified?: string | null;
+ firstName?: string;
+ fullName?: string | null;
+ id?: string;
+ lastName?: string;
+ updatedAt?: string | null;
+ };
+ Relationships: [];
+ };
userAttribute: {
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
- }
+ 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;
+ };
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
- }
+ 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;
+ };
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
- }
+ 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;
+ };
Relationships: [
{
- foreignKeyName: "userAttribute_attributeDataTypeId_fkey"
- columns: ["attributeDataTypeId"]
- referencedRelation: "attributeDataType"
- referencedColumns: ["id"]
+ foreignKeyName: "userAttribute_attributeDataTypeId_fkey";
+ columns: ["attributeDataTypeId"];
+ referencedRelation: "attributeDataType";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "userAttribute_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "userAttribute_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "userAttribute_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "userAttribute_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "userAttribute_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "userAttribute_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "userAttribute_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "userAttribute_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "userAttribute_userAttributeCategoryId_fkey"
- columns: ["userAttributeCategoryId"]
- referencedRelation: "userAttributeCategory"
- referencedColumns: ["id"]
+ foreignKeyName: "userAttribute_userAttributeCategoryId_fkey";
+ columns: ["userAttributeCategoryId"];
+ referencedRelation: "userAttributeCategory";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
userAttributeCategory: {
Row: {
- active: boolean | null
- createdAt: string
- createdBy: string
- id: string
- name: string
- protected: boolean | null
- public: boolean | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean | 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
- createdAt?: string
- createdBy: string
- id?: string
- name: string
- protected?: boolean | null
- public?: boolean | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean | 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
- createdAt?: string
- createdBy?: string
- id?: string
- name?: string
- protected?: boolean | null
- public?: boolean | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean | null;
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ name?: string;
+ protected?: boolean | null;
+ public?: boolean | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "userAttributeCategory_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "userAttributeCategory_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "userAttributeCategory_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "userAttributeCategory_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "userAttributeCategory_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "userAttributeCategory_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "userAttributeCategory_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "userAttributeCategory_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
userAttributeValue: {
Row: {
- createdAt: string
- createdBy: string
- id: string
- 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
- }
+ createdAt: string;
+ createdBy: string;
+ id: string;
+ 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: {
- createdAt?: string
- createdBy: string
- id?: string
- 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
- }
+ createdAt?: string;
+ createdBy: string;
+ id?: string;
+ 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: {
- createdAt?: string
- createdBy?: string
- id?: string
- 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
- }
+ createdAt?: string;
+ createdBy?: string;
+ id?: string;
+ 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"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "userAttributeValue_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "userAttributeValue_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "userAttributeValue_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "userAttributeValue_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "userAttributeValue_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "userAttributeValue_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "userAttributeValue_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "userAttributeValue_userAttributeId_fkey"
- columns: ["userAttributeId"]
- referencedRelation: "userAttribute"
- referencedColumns: ["id"]
+ foreignKeyName: "userAttributeValue_userAttributeId_fkey";
+ columns: ["userAttributeId"];
+ referencedRelation: "userAttribute";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "userAttributeValue_userId_fkey"
- columns: ["userId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "userAttributeValue_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "userAttributeValue_userId_fkey"
- columns: ["userId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "userAttributeValue_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "userAttributeValue_valueUser_fkey"
- columns: ["valueUser"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "userAttributeValue_valueUser_fkey";
+ columns: ["valueUser"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "userAttributeValue_valueUser_fkey"
- columns: ["valueUser"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "userAttributeValue_valueUser_fkey";
+ columns: ["valueUser"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
warehouse: {
Row: {
- active: boolean
- 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
- }
+ active: boolean;
+ 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;
+ };
Insert: {
- active?: boolean
- 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
- }
+ active?: boolean;
+ 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;
+ };
Update: {
- active?: boolean
- 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
- }
+ active?: boolean;
+ 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;
+ };
Relationships: [
{
- foreignKeyName: "warehouse_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "warehouse_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "warehouse_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "warehouse_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "warehouse_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "warehouse_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "warehouse_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "warehouse_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "warehouse_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "warehouse_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "warehouse_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "warehouse_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "warehouse_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "warehouse_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
workCell: {
Row: {
- active: boolean
- activeDate: string | null
- createdAt: string
- createdBy: string
- defaultStandardFactor: Database["public"]["Enums"]["factor"]
- departmentId: string
- description: string | null
- id: string
- locationId: string | null
- name: string
- updatedAt: string | null
- updatedBy: string | null
- workCellTypeId: string
- }
+ active: boolean;
+ activeDate: string | null;
+ createdAt: string;
+ createdBy: string;
+ defaultStandardFactor: Database["public"]["Enums"]["factor"];
+ departmentId: string;
+ description: string | null;
+ id: string;
+ locationId: string | null;
+ name: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ workCellTypeId: string;
+ };
Insert: {
- active?: boolean
- activeDate?: string | null
- createdAt?: string
- createdBy: string
- defaultStandardFactor?: Database["public"]["Enums"]["factor"]
- departmentId: string
- description?: string | null
- id?: string
- locationId?: string | null
- name: string
- updatedAt?: string | null
- updatedBy?: string | null
- workCellTypeId: string
- }
+ active?: boolean;
+ activeDate?: string | null;
+ createdAt?: string;
+ createdBy: string;
+ defaultStandardFactor?: Database["public"]["Enums"]["factor"];
+ departmentId: string;
+ description?: string | null;
+ id?: string;
+ locationId?: string | null;
+ name: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ workCellTypeId: string;
+ };
Update: {
- active?: boolean
- activeDate?: string | null
- createdAt?: string
- createdBy?: string
- defaultStandardFactor?: Database["public"]["Enums"]["factor"]
- departmentId?: string
- description?: string | null
- id?: string
- locationId?: string | null
- name?: string
- updatedAt?: string | null
- updatedBy?: string | null
- workCellTypeId?: string
- }
+ active?: boolean;
+ activeDate?: string | null;
+ createdAt?: string;
+ createdBy?: string;
+ defaultStandardFactor?: Database["public"]["Enums"]["factor"];
+ departmentId?: string;
+ description?: string | null;
+ id?: string;
+ locationId?: string | null;
+ name?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ workCellTypeId?: string;
+ };
Relationships: [
{
- foreignKeyName: "workCell_departmentId_fkey"
- columns: ["departmentId"]
- referencedRelation: "department"
- referencedColumns: ["id"]
+ foreignKeyName: "workCell_departmentId_fkey";
+ columns: ["departmentId"];
+ referencedRelation: "department";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "workCell_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "workCell_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "workCell_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "workCell_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "workCell_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "workCell_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "workCell_workCellTypeId_fkey"
- columns: ["workCellTypeId"]
- referencedRelation: "workCellType"
- referencedColumns: ["id"]
+ foreignKeyName: "workCell_workCellTypeId_fkey";
+ columns: ["workCellTypeId"];
+ referencedRelation: "workCellType";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
workCellType: {
Row: {
- active: boolean
- color: string
- createdAt: string
- createdBy: string
- description: string | null
- id: string
- name: string
- requiredAbility: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ active: boolean;
+ color: string;
+ createdAt: string;
+ createdBy: string;
+ description: string | null;
+ id: string;
+ name: string;
+ requiredAbility: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ };
Insert: {
- active?: boolean
- color?: string
- createdAt?: string
- createdBy: string
- description?: string | null
- id?: string
- name: string
- requiredAbility?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ color?: string;
+ createdAt?: string;
+ createdBy: string;
+ description?: string | null;
+ id?: string;
+ name: string;
+ requiredAbility?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Update: {
- active?: boolean
- color?: string
- createdAt?: string
- createdBy?: string
- description?: string | null
- id?: string
- name?: string
- requiredAbility?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ active?: boolean;
+ color?: string;
+ createdAt?: string;
+ createdBy?: string;
+ description?: string | null;
+ id?: string;
+ name?: string;
+ requiredAbility?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "workCellType_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "workCellType_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "workCellType_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "workCellType_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "workCellType_requiredAbility_fkey"
- columns: ["requiredAbility"]
- referencedRelation: "ability"
- referencedColumns: ["id"]
+ foreignKeyName: "workCellType_requiredAbility_fkey";
+ columns: ["requiredAbility"];
+ referencedRelation: "ability";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "workCellType_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "workCellType_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "workCellType_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "workCellType_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
- }
+ ];
+ };
+ };
Views: {
accountCategories: {
Row: {
- category: string | null
- class: Database["public"]["Enums"]["glAccountClass"] | null
- createdAt: string | null
- createdBy: string | null
- id: string | null
- incomeBalance: Database["public"]["Enums"]["glIncomeBalance"] | null
- subCategoriesCount: number | null
- updatedAt: string | null
- updatedBy: string | null
- }
+ category: string | null;
+ class: Database["public"]["Enums"]["glAccountClass"] | null;
+ createdAt: string | null;
+ createdBy: string | 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
- createdAt?: string | null
- createdBy?: string | null
- id?: string | null
- incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
- subCategoriesCount?: never
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ category?: string | null;
+ class?: Database["public"]["Enums"]["glAccountClass"] | null;
+ createdAt?: string | null;
+ createdBy?: string | 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
- createdAt?: string | null
- createdBy?: string | null
- id?: string | null
- incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null
- subCategoriesCount?: never
- updatedAt?: string | null
- updatedBy?: string | null
- }
+ category?: string | null;
+ class?: Database["public"]["Enums"]["glAccountClass"] | null;
+ createdAt?: string | null;
+ createdBy?: string | null;
+ id?: string | null;
+ incomeBalance?: Database["public"]["Enums"]["glIncomeBalance"] | null;
+ subCategoriesCount?: never;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "accountCategory_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "accountCategory_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "accountCategory_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "accountCategory_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "accountCategory_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "accountCategory_updatedBy_fkey";
+ columns: ["updatedBy"];
+ 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
+ accountCategory: string | null;
+ accountCategoryId: string | null;
+ accountSubCategory: string | null;
+ accountSubcategoryId: string | null;
+ active: boolean | null;
+ class: Database["public"]["Enums"]["glAccountClass"] | null;
consolidatedRate:
| Database["public"]["Enums"]["glConsolidatedRate"]
- | null
- createdAt: string | null
- createdBy: string | 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
- }
+ | null;
+ createdAt: string | null;
+ createdBy: string | 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
+ accountCategory?: never;
+ accountCategoryId?: string | null;
+ accountSubCategory?: never;
+ accountSubcategoryId?: string | null;
+ active?: boolean | null;
+ class?: Database["public"]["Enums"]["glAccountClass"] | null;
consolidatedRate?:
| Database["public"]["Enums"]["glConsolidatedRate"]
- | null
- createdAt?: string | null
- createdBy?: string | 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
- }
+ | null;
+ createdAt?: string | null;
+ createdBy?: string | 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
+ accountCategory?: never;
+ accountCategoryId?: string | null;
+ accountSubCategory?: never;
+ accountSubcategoryId?: string | null;
+ active?: boolean | null;
+ class?: Database["public"]["Enums"]["glAccountClass"] | null;
consolidatedRate?:
| Database["public"]["Enums"]["glConsolidatedRate"]
- | null
- createdAt?: string | null
- createdBy?: string | 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
- }
+ | null;
+ createdAt?: string | null;
+ createdBy?: string | 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"]
- referencedRelation: "accountCategory"
- referencedColumns: ["id"]
+ foreignKeyName: "account_accountCategoryId_fkey";
+ columns: ["accountCategoryId"];
+ referencedRelation: "accountCategory";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "account_accountCategoryId_fkey"
- columns: ["accountCategoryId"]
- referencedRelation: "accountCategories"
- referencedColumns: ["id"]
+ foreignKeyName: "account_accountCategoryId_fkey";
+ columns: ["accountCategoryId"];
+ referencedRelation: "accountCategories";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "account_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "account_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "account_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "account_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "account_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "account_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "account_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "account_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
contractors: {
Row: {
- abilityIds: string[] | null
- active: boolean | null
- email: string | null
- firstName: string | null
- hoursPerWeek: number | null
- lastName: string | null
- supplierContactId: string | null
- supplierId: string | null
- supplierName: string | null
- }
+ abilityIds: string[] | null;
+ active: boolean | null;
+ email: string | null;
+ firstName: string | null;
+ hoursPerWeek: number | null;
+ lastName: string | null;
+ supplierContactId: string | null;
+ supplierId: string | null;
+ supplierName: string | null;
+ };
Relationships: [
{
- foreignKeyName: "contractor_id_fkey"
- columns: ["supplierContactId"]
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
+ foreignKeyName: "contractor_id_fkey";
+ columns: ["supplierContactId"];
+ referencedRelation: "supplierContact";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
customers: {
Row: {
- customerStatusId: string | null
- customerTypeId: string | null
- id: string | null
- name: string | null
- status: string | null
- type: string | null
- }
+ customerStatusId: string | null;
+ customerTypeId: string | null;
+ id: string | null;
+ name: string | null;
+ status: string | null;
+ type: string | null;
+ };
Relationships: [
{
- foreignKeyName: "customer_customerStatusId_fkey"
- columns: ["customerStatusId"]
- referencedRelation: "customerStatus"
- referencedColumns: ["id"]
+ foreignKeyName: "customer_customerStatusId_fkey";
+ columns: ["customerStatusId"];
+ referencedRelation: "customerStatus";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "customer_customerTypeId_fkey"
- columns: ["customerTypeId"]
- referencedRelation: "customerType"
- referencedColumns: ["id"]
+ foreignKeyName: "customer_customerTypeId_fkey";
+ columns: ["customerTypeId"];
+ referencedRelation: "customerType";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
documentLabels: {
Row: {
- label: string | null
- userId: string | null
- }
+ label: string | null;
+ userId: string | null;
+ };
Relationships: [
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "documentLabels_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "documentLabels_userId_fkey"
- columns: ["userId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "documentLabels_userId_fkey";
+ columns: ["userId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
documents: {
Row: {
- active: boolean | null
- createdAt: string | null
- createdBy: string | null
- createdByAvatar: string | null
- createdByFullName: string | null
- description: 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
- type: string | null
- updatedAt: string | null
- updatedBy: string | null
- updatedByAvatar: string | null
- updatedByFullName: string | null
- writeGroups: string[] | null
- }
+ active: boolean | null;
+ createdAt: string | null;
+ createdBy: string | null;
+ createdByAvatar: string | null;
+ createdByFullName: string | null;
+ description: 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;
+ type: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ updatedByAvatar: string | null;
+ updatedByFullName: string | null;
+ writeGroups: string[] | null;
+ };
Relationships: [
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "document_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "document_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "document_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "document_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "document_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "document_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
groupMembers: {
Row: {
- 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
- }
+ 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: "membership_groupId_fkey"
- columns: ["groupId"]
- referencedRelation: "group"
- referencedColumns: ["id"]
+ foreignKeyName: "membership_groupId_fkey";
+ columns: ["groupId"];
+ referencedRelation: "group";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "membership_memberGroupId_fkey"
- columns: ["memberGroupId"]
- referencedRelation: "group"
- referencedColumns: ["id"]
+ foreignKeyName: "membership_memberGroupId_fkey";
+ columns: ["memberGroupId"];
+ referencedRelation: "group";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "membership_memberUserId_fkey";
+ columns: ["memberUserId"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "membership_memberUserId_fkey"
- columns: ["memberUserId"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "membership_memberUserId_fkey";
+ columns: ["memberUserId"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
groups: {
Row: {
- 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: []
- }
+ 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: {
- 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: []
- }
+ 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: {
- year: number | null
- }
- Relationships: []
- }
+ year: number | null;
+ };
+ Relationships: [];
+ };
partners: {
Row: {
- abilityIds: string[] | null
- active: boolean | null
- city: string | null
- hoursPerWeek: number | null
- state: string | null
- supplierId: string | null
- supplierLocationId: string | null
- supplierName: string | null
- }
+ abilityIds: string[] | null;
+ active: boolean | null;
+ city: string | null;
+ hoursPerWeek: number | null;
+ state: string | null;
+ supplierId: string | null;
+ supplierLocationId: string | null;
+ supplierName: string | null;
+ };
Relationships: [
{
- foreignKeyName: "partner_id_fkey"
- columns: ["supplierLocationId"]
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
+ foreignKeyName: "partner_id_fkey";
+ columns: ["supplierLocationId"];
+ referencedRelation: "supplierLocation";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
partQuantities: {
Row: {
- locationId: string | null
- partId: string | null
- quantityAvailable: number | null
- quantityOnHand: number | null
- quantityOnProdOrder: number | null
- quantityOnPurchaseOrder: number | null
- quantityOnSalesOrder: number | null
- }
- Relationships: []
- }
+ locationId: string | null;
+ partId: string | null;
+ quantityAvailable: number | null;
+ quantityOnHand: number | null;
+ quantityOnProdOrder: number | null;
+ quantityOnPurchaseOrder: number | null;
+ quantityOnSalesOrder: number | null;
+ };
+ Relationships: [];
+ };
parts: {
Row: {
- active: boolean | null
- description: string | null
- id: string | null
- name: string | null
- partGroup: string | null
- partGroupId: string | null
- partType: Database["public"]["Enums"]["partType"] | null
+ active: boolean | null;
+ description: string | null;
+ id: string | null;
+ name: string | null;
+ partGroup: string | null;
+ partGroupId: string | null;
+ partType: Database["public"]["Enums"]["partType"] | null;
replenishmentSystem:
| Database["public"]["Enums"]["partReplenishmentSystem"]
- | null
- supplierIds: string[] | null
- }
+ | null;
+ supplierIds: string[] | null;
+ };
Relationships: [
{
- foreignKeyName: "part_partGroupId_fkey"
- columns: ["partGroupId"]
- referencedRelation: "partGroup"
- referencedColumns: ["id"]
+ foreignKeyName: "part_partGroupId_fkey";
+ columns: ["partGroupId"];
+ referencedRelation: "partGroup";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "part_partGroupId_fkey"
- columns: ["partGroupId"]
- referencedRelation: "services"
- referencedColumns: ["partGroupId"]
+ foreignKeyName: "part_partGroupId_fkey";
+ columns: ["partGroupId"];
+ referencedRelation: "services";
+ referencedColumns: ["partGroupId"];
}
- ]
- }
+ ];
+ };
purchaseInvoices: {
Row: {
- balance: number | null
- contactName: string | null
- createdAt: string | null
- createdBy: string | null
- createdByAvatar: string | null
- createdByFullName: string | null
- currencyCode: string | null
- dateDue: string | null
- dateIssued: string | null
- datePaid: string | null
- exchangeRate: number | null
- id: string | null
- invoiceId: string | null
- invoiceSupplierContactId: string | null
- invoiceSupplierId: string | null
- invoiceSupplierLocationId: string | null
- paymentTermId: string | null
- postingDate: string | null
- status: Database["public"]["Enums"]["purchaseInvoiceStatus"] | null
- subtotal: number | null
- supplierId: string | null
- supplierName: string | null
- supplierReference: string | null
- totalAmount: number | null
- totalDiscount: number | null
- totalTax: number | null
- updatedAt: string | null
- updatedBy: string | null
- updatedByAvatar: string | null
- updatedByFullName: string | null
- }
+ balance: number | null;
+ contactName: string | null;
+ createdAt: string | null;
+ createdBy: string | null;
+ createdByAvatar: string | null;
+ createdByFullName: string | null;
+ currencyCode: string | null;
+ dateDue: string | null;
+ dateIssued: string | null;
+ datePaid: string | null;
+ exchangeRate: number | null;
+ id: string | null;
+ invoiceId: string | null;
+ invoiceSupplierContactId: string | null;
+ invoiceSupplierId: string | null;
+ invoiceSupplierLocationId: string | null;
+ paymentTermId: string | null;
+ postingDate: string | null;
+ status: Database["public"]["Enums"]["purchaseInvoiceStatus"] | null;
+ subtotal: number | null;
+ supplierId: string | null;
+ supplierName: string | null;
+ supplierReference: string | null;
+ totalAmount: number | null;
+ totalDiscount: number | null;
+ totalTax: number | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ updatedByAvatar: string | null;
+ updatedByFullName: string | null;
+ };
Relationships: [
{
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseInvoice_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "purchaseInvoice_currencyCode_fkey"
- columns: ["currencyCode"]
- referencedRelation: "currency"
- referencedColumns: ["code"]
+ foreignKeyName: "purchaseInvoice_currencyCode_fkey";
+ columns: ["currencyCode"];
+ referencedRelation: "currency";
+ referencedColumns: ["code"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierContactId_fkey"
- columns: ["invoiceSupplierContactId"]
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierContactId_fkey";
+ columns: ["invoiceSupplierContactId"];
+ referencedRelation: "supplierContact";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey"
- columns: ["invoiceSupplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierId_fkey";
+ columns: ["invoiceSupplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_invoiceSupplierLocationId_fkey"
- columns: ["invoiceSupplierLocationId"]
- referencedRelation: "supplierLocation"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_invoiceSupplierLocationId_fkey";
+ columns: ["invoiceSupplierLocationId"];
+ referencedRelation: "supplierLocation";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_paymentTermId_fkey"
- columns: ["paymentTermId"]
- referencedRelation: "paymentTerm"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_paymentTermId_fkey";
+ columns: ["paymentTermId"];
+ referencedRelation: "paymentTerm";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseInvoice_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseInvoice_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseInvoice_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseInvoice_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
purchaseOrders: {
Row: {
- closedAt: string | null
- closedBy: string | null
- closedByAvatar: string | null
- closedByFullName: string | null
- createdAt: string | null
- createdBy: string | null
- createdByAvatar: string | null
- createdByFullName: string | null
- dropShipment: boolean | null
- favorite: boolean | null
- id: string | null
- lineCount: number | null
- locationId: string | null
- locationName: string | null
- notes: string | null
- orderDate: string | null
- purchaseOrderId: string | null
- receiptPromisedDate: string | null
- receiptRequestedDate: string | null
- status: Database["public"]["Enums"]["purchaseOrderStatus"] | null
- subtotal: number | null
- supplierContactId: string | null
- supplierId: string | null
- supplierName: string | null
- supplierReference: string | null
- type: Database["public"]["Enums"]["purchaseOrderType"] | null
- updatedAt: string | null
- updatedBy: string | null
- updatedByAvatar: string | null
- updatedByFullName: string | null
- }
+ closedAt: string | null;
+ closedBy: string | null;
+ closedByAvatar: string | null;
+ closedByFullName: string | null;
+ createdAt: string | null;
+ createdBy: string | null;
+ createdByAvatar: string | null;
+ createdByFullName: string | null;
+ dropShipment: boolean | null;
+ favorite: boolean | null;
+ id: string | null;
+ locationId: string | null;
+ locationName: string | null;
+ notes: string | null;
+ orderDate: string | null;
+ paymentTermName: string | null;
+ purchaseOrderId: string | null;
+ receiptPromisedDate: string | null;
+ receiptRequestedDate: string | null;
+ shippingMethodName: string | null;
+ shippingTermName: string | null;
+ status: Database["public"]["Enums"]["purchaseOrderStatus"] | null;
+ supplierContactId: string | null;
+ supplierId: string | null;
+ supplierName: string | null;
+ supplierReference: string | null;
+ type: Database["public"]["Enums"]["purchaseOrderType"] | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ updatedByAvatar: string | null;
+ updatedByFullName: string | null;
+ };
Relationships: [
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey";
+ columns: ["closedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_closedBy_fkey"
- columns: ["closedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseOrder_closedBy_fkey";
+ columns: ["closedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_createdBy_fkey"
- columns: ["createdBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseOrder_createdBy_fkey";
+ columns: ["createdBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
},
{
- foreignKeyName: "purchaseOrder_supplierContactId_fkey"
- columns: ["supplierContactId"]
- referencedRelation: "supplierContact"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_supplierContactId_fkey";
+ columns: ["supplierContactId"];
+ referencedRelation: "supplierContact";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseOrder_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "purchaseOrder_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "user"
- referencedColumns: ["id"]
+ foreignKeyName: "purchaseOrder_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "user";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "purchaseOrder_updatedBy_fkey"
- columns: ["updatedBy"]
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
+ foreignKeyName: "purchaseOrder_updatedBy_fkey";
+ columns: ["updatedBy"];
+ referencedRelation: "userDefaults";
+ referencedColumns: ["userId"];
}
- ]
- }
+ ];
+ };
purchaseOrderSuppliers: {
Row: {
- id: string | null
- name: string | null
- }
- Relationships: []
- }
+ id: string | null;
+ name: string | null;
+ };
+ Relationships: [];
+ };
receiptsPostedNotInvoiced: {
Row: {
- estimatedCost: number | null
- id: string | null
- postingDate: string | null
- receiptId: string | null
+ estimatedCost: number | null;
+ id: string | null;
+ postingDate: string | null;
+ receiptId: string | null;
sourceDocument:
| Database["public"]["Enums"]["receiptSourceDocument"]
- | null
- sourceDocumentId: string | null
- sourceDocumentReadableId: string | null
- supplierId: string | null
- supplierName: string | null
- }
+ | null;
+ sourceDocumentId: string | null;
+ sourceDocumentReadableId: string | null;
+ supplierId: string | null;
+ supplierName: string | null;
+ };
Relationships: [
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "supplier"
- referencedColumns: ["id"]
+ foreignKeyName: "receipt_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "supplier";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "contractors"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "receipt_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "contractors";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "partners"
- referencedColumns: ["supplierId"]
+ foreignKeyName: "receipt_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "partners";
+ referencedColumns: ["supplierId"];
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "purchaseOrderSuppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "receipt_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "purchaseOrderSuppliers";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "receipt_supplierId_fkey"
- columns: ["supplierId"]
- referencedRelation: "suppliers"
- referencedColumns: ["id"]
+ foreignKeyName: "receipt_supplierId_fkey";
+ columns: ["supplierId"];
+ referencedRelation: "suppliers";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
services: {
Row: {
- active: boolean | null
- blocked: boolean | null
- description: string | null
- id: string | null
- name: string | null
- partGroup: string | null
- partGroupId: string | null
- serviceType: Database["public"]["Enums"]["serviceType"] | null
- supplierIds: string[] | null
- }
- Relationships: []
- }
+ active: boolean | null;
+ blocked: boolean | null;
+ description: string | null;
+ id: string | null;
+ name: string | null;
+ partGroup: string | null;
+ partGroupId: string | null;
+ serviceType: Database["public"]["Enums"]["serviceType"] | null;
+ supplierIds: string[] | null;
+ };
+ Relationships: [];
+ };
suppliers: {
Row: {
- id: string | null
- name: string | null
- orderCount: number | null
- partCount: number | null
- status: string | null
- supplierStatusId: string | null
- supplierTypeId: string | null
- type: string | null
- }
+ id: string | null;
+ name: string | null;
+ orderCount: number | null;
+ partCount: number | null;
+ status: string | null;
+ supplierStatusId: string | null;
+ supplierTypeId: string | null;
+ type: string | null;
+ };
Relationships: [
{
- foreignKeyName: "supplier_supplierStatusId_fkey"
- columns: ["supplierStatusId"]
- referencedRelation: "supplierStatus"
- referencedColumns: ["id"]
+ foreignKeyName: "supplier_supplierStatusId_fkey";
+ columns: ["supplierStatusId"];
+ referencedRelation: "supplierStatus";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "supplier_supplierTypeId_fkey"
- columns: ["supplierTypeId"]
- referencedRelation: "supplierType"
- referencedColumns: ["id"]
+ foreignKeyName: "supplier_supplierTypeId_fkey";
+ columns: ["supplierTypeId"];
+ referencedRelation: "supplierType";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
totalReceiptsPostedNotInvoiced: {
Row: {
- total: number | null
- }
- Relationships: []
- }
+ total: number | null;
+ };
+ Relationships: [];
+ };
userDefaults: {
Row: {
- locationId: string | null
- userId: string | null
- }
+ locationId: string | null;
+ userId: string | null;
+ };
Relationships: [
{
- foreignKeyName: "employeeJob_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "location"
- referencedColumns: ["id"]
+ foreignKeyName: "employeeJob_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "location";
+ referencedColumns: ["id"];
},
{
- foreignKeyName: "employeeJob_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "partQuantities"
- referencedColumns: ["locationId"]
+ foreignKeyName: "employeeJob_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "partQuantities";
+ referencedColumns: ["locationId"];
},
{
- foreignKeyName: "employeeJob_locationId_fkey"
- columns: ["locationId"]
- referencedRelation: "purchaseOrders"
- referencedColumns: ["locationId"]
+ foreignKeyName: "employeeJob_locationId_fkey";
+ columns: ["locationId"];
+ referencedRelation: "purchaseOrders";
+ referencedColumns: ["locationId"];
}
- ]
- }
- }
+ ];
+ };
+ };
Functions: {
_xid_machine_id: {
- Args: Record<PropertyKey, never>
- Returns: number
- }
+ Args: Record<PropertyKey, never>;
+ Returns: number;
+ };
delete_claim: {
Args: {
- uid: string
- claim: string
- }
- Returns: string
- }
+ uid: string;
+ claim: string;
+ };
+ Returns: string;
+ };
get_claim: {
Args: {
- uid: string
- claim: string
- }
- Returns: Json
- }
+ uid: string;
+ claim: string;
+ };
+ Returns: Json;
+ };
get_claims: {
Args: {
- uid: string
- }
- Returns: Json
- }
+ uid: string;
+ };
+ Returns: Json;
+ };
get_my_claim: {
Args: {
- claim: string
- }
- Returns: Json
- }
+ claim: string;
+ };
+ Returns: Json;
+ };
get_my_claims: {
- Args: Record<PropertyKey, never>
- Returns: Json
- }
+ Args: Record<PropertyKey, never>;
+ Returns: Json;
+ };
groups_for_user: {
Args: {
- uid: string
- }
- Returns: unknown
- }
+ uid: string;
+ };
+ Returns: unknown;
+ };
groups_query: {
Args: {
- _name?: string
- _uid?: string
- }
+ _name?: string;
+ _uid?: string;
+ };
Returns: {
- id: string
- name: string
- parentId: string
- isEmployeeTypeGroup: boolean
- isCustomerOrgGroup: boolean
- isCustomerTypeGroup: boolean
- isSupplierOrgGroup: boolean
- isSupplierTypeGroup: boolean
- users: Json
- }[]
- }
+ id: string;
+ name: string;
+ parentId: string;
+ isEmployeeTypeGroup: boolean;
+ isCustomerOrgGroup: boolean;
+ isCustomerTypeGroup: boolean;
+ isSupplierOrgGroup: boolean;
+ isSupplierTypeGroup: boolean;
+ users: Json;
+ }[];
+ };
is_claims_admin: {
- Args: Record<PropertyKey, never>
- Returns: boolean
- }
+ Args: Record<PropertyKey, never>;
+ Returns: boolean;
+ };
journalLinesByAccountNumber: {
Args: {
- from_date?: string
- to_date?: string
- }
+ from_date?: string;
+ to_date?: string;
+ };
Returns: {
- number: string
- balance: number
- balanceAtDate: number
- netChange: number
- }[]
- }
+ number: string;
+ balance: number;
+ balanceAtDate: number;
+ netChange: number;
+ }[];
+ };
set_claim: {
Args: {
- uid: string
- claim: string
- value: Json
- }
- Returns: string
- }
+ uid: string;
+ claim: string;
+ value: Json;
+ };
+ Returns: string;
+ };
users_for_groups: {
Args: {
- groups: string[]
- }
- Returns: Json
- }
+ groups: string[];
+ };
+ Returns: Json;
+ };
xid: {
Args: {
- _at?: string
- }
- Returns: unknown
- }
+ _at?: string;
+ };
+ Returns: unknown;
+ };
xid_counter: {
Args: {
- _xid: unknown
- }
- Returns: number
- }
+ _xid: unknown;
+ };
+ Returns: number;
+ };
xid_decode: {
Args: {
- _xid: unknown
- }
- Returns: unknown
- }
+ _xid: unknown;
+ };
+ Returns: unknown;
+ };
xid_encode: {
Args: {
- _id: number[]
- }
- Returns: unknown
- }
+ _id: number[];
+ };
+ Returns: unknown;
+ };
xid_machine: {
Args: {
- _xid: unknown
- }
- Returns: unknown
- }
+ _xid: unknown;
+ };
+ Returns: unknown;
+ };
xid_pid: {
Args: {
- _xid: unknown
- }
- Returns: number
- }
+ _xid: unknown;
+ };
+ Returns: number;
+ };
xid_time: {
Args: {
- _xid: unknown
- }
- Returns: string
- }
- }
+ _xid: unknown;
+ };
+ Returns: string;
+ };
+ };
Enums: {
- accountingPeriodStatus: "Inactive" | "Active"
+ accountingPeriodStatus: "Inactive" | "Active";
costLedgerType:
| "Direct Cost"
| "Revaluation"
| "Rounding"
| "Indirect Cost"
| "Variance"
- | "Total"
+ | "Total";
documentTransactionType:
| "Download"
| "Edit"
| "Favorite"
| "Label"
| "Unfavorite"
- | "Upload"
+ | "Upload";
factor:
| "Hours/Piece"
| "Hours/100 Pieces"
@@ -9105,7 +9157,7 @@ export interface Database {
| "Pieces/Minute"
| "Seconds/Piece"
| "Total Hours"
- | "Total Minutes"
+ | "Total Minutes";
glAccountCategory:
| "Bank"
| "Accounts Receivable"
@@ -9124,17 +9176,17 @@ export interface Database {
| "Cost of Goods Sold"
| "Expense"
| "Other Income"
- | "Other Expense"
- glAccountClass: "Asset" | "Liability" | "Equity" | "Revenue" | "Expense"
- glAccountType: "Posting" | "Heading" | "Begin Total" | "End Total"
- glConsolidatedRate: "Average" | "Current" | "Historical"
- glIncomeBalance: "Balance Sheet" | "Income Statement"
+ | "Other Expense";
+ glAccountClass: "Asset" | "Liability" | "Equity" | "Revenue" | "Expense";
+ glAccountType: "Posting" | "Heading" | "Begin Total" | "End Total";
+ glConsolidatedRate: "Average" | "Current" | "Historical";
+ glIncomeBalance: "Balance Sheet" | "Income Statement";
journalLineDocumentType:
| "Receipt"
| "Invoice"
| "Credit Memo"
| "Blanket Order"
- | "Return Order"
+ | "Return Order";
month:
| "January"
| "February"
@@ -9147,8 +9199,8 @@ export interface Database {
| "September"
| "October"
| "November"
- | "December"
- partCostingMethod: "Standard" | "Average" | "LIFO" | "FIFO"
+ | "December";
+ partCostingMethod: "Standard" | "Average" | "LIFO" | "FIFO";
partLedgerDocumentType:
| "Sales Shipment"
| "Sales Invoice"
@@ -9166,7 +9218,7 @@ export interface Database {
| "Posted Assembly"
| "Inventory Receipt"
| "Inventory Shipment"
- | "Direct Transfer"
+ | "Direct Transfer";
partLedgerType:
| "Purchase"
| "Sale"
@@ -9176,22 +9228,22 @@ export interface Database {
| "Consumption"
| "Output"
| "Assembly Consumption"
- | "Assembly Output"
- partManufacturingPolicy: "Make to Order" | "Make to Stock"
+ | "Assembly Output";
+ partManufacturingPolicy: "Make to Order" | "Make to Stock";
partReorderingPolicy:
| "Manual Reorder"
| "Demand-Based Reorder"
| "Fixed Reorder Quantity"
- | "Maximum Quantity"
- partReplenishmentSystem: "Buy" | "Make" | "Buy and Make"
- partType: "Inventory" | "Non-Inventory"
+ | "Maximum Quantity";
+ partReplenishmentSystem: "Buy" | "Make" | "Buy and Make";
+ partType: "Inventory" | "Non-Inventory";
payableLineType:
| "G/L Account"
| "Part"
| "Service"
| "Fixed Asset"
- | "Comment"
- paymentTermCalculationMethod: "Net" | "End of Month" | "Day of Month"
+ | "Comment";
+ paymentTermCalculationMethod: "Net" | "End of Month" | "Day of Month";
purchaseInvoiceStatus:
| "Draft"
| "Pending"
@@ -9201,13 +9253,13 @@ export interface Database {
| "Paid"
| "Partially Paid"
| "Overdue"
- | "Voided"
+ | "Voided";
purchaseOrderLineType:
| "Comment"
| "G/L Account"
| "Part"
| "Service"
- | "Fixed Asset"
+ | "Fixed Asset";
purchaseOrderStatus:
| "Draft"
| "To Review"
@@ -9216,15 +9268,15 @@ export interface Database {
| "To Receive and Invoice"
| "To Invoice"
| "Completed"
- | "Closed"
+ | "Closed";
purchaseOrderTransactionType:
| "Edit"
| "Favorite"
| "Unfavorite"
| "Approved"
| "Reject"
- | "Request Approval"
- purchaseOrderType: "Purchase" | "Return"
+ | "Request Approval";
+ purchaseOrderType: "Purchase" | "Return";
receiptSourceDocument:
| "Sales Order"
| "Sales Invoice"
@@ -9235,8 +9287,8 @@ export interface Database {
| "Inbound Transfer"
| "Outbound Transfer"
| "Manufacturing Consumption"
- | "Manufacturing Output"
- receiptStatus: "Draft" | "Pending" | "Posted"
+ | "Manufacturing Output";
+ receiptStatus: "Draft" | "Pending" | "Posted";
searchEntity:
| "Resource"
| "Person"
@@ -9246,199 +9298,198 @@ export interface Database {
| "Part"
| "Purchase Order"
| "Sales Order"
- | "Document"
- serviceType: "Internal" | "External"
- shippingCarrier: "UPS" | "FedEx" | "USPS" | "DHL" | "Other"
+ | "Document";
+ serviceType: "Internal" | "External";
+ shippingCarrier: "UPS" | "FedEx" | "USPS" | "DHL" | "Other";
supplierLedgerDocumentType:
| "Payment"
| "Invoice"
| "Credit Memo"
| "Finance Charge Memo"
| "Reminder"
- | "Refund"
- }
+ | "Refund";
+ };
CompositeTypes: {
- [_ in never]: never
- }
- }
+ [_ in never]: never;
+ };
+ };
storage: {
Tables: {
buckets: {
Row: {
- allowed_mime_types: string[] | null
- avif_autodetection: boolean | null
- created_at: string | null
- file_size_limit: number | null
- id: string
- name: string
- owner: string | null
- public: boolean | null
- updated_at: string | null
- }
+ allowed_mime_types: string[] | null;
+ avif_autodetection: boolean | null;
+ created_at: string | null;
+ file_size_limit: number | null;
+ id: string;
+ name: string;
+ owner: string | null;
+ public: boolean | null;
+ updated_at: string | null;
+ };
Insert: {
- allowed_mime_types?: string[] | null
- avif_autodetection?: boolean | null
- created_at?: string | null
- file_size_limit?: number | null
- id: string
- name: string
- owner?: string | null
- public?: boolean | null
- updated_at?: string | null
- }
+ allowed_mime_types?: string[] | null;
+ avif_autodetection?: boolean | null;
+ created_at?: string | null;
+ file_size_limit?: number | null;
+ id: string;
+ name: string;
+ owner?: string | null;
+ public?: boolean | null;
+ updated_at?: string | null;
+ };
Update: {
- allowed_mime_types?: string[] | null
- avif_autodetection?: boolean | null
- created_at?: string | null
- file_size_limit?: number | null
- id?: string
- name?: string
- owner?: string | null
- public?: boolean | null
- updated_at?: string | null
- }
+ allowed_mime_types?: string[] | null;
+ avif_autodetection?: boolean | null;
+ created_at?: string | null;
+ file_size_limit?: number | null;
+ id?: string;
+ name?: string;
+ owner?: string | null;
+ public?: boolean | null;
+ updated_at?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "buckets_owner_fkey"
- columns: ["owner"]
- referencedRelation: "users"
- referencedColumns: ["id"]
+ foreignKeyName: "buckets_owner_fkey";
+ columns: ["owner"];
+ referencedRelation: "users";
+ referencedColumns: ["id"];
}
- ]
- }
+ ];
+ };
migrations: {
Row: {
- executed_at: string | null
- hash: string
- id: number
- name: string
- }
+ executed_at: string | null;
+ hash: string;
+ id: number;
+ name: string;
+ };
Insert: {
- executed_at?: string | null
- hash: string
- id: number
- name: string
- }
+ executed_at?: string | null;
+ hash: string;
+ id: number;
+ name: string;
+ };
Update: {
- executed_at?: string | null
- hash?: string
- id?: number
- name?: string
- }
- Relationships: []
- }
+ executed_at?: string | null;
+ hash?: string;
+ id?: number;
+ name?: string;
+ };
+ Relationships: [];
+ };
objects: {
Row: {
- bucket_id: string | null
- created_at: string | null
- id: string
- last_accessed_at: string | null
- metadata: Json | null
- name: string | null
- owner: string | null
- path_tokens: string[] | null
- updated_at: string | null
- version: string | null
- }
+ bucket_id: string | null;
+ created_at: string | null;
+ id: string;
+ last_accessed_at: string | null;
+ metadata: Json | null;
+ name: string | null;
+ owner: string | null;
+ path_tokens: string[] | null;
+ updated_at: string | null;
+ version: string | null;
+ };
Insert: {
- bucket_id?: string | null
- created_at?: string | null
- id?: string
- last_accessed_at?: string | null
- metadata?: Json | null
- name?: string | null
- owner?: string | null
- path_tokens?: string[] | null
- updated_at?: string | null
- version?: string | null
- }
+ bucket_id?: string | null;
+ created_at?: string | null;
+ id?: string;
+ last_accessed_at?: string | null;
+ metadata?: Json | null;
+ name?: string | null;
+ owner?: string | null;
+ path_tokens?: string[] | null;
+ updated_at?: string | null;
+ version?: string | null;
+ };
Update: {
- bucket_id?: string | null
- created_at?: string | null
- id?: string
- last_accessed_at?: string | null
- metadata?: Json | null
- name?: string | null
- owner?: string | null
- path_tokens?: string[] | null
- updated_at?: string | null
- version?: string | null
- }
+ bucket_id?: string | null;
+ created_at?: string | null;
+ id?: string;
+ last_accessed_at?: string | null;
+ metadata?: Json | null;
+ name?: string | null;
+ owner?: string | null;
+ path_tokens?: string[] | null;
+ updated_at?: string | null;
+ version?: string | null;
+ };
Relationships: [
{
- foreignKeyName: "objects_bucketId_fkey"
- columns: ["bucket_id"]
- referencedRelation: "buckets"
- referencedColumns: ["id"]
+ foreignKeyName: "objects_bucketId_fkey";
+ columns: ["bucket_id"];
+ referencedRelation: "buckets";
+ referencedColumns: ["id"];
}
- ]
- }
- }
+ ];
+ };
+ };
Views: {
- [_ in never]: never
- }
+ [_ in never]: never;
+ };
Functions: {
can_insert_object: {
Args: {
- bucketid: string
- name: string
- owner: string
- metadata: Json
- }
- Returns: undefined
- }
+ bucketid: string;
+ name: string;
+ owner: string;
+ metadata: Json;
+ };
+ Returns: undefined;
+ };
extension: {
Args: {
- name: string
- }
- Returns: string
- }
+ name: string;
+ };
+ Returns: string;
+ };
filename: {
Args: {
- name: string
- }
- Returns: string
- }
+ name: string;
+ };
+ Returns: string;
+ };
foldername: {
Args: {
- name: string
- }
- Returns: unknown
- }
+ name: string;
+ };
+ Returns: unknown;
+ };
get_size_by_bucket: {
- Args: Record<PropertyKey, never>
+ Args: Record<PropertyKey, never>;
Returns: {
- size: number
- bucket_id: string
- }[]
- }
+ size: number;
+ bucket_id: string;
+ }[];
+ };
search: {
Args: {
- prefix: string
- bucketname: string
- limits?: number
- levels?: number
- offsets?: number
- search?: string
- sortcolumn?: string
- sortorder?: string
- }
+ prefix: string;
+ bucketname: string;
+ limits?: number;
+ levels?: number;
+ offsets?: number;
+ search?: string;
+ sortcolumn?: string;
+ sortorder?: string;
+ };
Returns: {
- name: string
- id: string
- updated_at: string
- created_at: string
- last_accessed_at: string
- metadata: Json
- }[]
- }
- }
+ name: string;
+ id: string;
+ updated_at: string;
+ created_at: string;
+ last_accessed_at: string;
+ metadata: Json;
+ }[];
+ };
+ };
Enums: {
- [_ in never]: never
- }
+ [_ in never]: never;
+ };
CompositeTypes: {
- [_ in never]: never
- }
- }
+ [_ in never]: never;
+ };
+ };
}
-
diff --git a/packages/database/supabase/migrations/20230510035345_purchasing.sql b/packages/database/supabase/migrations/20230510035345_purchasing.sql
index 887dc921f2..5b3a1fc116 100644
--- a/packages/database/supabase/migrations/20230510035345_purchasing.sql
+++ b/packages/database/supabase/migrations/20230510035345_purchasing.sql
@@ -395,11 +395,12 @@ CREATE POLICY "Users can delete their own purchase order favorites" ON "purchase
CREATE OR REPLACE VIEW "purchaseOrders" AS
SELECT
p.*,
+ sm."name" AS "shippingMethodName",
+ st."name" AS "shippingTermName",
+ pt."name" AS "paymentTermName",
pd."receiptRequestedDate",
pd."receiptPromisedDate",
pd."dropShipment",
- pol."lineCount",
- pol."subtotal",
l."id" AS "locationId",
l."name" AS "locationName",
s."name" AS "supplierName",
@@ -412,11 +413,10 @@ CREATE OR REPLACE VIEW "purchaseOrders" AS
EXISTS(SELECT 1 FROM "purchaseOrderFavorite" pf WHERE pf."purchaseOrderId" = p.id AND pf."userId" = auth.uid()::text) AS favorite
FROM "purchaseOrder" p
LEFT JOIN "purchaseOrderDelivery" pd ON pd."id" = p."id"
- LEFT JOIN (
- SELECT "purchaseOrderId", COUNT(*) AS "lineCount", SUM("unitPrice" * "purchaseQuantity") AS "subtotal"
- FROM "purchaseOrderLine"
- GROUP BY "purchaseOrderId"
- ) pol ON pol."purchaseOrderId" = p."id"
+ LEFT JOIN "shippingMethod" sm ON sm."id" = pd."shippingMethodId"
+ LEFT JOIN "shippingTerm" st ON st."id" = pd."shippingTermId"
+ LEFT JOIN "purchaseOrderPayment" pp ON pp."id" = p."id"
+ LEFT JOIN "paymentTerm" pt ON pt."id" = pp."paymentTermId"
LEFT JOIN "location" l ON l."id" = pd."locationId"
LEFT JOIN "supplier" s ON s."id" = p."supplierId"
LEFT JOIN "user" u ON u."id" = p."createdBy"
diff --git a/packages/database/supabase/migrations/20231219110852_company.sql b/packages/database/supabase/migrations/20231219110852_company.sql
new file mode 100644
index 0000000000..ad22b79339
--- /dev/null
+++ b/packages/database/supabase/migrations/20231219110852_company.sql
@@ -0,0 +1,38 @@
+CREATE TABLE "company" (
+ "id" BOOLEAN NOT NULL DEFAULT TRUE,
+ "name" TEXT NOT NULL,
+ "taxId" TEXT,
+ "logo" TEXT,
+ "addressLine1" TEXT,
+ "addressLine2" TEXT,
+ "city" TEXT,
+ "state" TEXT,
+ "postalCode" TEXT,
+ "countryCode" TEXT,
+ "phone" TEXT,
+ "fax" TEXT,
+ "email" TEXT,
+ "website" TEXT,
+ "updatedBy" TEXT,
+
+ CONSTRAINT "company_pkey" PRIMARY KEY ("id"),
+ -- this is a hack to make sure that this table only ever has one row
+ CONSTRAINT "accountDefault_id_check" CHECK ("id" = TRUE),
+ CONSTRAINT "accountDefault_id_unique" UNIQUE ("id"),
+ CONSTRAINT "accountDefault_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user"("id"),
+);
+
+ALTER TABLE "company" ENABLE ROW LEVEL SECURITY;
+
+CREATE POLICY "Authenticated users can view company" ON "company"
+ FOR SELECT
+ USING (
+ auth.role() = 'authenticated'
+ );
+
+CREATE POLICY "Employees with settings_update can update company" ON "company"
+ FOR UPDATE
+ USING (
+ coalesce(get_my_claim('settings_update')::boolean, false) = true
+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb
+ );
\ No newline at end of file
diff --git a/packages/documents/src/PurchaseOrderPDF/PurchaseOrderPDF.tsx b/packages/documents/src/PurchaseOrderPDF/PurchaseOrderPDF.tsx
index 6a76079157..5ff04505cf 100644
--- a/packages/documents/src/PurchaseOrderPDF/PurchaseOrderPDF.tsx
+++ b/packages/documents/src/PurchaseOrderPDF/PurchaseOrderPDF.tsx
@@ -6,11 +6,13 @@ import type { PDF } from "../types";
interface PurchaseOrderPDFProps extends PDF {
lines?: Database["public"]["Tables"]["purchaseOrderLine"]["Row"];
+ purchaseOrder: Database["public"]["Views"]["purchaseOrders"]["Row"];
}
const PurchaseOrderPDF = ({
company,
meta,
+ purchaseOrder,
title = "Purchase Order",
}: PurchaseOrderPDFProps) => {
const styles = StyleSheet.create({
@@ -99,6 +101,22 @@ const PurchaseOrderPDF = ({
color: "#7d7d7d",
textTransform: "uppercase",
},
+ tableCol1: {
+ width: "40%",
+ textAlign: "left",
+ },
+ tableCol2: {
+ width: "20%",
+ textAlign: "center",
+ },
+ tableCol3: {
+ width: "20%",
+ textAlign: "center",
+ },
+ tableCol4: {
+ width: "20%",
+ textAlign: "right",
+ },
});
return (
@@ -117,11 +135,11 @@ const PurchaseOrderPDF = ({
items={[
{
label: "Date",
- value: "12/3/2023",
+ value: purchaseOrder?.orderDate,
},
{
label: "PO #",
- value: "PO00000000001",
+ value: purchaseOrder?.purchaseOrderId,
},
]}
/>
@@ -142,54 +160,54 @@ const PurchaseOrderPDF = ({
<View style={styles.row}>
<View style={styles.colThird}>
<Text style={styles.label}>Supplier Order #</Text>
- <Text></Text>
+ <Text>{purchaseOrder?.supplierReference}</Text>
</View>
<View style={styles.colThird}>
<Text style={styles.label}>Requested Date</Text>
- <Text>1/15/2024</Text>
+ <Text>{purchaseOrder?.receiptRequestedDate}</Text>
</View>
<View style={styles.colThird}>
<Text style={styles.label}>Promised Date</Text>
- <Text></Text>
+ <Text>{purchaseOrder?.receiptPromisedDate}</Text>
</View>
</View>
<View style={styles.row}>
<View style={styles.colThird}>
<Text style={styles.label}>Shipping Method</Text>
- <Text></Text>
+ <Text>{purchaseOrder?.shippingMethodName}</Text>
</View>
<View style={styles.colThird}>
<Text style={styles.label}>Shipping Terms</Text>
- <Text></Text>
+ <Text>{purchaseOrder?.shippingTermName}</Text>
</View>
<View style={styles.colThird}>
<Text style={styles.label}>Payment Terms</Text>
- <Text>Net 30</Text>
+ <Text>{purchaseOrder?.paymentTermName}</Text>
</View>
</View>
<View style={styles.table}>
<View style={styles.thead}>
- <Text style={{ width: "40%" }}>Description</Text>
- <Text style={{ width: "20%", textAlign: "center" }}>Qty</Text>
- <Text style={{ width: "20%", textAlign: "center" }}>Price</Text>
- <Text style={{ width: "20%", textAlign: "right" }}>Total</Text>
+ <Text style={styles.tableCol1}>Description</Text>
+ <Text style={styles.tableCol2}>Qty</Text>
+ <Text style={styles.tableCol3}>Price</Text>
+ <Text style={styles.tableCol4}>Total</Text>
</View>
{/* {lines.map(({ id, description, details, rate, quantity, amount }) => (
<View style={styles.tr} key={id}>
- <View style={{textAlign: "left", width: "40%"}}>
+ <View style={styles.tableCol1}>
<Text style={{ marginBottom: "10" }}>{description}</Text>
<Text style={{ fontSize: "10", opacity: 0.8, width: "95%" }}>
{details}
</Text>
</View>
- <Text style={{ width: "20%", textAlign: "center" }}>
+ <Text style={styles.tableCol2}>
{quantity}
</Text>
- <Text style={{ width: "20%", textAlign: "center" }}>
+ <Text style={styles.tableCol3}>
<Text>{currencySymbol}</Text>
<Text>{rate ? rate.toFixed(2) : "0.00"}</Text>
</Text>
- <Text style={{ width: "20%", textAlign: "right" }}>
+ <Text style={styles.tableCol4}>
<Text>{currencySymbol}</Text>
<Text>{amount}</Text>
</Text>
@@ -203,12 +221,14 @@ const PurchaseOrderPDF = ({
</Text>
</View>
</View>
- <View style={styles.row}>
- <View style={styles.colHalf}>
- <Text style={styles.label}>Notes</Text>
- <Text>This is a note</Text>
+ {purchaseOrder?.notes && (
+ <View style={styles.row}>
+ <View style={styles.colHalf}>
+ <Text style={styles.label}>Notes</Text>
+ <Text>{purchaseOrder?.notes}</Text>
+ </View>
</View>
- </View>
+ )}
</View>
</Template>
);
diff --git a/packages/documents/src/components/Summary.tsx b/packages/documents/src/components/Summary.tsx
index 9fe9f426c2..efecee863b 100644
--- a/packages/documents/src/components/Summary.tsx
+++ b/packages/documents/src/components/Summary.tsx
@@ -5,7 +5,7 @@ type SummaryProps = {
company: Company;
items: {
label: string;
- value: string;
+ value?: string | null;
}[];
};
@@ -59,9 +59,10 @@ const Summary = ({ company, items }: SummaryProps) => {
<View style={styles.summary}>
<View style={styles.companyDetails}>
<Text style={styles.companyName}>{company.name}</Text>
- {company.address && <Text>{company.address}</Text>}
- {company.city && company.state && company.zip && (
- <Text>{`${company.city}, ${company.state}, ${company.zip}`}</Text>
+ {company.addressLine1 && <Text>{company.addressLine1}</Text>}
+ {company.addressLine2 && <Text>{company.addressLine2}</Text>}
+ {company.city && company.state && company.postalCode && (
+ <Text>{`${company.city}, ${company.state}, ${company.postalCode}`}</Text>
)}
{company.phone && <Text>Phone: {company.phone}</Text>}
{company.email && <Text>Email: {company.email}</Text>}
diff --git a/packages/documents/src/types.ts b/packages/documents/src/types.ts
index 3620d20f6e..b3574f265b 100644
--- a/packages/documents/src/types.ts
+++ b/packages/documents/src/types.ts
@@ -1,3 +1,5 @@
+import type { Database } from "@carbon/database";
+
export interface PDF {
title?: string;
meta?: Meta;
@@ -10,15 +12,4 @@ export type Meta = {
subject?: string;
};
-export type Company = {
- name: string;
- logo?: string;
- address?: string;
- city?: string;
- state?: string;
- zip?: string;
- phone?: string;
- fax?: string;
- email?: string;
- website?: string;
-};
+export type Company = Database["public"]["Tables"]["company"]["Row"];