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.

create database types

naveenkashfc596e79bd71
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index 311514d124..e42609ed29 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -342,8 +342,6 @@ export type Database = {
costOfGoodsSoldAccount: string
currencyTranslationAccount: string
customerPaymentDiscountAccount: string
- deferredTaxExpenseAccountId: string | null
- deferredTaxLiabilityAccountId: string | null
goodsReceivedNotInvoicedAccount: string
indirectCostAccount: string
interestAccount: string
@@ -387,8 +385,6 @@ export type Database = {
costOfGoodsSoldAccount: string
currencyTranslationAccount: string
customerPaymentDiscountAccount: string
- deferredTaxExpenseAccountId?: string | null
- deferredTaxLiabilityAccountId?: string | null
goodsReceivedNotInvoicedAccount: string
indirectCostAccount: string
interestAccount: string
@@ -432,8 +428,6 @@ export type Database = {
costOfGoodsSoldAccount?: string
currencyTranslationAccount?: string
customerPaymentDiscountAccount?: string
- deferredTaxExpenseAccountId?: string | null
- deferredTaxLiabilityAccountId?: string | null
goodsReceivedNotInvoicedAccount?: string
indirectCostAccount?: string
interestAccount?: string
@@ -632,34 +626,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "accountDefault_deferredTaxExpenseAccountId_fkey"
- columns: ["deferredTaxExpenseAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "accountDefault_deferredTaxExpenseAccountId_fkey"
- columns: ["deferredTaxExpenseAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "accountDefault_deferredTaxLiabilityAccountId_fkey"
- columns: ["deferredTaxLiabilityAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "accountDefault_deferredTaxLiabilityAccountId_fkey"
- columns: ["deferredTaxLiabilityAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "accountDefault_fkey"
columns: ["companyId"]
@@ -2866,8 +2832,6 @@ export type Database = {
accountsPayableEmail: string | null
accountsReceivableAddress: boolean | null
accountsReceivableEmail: string | null
- assetTaxDepreciationEnabled: boolean
- assetTaxRate: number | null
consoleEnabled: boolean
defaultCustomerCc: string[] | null
defaultSupplierCc: string[] | null
@@ -2909,8 +2873,6 @@ export type Database = {
accountsPayableEmail?: string | null
accountsReceivableAddress?: boolean | null
accountsReceivableEmail?: string | null
- assetTaxDepreciationEnabled?: boolean
- assetTaxRate?: number | null
consoleEnabled?: boolean
defaultCustomerCc?: string[] | null
defaultSupplierCc?: string[] | null
@@ -2952,8 +2914,6 @@ export type Database = {
accountsPayableEmail?: string | null
accountsReceivableAddress?: boolean | null
accountsReceivableEmail?: string | null
- assetTaxDepreciationEnabled?: boolean
- assetTaxRate?: number | null
consoleEnabled?: boolean
defaultCustomerCc?: string[] | null
defaultSupplierCc?: string[] | null
@@ -7622,228 +7582,6 @@ export type Database = {
},
]
}
- depreciationRun: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- depreciationRunId: string
- id: string
- periodEnd: string
- postedAt: string | null
- postedBy: string | null
- status: string
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- depreciationRunId: string
- id?: string
- periodEnd: string
- postedAt?: string | null
- postedBy?: string | null
- status?: string
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- depreciationRunId?: string
- id?: string
- periodEnd?: string
- postedAt?: string | null
- postedBy?: string | null
- status?: string
- }
- Relationships: [
- {
- foreignKeyName: "depreciationRun_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "depreciationRun_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "depreciationRun_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "depreciationRun_postedBy_fkey"
- columns: ["postedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_postedBy_fkey"
- columns: ["postedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_postedBy_fkey"
- columns: ["postedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_postedBy_fkey"
- columns: ["postedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_postedBy_fkey"
- columns: ["postedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
- depreciationRunLine: {
- Row: {
- amount: number
- companyId: string
- depreciationRunId: string
- fixedAssetId: string
- id: string
- journalId: string | null
- taxAmount: number | null
- }
- Insert: {
- amount: number
- companyId: string
- depreciationRunId: string
- fixedAssetId: string
- id?: string
- journalId?: string | null
- taxAmount?: number | null
- }
- Update: {
- amount?: number
- companyId?: string
- depreciationRunId?: string
- fixedAssetId?: string
- id?: string
- journalId?: string | null
- taxAmount?: number | null
- }
- Relationships: [
- {
- foreignKeyName: "depreciationRunLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRunLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRunLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "depreciationRunLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "depreciationRunLine_depreciationRunId_fkey"
- columns: ["depreciationRunId"]
- isOneToOne: false
- referencedRelation: "depreciationRun"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRunLine_fixedAssetId_fkey"
- columns: ["fixedAssetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRunLine_journalId_fkey"
- columns: ["journalId"]
- isOneToOne: false
- referencedRelation: "journal"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRunLine_journalId_fkey"
- columns: ["journalId"]
- isOneToOne: false
- referencedRelation: "journalEntries"
- referencedColumns: ["id"]
- },
- ]
- }
dimension: {
Row: {
active: boolean
@@ -9469,754 +9207,6 @@ export type Database = {
},
]
}
- fixedAsset: {
- Row: {
- accumulatedDepreciation: number
- accumulatedTaxDepreciation: number
- acquisitionCost: number
- acquisitionDate: string | null
- assetLifetimeUsage: number | null
- bonusDepreciationPercent: number | null
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- depreciationMethod: Database["public"]["Enums"]["depreciationMethod"]
- depreciationStartDate: string | null
- description: string | null
- disposalDate: string | null
- disposalMethod: Database["public"]["Enums"]["disposalMethod"] | null
- fixedAssetClassId: string
- fixedAssetId: string
- id: string
- locationId: string | null
- macrsConvention: Database["public"]["Enums"]["macrsConvention"] | null
- macrsPropertyClass:
- | Database["public"]["Enums"]["macrsPropertyClass"]
- | null
- name: string
- notes: Json | null
- residualValuePercent: number
- saleProceeds: number | null
- serialNumber: string | null
- status: Database["public"]["Enums"]["fixedAssetStatus"]
- taxDepreciationMethod:
- | Database["public"]["Enums"]["taxDepreciationMethod"]
- | null
- taxResidualValuePercent: number | null
- taxUsefulLifeMonths: number | null
- updatedAt: string | null
- updatedBy: string | null
- usefulLifeMonths: number
- }
- Insert: {
- accumulatedDepreciation?: number
- accumulatedTaxDepreciation?: number
- acquisitionCost?: number
- acquisitionDate?: string | null
- assetLifetimeUsage?: number | null
- bonusDepreciationPercent?: number | null
- companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
- depreciationStartDate?: string | null
- description?: string | null
- disposalDate?: string | null
- disposalMethod?: Database["public"]["Enums"]["disposalMethod"] | null
- fixedAssetClassId: string
- fixedAssetId: string
- id?: string
- locationId?: string | null
- macrsConvention?:
- | Database["public"]["Enums"]["macrsConvention"]
- | null
- macrsPropertyClass?:
- | Database["public"]["Enums"]["macrsPropertyClass"]
- | null
- name: string
- notes?: Json | null
- residualValuePercent?: number
- saleProceeds?: number | null
- serialNumber?: string | null
- status?: Database["public"]["Enums"]["fixedAssetStatus"]
- taxDepreciationMethod?:
- | Database["public"]["Enums"]["taxDepreciationMethod"]
- | null
- taxResidualValuePercent?: number | null
- taxUsefulLifeMonths?: number | null
- updatedAt?: string | null
- updatedBy?: string | null
- usefulLifeMonths?: number
- }
- Update: {
- accumulatedDepreciation?: number
- accumulatedTaxDepreciation?: number
- acquisitionCost?: number
- acquisitionDate?: string | null
- assetLifetimeUsage?: number | null
- bonusDepreciationPercent?: number | null
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
- depreciationStartDate?: string | null
- description?: string | null
- disposalDate?: string | null
- disposalMethod?: Database["public"]["Enums"]["disposalMethod"] | null
- fixedAssetClassId?: string
- fixedAssetId?: string
- id?: string
- locationId?: string | null
- macrsConvention?:
- | Database["public"]["Enums"]["macrsConvention"]
- | null
- macrsPropertyClass?:
- | Database["public"]["Enums"]["macrsPropertyClass"]
- | null
- name?: string
- notes?: Json | null
- residualValuePercent?: number
- saleProceeds?: number | null
- serialNumber?: string | null
- status?: Database["public"]["Enums"]["fixedAssetStatus"]
- taxDepreciationMethod?:
- | Database["public"]["Enums"]["taxDepreciationMethod"]
- | null
- taxResidualValuePercent?: number | null
- taxUsefulLifeMonths?: number | null
- updatedAt?: string | null
- updatedBy?: string | null
- usefulLifeMonths?: number
- }
- Relationships: [
- {
- foreignKeyName: "fixedAsset_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAsset_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAsset_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "fixedAsset_fixedAssetClassId_fkey"
- columns: ["fixedAssetClassId"]
- isOneToOne: false
- referencedRelation: "fixedAssetClass"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
- fixedAssetClass: {
- Row: {
- accumulatedDepreciationAccountId: string
- assetAccountId: string
- bonusDepreciationPercent: number | null
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- depreciationExpenseAccountId: string
- depreciationMethod: Database["public"]["Enums"]["depreciationMethod"]
- description: string | null
- disposalAccountId: string
- id: string
- macrsConvention: Database["public"]["Enums"]["macrsConvention"] | null
- macrsPropertyClass:
- | Database["public"]["Enums"]["macrsPropertyClass"]
- | null
- name: string
- residualValuePercent: number
- taxDepreciationMethod:
- | Database["public"]["Enums"]["taxDepreciationMethod"]
- | null
- taxResidualValuePercent: number | null
- taxUsefulLifeMonths: number | null
- updatedAt: string | null
- updatedBy: string | null
- usefulLifeMonths: number
- writeDownAccountId: string
- writeOffAccountId: string
- }
- Insert: {
- accumulatedDepreciationAccountId: string
- assetAccountId: string
- bonusDepreciationPercent?: number | null
- companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- depreciationExpenseAccountId: string
- depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
- description?: string | null
- disposalAccountId: string
- id?: string
- macrsConvention?:
- | Database["public"]["Enums"]["macrsConvention"]
- | null
- macrsPropertyClass?:
- | Database["public"]["Enums"]["macrsPropertyClass"]
- | null
- name: string
- residualValuePercent?: number
- taxDepreciationMethod?:
- | Database["public"]["Enums"]["taxDepreciationMethod"]
- | null
- taxResidualValuePercent?: number | null
- taxUsefulLifeMonths?: number | null
- updatedAt?: string | null
- updatedBy?: string | null
- usefulLifeMonths?: number
- writeDownAccountId: string
- writeOffAccountId: string
- }
- Update: {
- accumulatedDepreciationAccountId?: string
- assetAccountId?: string
- bonusDepreciationPercent?: number | null
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- depreciationExpenseAccountId?: string
- depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
- description?: string | null
- disposalAccountId?: string
- id?: string
- macrsConvention?:
- | Database["public"]["Enums"]["macrsConvention"]
- | null
- macrsPropertyClass?:
- | Database["public"]["Enums"]["macrsPropertyClass"]
- | null
- name?: string
- residualValuePercent?: number
- taxDepreciationMethod?:
- | Database["public"]["Enums"]["taxDepreciationMethod"]
- | null
- taxResidualValuePercent?: number | null
- taxUsefulLifeMonths?: number | null
- updatedAt?: string | null
- updatedBy?: string | null
- usefulLifeMonths?: number
- writeDownAccountId?: string
- writeOffAccountId?: string
- }
- Relationships: [
- {
- foreignKeyName: "fixedAssetClass_accumulatedDepreciationAccountId_fkey"
- columns: ["accumulatedDepreciationAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_accumulatedDepreciationAccountId_fkey"
- columns: ["accumulatedDepreciationAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_assetAccountId_fkey"
- columns: ["assetAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_assetAccountId_fkey"
- columns: ["assetAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAssetClass_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAssetClass_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "fixedAssetClass_depreciationExpenseAccountId_fkey"
- columns: ["depreciationExpenseAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_depreciationExpenseAccountId_fkey"
- columns: ["depreciationExpenseAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_disposalAccountId_fkey"
- columns: ["disposalAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_disposalAccountId_fkey"
- columns: ["disposalAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "fixedAssetClass_writeDownAccountId_fkey"
- columns: ["writeDownAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_writeDownAccountId_fkey"
- columns: ["writeDownAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_writeOffAccountId_fkey"
- columns: ["writeOffAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_writeOffAccountId_fkey"
- columns: ["writeOffAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- ]
- }
- fixedAssetDisposal: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- disposalDate: string
- disposalMethod: Database["public"]["Enums"]["disposalMethod"]
- fixedAssetId: string
- gainLoss: number
- id: string
- journalId: string | null
- netBookValueAtDisposal: number
- saleProceeds: number
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- disposalDate: string
- disposalMethod: Database["public"]["Enums"]["disposalMethod"]
- fixedAssetId: string
- gainLoss: number
- id?: string
- journalId?: string | null
- netBookValueAtDisposal: number
- saleProceeds?: number
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- disposalDate?: string
- disposalMethod?: Database["public"]["Enums"]["disposalMethod"]
- fixedAssetId?: string
- gainLoss?: number
- id?: string
- journalId?: string | null
- netBookValueAtDisposal?: number
- saleProceeds?: number
- }
- Relationships: [
- {
- foreignKeyName: "fixedAssetDisposal_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_fixedAssetId_fkey"
- columns: ["fixedAssetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_journalId_fkey"
- columns: ["journalId"]
- isOneToOne: false
- referencedRelation: "journal"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_journalId_fkey"
- columns: ["journalId"]
- isOneToOne: false
- referencedRelation: "journalEntries"
- referencedColumns: ["id"]
- },
- ]
- }
- fixedAssetUsageLog: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- fixedAssetId: string
- id: string
- periodEnd: string
- periodStart: string
- unitsProduced: number
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- fixedAssetId: string
- id?: string
- periodEnd: string
- periodStart: string
- unitsProduced: number
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- fixedAssetId?: string
- id?: string
- periodEnd?: string
- periodStart?: string
- unitsProduced?: number
- }
- Relationships: [
- {
- foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_fixedAssetId_fkey"
- columns: ["fixedAssetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
- ]
- }
fixture: {
Row: {
approved: boolean
@@ -25098,6 +24088,131 @@ export type Database = {
},
]
}
+ notification: {
+ Row: {
+ companyId: string
+ createdAt: string
+ description: string | null
+ digestedInto: string | null
+ documentId: string | null
+ documentType: string | null
+ event: string
+ from: string | null
+ id: string
+ payload: Json
+ readAt: string | null
+ seenAt: string | null
+ title: string
+ topic: string
+ userId: string
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ description?: string | null
+ digestedInto?: string | null
+ documentId?: string | null
+ documentType?: string | null
+ event: string
+ from?: string | null
+ id?: string
+ payload?: Json
+ readAt?: string | null
+ seenAt?: string | null
+ title: string
+ topic: string
+ userId: string
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ description?: string | null
+ digestedInto?: string | null
+ documentId?: string | null
+ documentType?: string | null
+ event?: string
+ from?: string | null
+ id?: string
+ payload?: Json
+ readAt?: string | null
+ seenAt?: string | null
+ title?: string
+ topic?: string
+ userId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "notification_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "notification_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "notification_digestedInto_fkey"
+ columns: ["digestedInto"]
+ isOneToOne: false
+ referencedRelation: "notification"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
oauthClient: {
Row: {
clientId: string
@@ -29308,13 +28423,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "purchaseOrderLine_assetId_fkey"
- columns: ["assetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "purchaseOrderLine_costCenterId_fkey"
columns: ["costCenterId"]
@@ -34129,144 +33237,6 @@ export type Database = {
},
]
}
- receiptFixedAssetLine: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- id: string
- purchaseOrderLineId: string
- receiptId: string
- received: boolean
- serialNumber: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- id?: string
- purchaseOrderLineId: string
- receiptId: string
- received?: boolean
- serialNumber?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- id?: string
- purchaseOrderLineId?: string
- receiptId?: string
- received?: boolean
- serialNumber?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_purchaseOrderLineId_fkey"
- columns: ["purchaseOrderLineId"]
- isOneToOne: false
- referencedRelation: "openPurchaseOrderLines"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_purchaseOrderLineId_fkey"
- columns: ["purchaseOrderLineId"]
- isOneToOne: false
- referencedRelation: "purchaseOrderLine"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_purchaseOrderLineId_fkey"
- columns: ["purchaseOrderLineId"]
- isOneToOne: false
- referencedRelation: "purchaseOrderLines"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_receiptId_fkey"
- columns: ["receiptId"]
- isOneToOne: false
- referencedRelation: "receipt"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_receiptId_fkey"
- columns: ["receiptId"]
- isOneToOne: false
- referencedRelation: "receipts"
- referencedColumns: ["id"]
- },
- ]
- }
receiptLine: {
Row: {
companyId: string
@@ -35144,13 +34114,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "salesInvoiceLine_assetId_fkey"
- columns: ["assetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "salesInvoiceLine_companyId_fkey"
columns: ["companyId"]
@@ -36123,13 +35086,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "salesOrderLine_assetId_fkey"
- columns: ["assetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "salesOrderLine_createdBy_fkey"
columns: ["createdBy"]
@@ -37591,7 +36547,7 @@ export type Database = {
},
]
}
- searchIndex_SvN8PSwVgcgrU2W6cCNWXE: {
+ searchIndex_PjY5r4hY5NXa8db3oSSoQs: {
Row: {
createdAt: string
description: string | null
@@ -38537,137 +37493,6 @@ export type Database = {
},
]
}
- shipmentFixedAssetLine: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- id: string
- salesOrderLineId: string
- serialNumber: string | null
- shipmentId: string
- shipped: boolean
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- id?: string
- salesOrderLineId: string
- serialNumber?: string | null
- shipmentId: string
- shipped?: boolean
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- id?: string
- salesOrderLineId?: string
- serialNumber?: string | null
- shipmentId?: string
- shipped?: boolean
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_salesOrderLineId_fkey"
- columns: ["salesOrderLineId"]
- isOneToOne: false
- referencedRelation: "openSalesOrderLines"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_salesOrderLineId_fkey"
- columns: ["salesOrderLineId"]
- isOneToOne: false
- referencedRelation: "salesOrderLine"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_salesOrderLineId_fkey"
- columns: ["salesOrderLineId"]
- isOneToOne: false
- referencedRelation: "salesOrderLines"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_shipmentId_fkey"
- columns: ["shipmentId"]
- isOneToOne: false
- referencedRelation: "shipment"
- referencedColumns: ["id"]
- },
- ]
- }
shipmentLine: {
Row: {
companyId: string
@@ -46919,7 +45744,6 @@ export type Database = {
createdBy: string
customFields: Json | null
defaultStandardFactor: Database["public"]["Enums"]["factor"]
- departmentId: string | null
description: string | null
id: string
laborRate: number
@@ -46939,7 +45763,6 @@ export type Database = {
createdBy: string
customFields?: Json | null
defaultStandardFactor?: Database["public"]["Enums"]["factor"]
- departmentId?: string | null
description?: string | null
id?: string
laborRate?: number
@@ -46959,7 +45782,6 @@ export type Database = {
createdBy?: string
customFields?: Json | null
defaultStandardFactor?: Database["public"]["Enums"]["factor"]
- departmentId?: string | null
description?: string | null
id?: string
laborRate?: number
@@ -47036,13 +45858,6 @@ export type Database = {
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "workCenter_departmentId_fkey"
- columns: ["departmentId"]
- isOneToOne: false
- referencedRelation: "department"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "workCenter_locationId_fkey"
columns: ["locationId"]
@@ -53007,14 +51822,14 @@ export type Database = {
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["id"]
+ columns: ["supplierLocationId"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["supplierLocationId"]
+ columns: ["id"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
@@ -53458,8 +52273,6 @@ export type Database = {
accountId: string | null
accountName: string | null
assetId: string | null
- assetName: string | null
- assetReadableId: string | null
companyId: string | null
conversionFactor: number | null
costCenterId: string | null
@@ -54122,8 +52935,6 @@ export type Database = {
accountId: string | null
accountName: string | null
assetId: string | null
- assetName: string | null
- assetReadableId: string | null
autodeskUrn: string | null
companyId: string | null
conversionFactor: number | null
@@ -54202,13 +53013,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "purchaseOrderLine_assetId_fkey"
- columns: ["assetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "purchaseOrderLine_costCenterId_fkey"
columns: ["costCenterId"]
@@ -54509,14 +53313,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["supplierCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["supplierCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -57588,8 +56392,6 @@ export type Database = {
accountId: string | null
addOnCost: number | null
assetId: string | null
- assetName: string | null
- assetReadableId: string | null
companyId: string | null
convertedAddOnCost: number | null
convertedNonTaxableAddOnCost: number | null
@@ -57648,13 +56450,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "salesInvoiceLine_assetId_fkey"
- columns: ["assetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "salesInvoiceLine_companyId_fkey"
columns: ["companyId"]
@@ -57936,7 +56731,7 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["shipmentCountryCode"]
+ columns: ["invoiceCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -57950,7 +56745,7 @@ export type Database = {
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["invoiceCountryCode"]
+ columns: ["shipmentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -58232,8 +57027,6 @@ export type Database = {
accountId: string | null
addOnCost: number | null
assetId: string | null
- assetName: string | null
- assetReadableId: string | null
autodeskUrn: string | null
companyId: string | null
convertedAddOnCost: number | null
@@ -58328,13 +57121,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "salesOrderLine_assetId_fkey"
- columns: ["assetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "salesOrderLine_createdBy_fkey"
columns: ["createdBy"]
@@ -58517,14 +57303,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["paymentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["paymentCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -61526,8 +60312,6 @@ export type Database = {
createdBy: string | null
customFields: Json | null
defaultStandardFactor: Database["public"]["Enums"]["factor"] | null
- departmentId: string | null
- departmentName: string | null
description: string | null
id: string | null
laborRate: number | null
@@ -61606,13 +60390,6 @@ export type Database = {
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "workCenter_departmentId_fkey"
- columns: ["departmentId"]
- isOneToOne: false
- referencedRelation: "department"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "workCenter_locationId_fkey"
columns: ["locationId"]
@@ -61674,7 +60451,6 @@ export type Database = {
createdBy: string | null
customFields: Json | null
defaultStandardFactor: Database["public"]["Enums"]["factor"] | null
- departmentId: string | null
description: string | null
id: string | null
isBlocked: boolean | null
@@ -61753,13 +60529,6 @@ export type Database = {
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "workCenter_departmentId_fkey"
- columns: ["departmentId"]
- isOneToOne: false
- referencedRelation: "department"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "workCenter_locationId_fkey"
columns: ["locationId"]
@@ -64009,10 +62778,6 @@ export type Database = {
customRuleTargetType: "item" | "storageUnit" | "workCenter"
deadlineType: "No Deadline" | "ASAP" | "Soft Deadline" | "Hard Deadline"
demandSourceType: "Sales Order" | "Job Material"
- depreciationMethod:
- | "Straight Line"
- | "Declining Balance"
- | "Units of Production"
dimensionEntityType:
| "Custom"
| "Location"
@@ -64022,10 +62787,6 @@ export type Database = {
| "Department"
| "Employee"
| "CostCenter"
- | "WorkCenter"
- | "Process"
- | "FixedAssetClass"
- disposalMethod: "Sale" | "Scrapping"
disposition:
| "Conditional Acceptance"
| "Deviation Accepted"
@@ -64106,7 +62867,6 @@ export type Database = {
| "Seconds/Piece"
| "Total Hours"
| "Total Minutes"
- fixedAssetStatus: "Draft" | "Active" | "Fully Depreciated" | "Disposed"
fulfillmentType: "Inventory" | "Job"
gaugeCalibrationStatus:
| "Pending"
@@ -64227,8 +62987,6 @@ export type Database = {
| "Job Receipt"
| "Production Event"
| "Job Close"
- | "Asset Depreciation"
- | "Asset Disposal"
journalEntryStatus: "Draft" | "Posted" | "Reversed"
journalLineDocumentType:
| "Receipt"
@@ -64247,8 +63005,6 @@ export type Database = {
| "Production Event"
| "Job Close"
kanbanOutput: "label" | "qrcode" | "url"
- macrsConvention: "Half-Year" | "Mid-Quarter"
- macrsPropertyClass: "3" | "5" | "7" | "10" | "15" | "20" | "27.5" | "39"
maintenanceDispatchPriority: "Low" | "Medium" | "High" | "Critical"
maintenanceDispatchStatus:
| "Open"
@@ -64510,7 +63266,6 @@ export type Database = {
supplierStatusType: "Active" | "Inactive" | "Pending" | "Rejected"
supplySourceType: "Purchase Order" | "Production Order"
tableViewType: "Public" | "Private"
- taxDepreciationMethod: "Straight Line" | "Declining Balance" | "MACRS"
taxExemptionReason:
| "Resale"
| "Government"
@@ -65277,11 +64032,6 @@ export const Constants = {
customRuleTargetType: ["item", "storageUnit", "workCenter"],
deadlineType: ["No Deadline", "ASAP", "Soft Deadline", "Hard Deadline"],
demandSourceType: ["Sales Order", "Job Material"],
- depreciationMethod: [
- "Straight Line",
- "Declining Balance",
- "Units of Production",
- ],
dimensionEntityType: [
"Custom",
"Location",
@@ -65291,11 +64041,7 @@ export const Constants = {
"Department",
"Employee",
"CostCenter",
- "WorkCenter",
- "Process",
- "FixedAssetClass",
],
- disposalMethod: ["Sale", "Scrapping"],
disposition: [
"Conditional Acceptance",
"Deviation Accepted",
@@ -65383,7 +64129,6 @@ export const Constants = {
"Total Hours",
"Total Minutes",
],
- fixedAssetStatus: ["Draft", "Active", "Fully Depreciated", "Disposed"],
fulfillmentType: ["Inventory", "Job"],
gaugeCalibrationStatus: [
"Pending",
@@ -65514,8 +64259,6 @@ export const Constants = {
"Job Receipt",
"Production Event",
"Job Close",
- "Asset Depreciation",
- "Asset Disposal",
],
journalEntryStatus: ["Draft", "Posted", "Reversed"],
journalLineDocumentType: [
@@ -65536,8 +64279,6 @@ export const Constants = {
"Job Close",
],
kanbanOutput: ["label", "qrcode", "url"],
- macrsConvention: ["Half-Year", "Mid-Quarter"],
- macrsPropertyClass: ["3", "5", "7", "10", "15", "20", "27.5", "39"],
maintenanceDispatchPriority: ["Low", "Medium", "High", "Critical"],
maintenanceDispatchStatus: [
"Open",
@@ -65825,7 +64566,6 @@ export const Constants = {
supplierStatusType: ["Active", "Inactive", "Pending", "Rejected"],
supplySourceType: ["Purchase Order", "Production Order"],
tableViewType: ["Public", "Private"],
- taxDepreciationMethod: ["Straight Line", "Declining Balance", "MACRS"],
taxExemptionReason: [
"Resale",
"Government",
diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.ts
index 311514d124..e42609ed29 100644
--- a/packages/database/supabase/functions/lib/types.ts
+++ b/packages/database/supabase/functions/lib/types.ts
@@ -342,8 +342,6 @@ export type Database = {
costOfGoodsSoldAccount: string
currencyTranslationAccount: string
customerPaymentDiscountAccount: string
- deferredTaxExpenseAccountId: string | null
- deferredTaxLiabilityAccountId: string | null
goodsReceivedNotInvoicedAccount: string
indirectCostAccount: string
interestAccount: string
@@ -387,8 +385,6 @@ export type Database = {
costOfGoodsSoldAccount: string
currencyTranslationAccount: string
customerPaymentDiscountAccount: string
- deferredTaxExpenseAccountId?: string | null
- deferredTaxLiabilityAccountId?: string | null
goodsReceivedNotInvoicedAccount: string
indirectCostAccount: string
interestAccount: string
@@ -432,8 +428,6 @@ export type Database = {
costOfGoodsSoldAccount?: string
currencyTranslationAccount?: string
customerPaymentDiscountAccount?: string
- deferredTaxExpenseAccountId?: string | null
- deferredTaxLiabilityAccountId?: string | null
goodsReceivedNotInvoicedAccount?: string
indirectCostAccount?: string
interestAccount?: string
@@ -632,34 +626,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "accountDefault_deferredTaxExpenseAccountId_fkey"
- columns: ["deferredTaxExpenseAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "accountDefault_deferredTaxExpenseAccountId_fkey"
- columns: ["deferredTaxExpenseAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "accountDefault_deferredTaxLiabilityAccountId_fkey"
- columns: ["deferredTaxLiabilityAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "accountDefault_deferredTaxLiabilityAccountId_fkey"
- columns: ["deferredTaxLiabilityAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "accountDefault_fkey"
columns: ["companyId"]
@@ -2866,8 +2832,6 @@ export type Database = {
accountsPayableEmail: string | null
accountsReceivableAddress: boolean | null
accountsReceivableEmail: string | null
- assetTaxDepreciationEnabled: boolean
- assetTaxRate: number | null
consoleEnabled: boolean
defaultCustomerCc: string[] | null
defaultSupplierCc: string[] | null
@@ -2909,8 +2873,6 @@ export type Database = {
accountsPayableEmail?: string | null
accountsReceivableAddress?: boolean | null
accountsReceivableEmail?: string | null
- assetTaxDepreciationEnabled?: boolean
- assetTaxRate?: number | null
consoleEnabled?: boolean
defaultCustomerCc?: string[] | null
defaultSupplierCc?: string[] | null
@@ -2952,8 +2914,6 @@ export type Database = {
accountsPayableEmail?: string | null
accountsReceivableAddress?: boolean | null
accountsReceivableEmail?: string | null
- assetTaxDepreciationEnabled?: boolean
- assetTaxRate?: number | null
consoleEnabled?: boolean
defaultCustomerCc?: string[] | null
defaultSupplierCc?: string[] | null
@@ -7622,228 +7582,6 @@ export type Database = {
},
]
}
- depreciationRun: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- depreciationRunId: string
- id: string
- periodEnd: string
- postedAt: string | null
- postedBy: string | null
- status: string
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- depreciationRunId: string
- id?: string
- periodEnd: string
- postedAt?: string | null
- postedBy?: string | null
- status?: string
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- depreciationRunId?: string
- id?: string
- periodEnd?: string
- postedAt?: string | null
- postedBy?: string | null
- status?: string
- }
- Relationships: [
- {
- foreignKeyName: "depreciationRun_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "depreciationRun_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "depreciationRun_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "depreciationRun_postedBy_fkey"
- columns: ["postedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_postedBy_fkey"
- columns: ["postedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_postedBy_fkey"
- columns: ["postedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_postedBy_fkey"
- columns: ["postedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRun_postedBy_fkey"
- columns: ["postedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
- depreciationRunLine: {
- Row: {
- amount: number
- companyId: string
- depreciationRunId: string
- fixedAssetId: string
- id: string
- journalId: string | null
- taxAmount: number | null
- }
- Insert: {
- amount: number
- companyId: string
- depreciationRunId: string
- fixedAssetId: string
- id?: string
- journalId?: string | null
- taxAmount?: number | null
- }
- Update: {
- amount?: number
- companyId?: string
- depreciationRunId?: string
- fixedAssetId?: string
- id?: string
- journalId?: string | null
- taxAmount?: number | null
- }
- Relationships: [
- {
- foreignKeyName: "depreciationRunLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRunLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRunLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "depreciationRunLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "depreciationRunLine_depreciationRunId_fkey"
- columns: ["depreciationRunId"]
- isOneToOne: false
- referencedRelation: "depreciationRun"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRunLine_fixedAssetId_fkey"
- columns: ["fixedAssetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRunLine_journalId_fkey"
- columns: ["journalId"]
- isOneToOne: false
- referencedRelation: "journal"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "depreciationRunLine_journalId_fkey"
- columns: ["journalId"]
- isOneToOne: false
- referencedRelation: "journalEntries"
- referencedColumns: ["id"]
- },
- ]
- }
dimension: {
Row: {
active: boolean
@@ -9469,754 +9207,6 @@ export type Database = {
},
]
}
- fixedAsset: {
- Row: {
- accumulatedDepreciation: number
- accumulatedTaxDepreciation: number
- acquisitionCost: number
- acquisitionDate: string | null
- assetLifetimeUsage: number | null
- bonusDepreciationPercent: number | null
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- depreciationMethod: Database["public"]["Enums"]["depreciationMethod"]
- depreciationStartDate: string | null
- description: string | null
- disposalDate: string | null
- disposalMethod: Database["public"]["Enums"]["disposalMethod"] | null
- fixedAssetClassId: string
- fixedAssetId: string
- id: string
- locationId: string | null
- macrsConvention: Database["public"]["Enums"]["macrsConvention"] | null
- macrsPropertyClass:
- | Database["public"]["Enums"]["macrsPropertyClass"]
- | null
- name: string
- notes: Json | null
- residualValuePercent: number
- saleProceeds: number | null
- serialNumber: string | null
- status: Database["public"]["Enums"]["fixedAssetStatus"]
- taxDepreciationMethod:
- | Database["public"]["Enums"]["taxDepreciationMethod"]
- | null
- taxResidualValuePercent: number | null
- taxUsefulLifeMonths: number | null
- updatedAt: string | null
- updatedBy: string | null
- usefulLifeMonths: number
- }
- Insert: {
- accumulatedDepreciation?: number
- accumulatedTaxDepreciation?: number
- acquisitionCost?: number
- acquisitionDate?: string | null
- assetLifetimeUsage?: number | null
- bonusDepreciationPercent?: number | null
- companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
- depreciationStartDate?: string | null
- description?: string | null
- disposalDate?: string | null
- disposalMethod?: Database["public"]["Enums"]["disposalMethod"] | null
- fixedAssetClassId: string
- fixedAssetId: string
- id?: string
- locationId?: string | null
- macrsConvention?:
- | Database["public"]["Enums"]["macrsConvention"]
- | null
- macrsPropertyClass?:
- | Database["public"]["Enums"]["macrsPropertyClass"]
- | null
- name: string
- notes?: Json | null
- residualValuePercent?: number
- saleProceeds?: number | null
- serialNumber?: string | null
- status?: Database["public"]["Enums"]["fixedAssetStatus"]
- taxDepreciationMethod?:
- | Database["public"]["Enums"]["taxDepreciationMethod"]
- | null
- taxResidualValuePercent?: number | null
- taxUsefulLifeMonths?: number | null
- updatedAt?: string | null
- updatedBy?: string | null
- usefulLifeMonths?: number
- }
- Update: {
- accumulatedDepreciation?: number
- accumulatedTaxDepreciation?: number
- acquisitionCost?: number
- acquisitionDate?: string | null
- assetLifetimeUsage?: number | null
- bonusDepreciationPercent?: number | null
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
- depreciationStartDate?: string | null
- description?: string | null
- disposalDate?: string | null
- disposalMethod?: Database["public"]["Enums"]["disposalMethod"] | null
- fixedAssetClassId?: string
- fixedAssetId?: string
- id?: string
- locationId?: string | null
- macrsConvention?:
- | Database["public"]["Enums"]["macrsConvention"]
- | null
- macrsPropertyClass?:
- | Database["public"]["Enums"]["macrsPropertyClass"]
- | null
- name?: string
- notes?: Json | null
- residualValuePercent?: number
- saleProceeds?: number | null
- serialNumber?: string | null
- status?: Database["public"]["Enums"]["fixedAssetStatus"]
- taxDepreciationMethod?:
- | Database["public"]["Enums"]["taxDepreciationMethod"]
- | null
- taxResidualValuePercent?: number | null
- taxUsefulLifeMonths?: number | null
- updatedAt?: string | null
- updatedBy?: string | null
- usefulLifeMonths?: number
- }
- Relationships: [
- {
- foreignKeyName: "fixedAsset_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAsset_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAsset_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "fixedAsset_fixedAssetClassId_fkey"
- columns: ["fixedAssetClassId"]
- isOneToOne: false
- referencedRelation: "fixedAssetClass"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_locationId_fkey"
- columns: ["locationId"]
- isOneToOne: false
- referencedRelation: "location"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAsset_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- ]
- }
- fixedAssetClass: {
- Row: {
- accumulatedDepreciationAccountId: string
- assetAccountId: string
- bonusDepreciationPercent: number | null
- companyId: string
- createdAt: string
- createdBy: string
- customFields: Json | null
- depreciationExpenseAccountId: string
- depreciationMethod: Database["public"]["Enums"]["depreciationMethod"]
- description: string | null
- disposalAccountId: string
- id: string
- macrsConvention: Database["public"]["Enums"]["macrsConvention"] | null
- macrsPropertyClass:
- | Database["public"]["Enums"]["macrsPropertyClass"]
- | null
- name: string
- residualValuePercent: number
- taxDepreciationMethod:
- | Database["public"]["Enums"]["taxDepreciationMethod"]
- | null
- taxResidualValuePercent: number | null
- taxUsefulLifeMonths: number | null
- updatedAt: string | null
- updatedBy: string | null
- usefulLifeMonths: number
- writeDownAccountId: string
- writeOffAccountId: string
- }
- Insert: {
- accumulatedDepreciationAccountId: string
- assetAccountId: string
- bonusDepreciationPercent?: number | null
- companyId: string
- createdAt?: string
- createdBy: string
- customFields?: Json | null
- depreciationExpenseAccountId: string
- depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
- description?: string | null
- disposalAccountId: string
- id?: string
- macrsConvention?:
- | Database["public"]["Enums"]["macrsConvention"]
- | null
- macrsPropertyClass?:
- | Database["public"]["Enums"]["macrsPropertyClass"]
- | null
- name: string
- residualValuePercent?: number
- taxDepreciationMethod?:
- | Database["public"]["Enums"]["taxDepreciationMethod"]
- | null
- taxResidualValuePercent?: number | null
- taxUsefulLifeMonths?: number | null
- updatedAt?: string | null
- updatedBy?: string | null
- usefulLifeMonths?: number
- writeDownAccountId: string
- writeOffAccountId: string
- }
- Update: {
- accumulatedDepreciationAccountId?: string
- assetAccountId?: string
- bonusDepreciationPercent?: number | null
- companyId?: string
- createdAt?: string
- createdBy?: string
- customFields?: Json | null
- depreciationExpenseAccountId?: string
- depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
- description?: string | null
- disposalAccountId?: string
- id?: string
- macrsConvention?:
- | Database["public"]["Enums"]["macrsConvention"]
- | null
- macrsPropertyClass?:
- | Database["public"]["Enums"]["macrsPropertyClass"]
- | null
- name?: string
- residualValuePercent?: number
- taxDepreciationMethod?:
- | Database["public"]["Enums"]["taxDepreciationMethod"]
- | null
- taxResidualValuePercent?: number | null
- taxUsefulLifeMonths?: number | null
- updatedAt?: string | null
- updatedBy?: string | null
- usefulLifeMonths?: number
- writeDownAccountId?: string
- writeOffAccountId?: string
- }
- Relationships: [
- {
- foreignKeyName: "fixedAssetClass_accumulatedDepreciationAccountId_fkey"
- columns: ["accumulatedDepreciationAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_accumulatedDepreciationAccountId_fkey"
- columns: ["accumulatedDepreciationAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_assetAccountId_fkey"
- columns: ["assetAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_assetAccountId_fkey"
- columns: ["assetAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAssetClass_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAssetClass_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "fixedAssetClass_depreciationExpenseAccountId_fkey"
- columns: ["depreciationExpenseAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_depreciationExpenseAccountId_fkey"
- columns: ["depreciationExpenseAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_disposalAccountId_fkey"
- columns: ["disposalAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_disposalAccountId_fkey"
- columns: ["disposalAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_updatedBy_fkey"
- columns: ["updatedBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "fixedAssetClass_writeDownAccountId_fkey"
- columns: ["writeDownAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_writeDownAccountId_fkey"
- columns: ["writeDownAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_writeOffAccountId_fkey"
- columns: ["writeOffAccountId"]
- isOneToOne: false
- referencedRelation: "account"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetClass_writeOffAccountId_fkey"
- columns: ["writeOffAccountId"]
- isOneToOne: false
- referencedRelation: "accounts"
- referencedColumns: ["id"]
- },
- ]
- }
- fixedAssetDisposal: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- disposalDate: string
- disposalMethod: Database["public"]["Enums"]["disposalMethod"]
- fixedAssetId: string
- gainLoss: number
- id: string
- journalId: string | null
- netBookValueAtDisposal: number
- saleProceeds: number
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- disposalDate: string
- disposalMethod: Database["public"]["Enums"]["disposalMethod"]
- fixedAssetId: string
- gainLoss: number
- id?: string
- journalId?: string | null
- netBookValueAtDisposal: number
- saleProceeds?: number
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- disposalDate?: string
- disposalMethod?: Database["public"]["Enums"]["disposalMethod"]
- fixedAssetId?: string
- gainLoss?: number
- id?: string
- journalId?: string | null
- netBookValueAtDisposal?: number
- saleProceeds?: number
- }
- Relationships: [
- {
- foreignKeyName: "fixedAssetDisposal_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_fixedAssetId_fkey"
- columns: ["fixedAssetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_journalId_fkey"
- columns: ["journalId"]
- isOneToOne: false
- referencedRelation: "journal"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetDisposal_journalId_fkey"
- columns: ["journalId"]
- isOneToOne: false
- referencedRelation: "journalEntries"
- referencedColumns: ["id"]
- },
- ]
- }
- fixedAssetUsageLog: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- fixedAssetId: string
- id: string
- periodEnd: string
- periodStart: string
- unitsProduced: number
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- fixedAssetId: string
- id?: string
- periodEnd: string
- periodStart: string
- unitsProduced: number
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- fixedAssetId?: string
- id?: string
- periodEnd?: string
- periodStart?: string
- unitsProduced?: number
- }
- Relationships: [
- {
- foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "fixedAssetUsageLog_fixedAssetId_fkey"
- columns: ["fixedAssetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
- ]
- }
fixture: {
Row: {
approved: boolean
@@ -25098,6 +24088,131 @@ export type Database = {
},
]
}
+ notification: {
+ Row: {
+ companyId: string
+ createdAt: string
+ description: string | null
+ digestedInto: string | null
+ documentId: string | null
+ documentType: string | null
+ event: string
+ from: string | null
+ id: string
+ payload: Json
+ readAt: string | null
+ seenAt: string | null
+ title: string
+ topic: string
+ userId: string
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ description?: string | null
+ digestedInto?: string | null
+ documentId?: string | null
+ documentType?: string | null
+ event: string
+ from?: string | null
+ id?: string
+ payload?: Json
+ readAt?: string | null
+ seenAt?: string | null
+ title: string
+ topic: string
+ userId: string
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ description?: string | null
+ digestedInto?: string | null
+ documentId?: string | null
+ documentType?: string | null
+ event?: string
+ from?: string | null
+ id?: string
+ payload?: Json
+ readAt?: string | null
+ seenAt?: string | null
+ title?: string
+ topic?: string
+ userId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "notification_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "notification_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "notification_digestedInto_fkey"
+ columns: ["digestedInto"]
+ isOneToOne: false
+ referencedRelation: "notification"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "notification_userId_fkey"
+ columns: ["userId"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
oauthClient: {
Row: {
clientId: string
@@ -29308,13 +28423,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "purchaseOrderLine_assetId_fkey"
- columns: ["assetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "purchaseOrderLine_costCenterId_fkey"
columns: ["costCenterId"]
@@ -34129,144 +33237,6 @@ export type Database = {
},
]
}
- receiptFixedAssetLine: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- id: string
- purchaseOrderLineId: string
- receiptId: string
- received: boolean
- serialNumber: string | null
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- id?: string
- purchaseOrderLineId: string
- receiptId: string
- received?: boolean
- serialNumber?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- id?: string
- purchaseOrderLineId?: string
- receiptId?: string
- received?: boolean
- serialNumber?: string | null
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_purchaseOrderLineId_fkey"
- columns: ["purchaseOrderLineId"]
- isOneToOne: false
- referencedRelation: "openPurchaseOrderLines"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_purchaseOrderLineId_fkey"
- columns: ["purchaseOrderLineId"]
- isOneToOne: false
- referencedRelation: "purchaseOrderLine"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_purchaseOrderLineId_fkey"
- columns: ["purchaseOrderLineId"]
- isOneToOne: false
- referencedRelation: "purchaseOrderLines"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_receiptId_fkey"
- columns: ["receiptId"]
- isOneToOne: false
- referencedRelation: "receipt"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "receiptFixedAssetLine_receiptId_fkey"
- columns: ["receiptId"]
- isOneToOne: false
- referencedRelation: "receipts"
- referencedColumns: ["id"]
- },
- ]
- }
receiptLine: {
Row: {
companyId: string
@@ -35144,13 +34114,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "salesInvoiceLine_assetId_fkey"
- columns: ["assetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "salesInvoiceLine_companyId_fkey"
columns: ["companyId"]
@@ -36123,13 +35086,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "salesOrderLine_assetId_fkey"
- columns: ["assetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "salesOrderLine_createdBy_fkey"
columns: ["createdBy"]
@@ -37591,7 +36547,7 @@ export type Database = {
},
]
}
- searchIndex_SvN8PSwVgcgrU2W6cCNWXE: {
+ searchIndex_PjY5r4hY5NXa8db3oSSoQs: {
Row: {
createdAt: string
description: string | null
@@ -38537,137 +37493,6 @@ export type Database = {
},
]
}
- shipmentFixedAssetLine: {
- Row: {
- companyId: string
- createdAt: string
- createdBy: string
- id: string
- salesOrderLineId: string
- serialNumber: string | null
- shipmentId: string
- shipped: boolean
- updatedAt: string | null
- updatedBy: string | null
- }
- Insert: {
- companyId: string
- createdAt?: string
- createdBy: string
- id?: string
- salesOrderLineId: string
- serialNumber?: string | null
- shipmentId: string
- shipped?: boolean
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Update: {
- companyId?: string
- createdAt?: string
- createdBy?: string
- id?: string
- salesOrderLineId?: string
- serialNumber?: string | null
- shipmentId?: string
- shipped?: boolean
- updatedAt?: string | null
- updatedBy?: string | null
- }
- Relationships: [
- {
- foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "companies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "company"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "customFieldTables"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
- columns: ["companyId"]
- isOneToOne: false
- referencedRelation: "integrations"
- referencedColumns: ["companyId"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employees"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeesAcrossCompanies"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "employeeSummary"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "user"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
- columns: ["createdBy"]
- isOneToOne: false
- referencedRelation: "userDefaults"
- referencedColumns: ["userId"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_salesOrderLineId_fkey"
- columns: ["salesOrderLineId"]
- isOneToOne: false
- referencedRelation: "openSalesOrderLines"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_salesOrderLineId_fkey"
- columns: ["salesOrderLineId"]
- isOneToOne: false
- referencedRelation: "salesOrderLine"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_salesOrderLineId_fkey"
- columns: ["salesOrderLineId"]
- isOneToOne: false
- referencedRelation: "salesOrderLines"
- referencedColumns: ["id"]
- },
- {
- foreignKeyName: "shipmentFixedAssetLine_shipmentId_fkey"
- columns: ["shipmentId"]
- isOneToOne: false
- referencedRelation: "shipment"
- referencedColumns: ["id"]
- },
- ]
- }
shipmentLine: {
Row: {
companyId: string
@@ -46919,7 +45744,6 @@ export type Database = {
createdBy: string
customFields: Json | null
defaultStandardFactor: Database["public"]["Enums"]["factor"]
- departmentId: string | null
description: string | null
id: string
laborRate: number
@@ -46939,7 +45763,6 @@ export type Database = {
createdBy: string
customFields?: Json | null
defaultStandardFactor?: Database["public"]["Enums"]["factor"]
- departmentId?: string | null
description?: string | null
id?: string
laborRate?: number
@@ -46959,7 +45782,6 @@ export type Database = {
createdBy?: string
customFields?: Json | null
defaultStandardFactor?: Database["public"]["Enums"]["factor"]
- departmentId?: string | null
description?: string | null
id?: string
laborRate?: number
@@ -47036,13 +45858,6 @@ export type Database = {
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "workCenter_departmentId_fkey"
- columns: ["departmentId"]
- isOneToOne: false
- referencedRelation: "department"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "workCenter_locationId_fkey"
columns: ["locationId"]
@@ -53007,14 +51822,14 @@ export type Database = {
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["id"]
+ columns: ["supplierLocationId"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["supplierLocationId"]
+ columns: ["id"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
@@ -53458,8 +52273,6 @@ export type Database = {
accountId: string | null
accountName: string | null
assetId: string | null
- assetName: string | null
- assetReadableId: string | null
companyId: string | null
conversionFactor: number | null
costCenterId: string | null
@@ -54122,8 +52935,6 @@ export type Database = {
accountId: string | null
accountName: string | null
assetId: string | null
- assetName: string | null
- assetReadableId: string | null
autodeskUrn: string | null
companyId: string | null
conversionFactor: number | null
@@ -54202,13 +53013,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "purchaseOrderLine_assetId_fkey"
- columns: ["assetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "purchaseOrderLine_costCenterId_fkey"
columns: ["costCenterId"]
@@ -54509,14 +53313,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["supplierCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["supplierCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -57588,8 +56392,6 @@ export type Database = {
accountId: string | null
addOnCost: number | null
assetId: string | null
- assetName: string | null
- assetReadableId: string | null
companyId: string | null
convertedAddOnCost: number | null
convertedNonTaxableAddOnCost: number | null
@@ -57648,13 +56450,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "salesInvoiceLine_assetId_fkey"
- columns: ["assetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "salesInvoiceLine_companyId_fkey"
columns: ["companyId"]
@@ -57936,7 +56731,7 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["shipmentCountryCode"]
+ columns: ["invoiceCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -57950,7 +56745,7 @@ export type Database = {
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["invoiceCountryCode"]
+ columns: ["shipmentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -58232,8 +57027,6 @@ export type Database = {
accountId: string | null
addOnCost: number | null
assetId: string | null
- assetName: string | null
- assetReadableId: string | null
autodeskUrn: string | null
companyId: string | null
convertedAddOnCost: number | null
@@ -58328,13 +57121,6 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
- {
- foreignKeyName: "salesOrderLine_assetId_fkey"
- columns: ["assetId"]
- isOneToOne: false
- referencedRelation: "fixedAsset"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "salesOrderLine_createdBy_fkey"
columns: ["createdBy"]
@@ -58517,14 +57303,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["paymentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["paymentCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -61526,8 +60312,6 @@ export type Database = {
createdBy: string | null
customFields: Json | null
defaultStandardFactor: Database["public"]["Enums"]["factor"] | null
- departmentId: string | null
- departmentName: string | null
description: string | null
id: string | null
laborRate: number | null
@@ -61606,13 +60390,6 @@ export type Database = {
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "workCenter_departmentId_fkey"
- columns: ["departmentId"]
- isOneToOne: false
- referencedRelation: "department"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "workCenter_locationId_fkey"
columns: ["locationId"]
@@ -61674,7 +60451,6 @@ export type Database = {
createdBy: string | null
customFields: Json | null
defaultStandardFactor: Database["public"]["Enums"]["factor"] | null
- departmentId: string | null
description: string | null
id: string | null
isBlocked: boolean | null
@@ -61753,13 +60529,6 @@ export type Database = {
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
- {
- foreignKeyName: "workCenter_departmentId_fkey"
- columns: ["departmentId"]
- isOneToOne: false
- referencedRelation: "department"
- referencedColumns: ["id"]
- },
{
foreignKeyName: "workCenter_locationId_fkey"
columns: ["locationId"]
@@ -64009,10 +62778,6 @@ export type Database = {
customRuleTargetType: "item" | "storageUnit" | "workCenter"
deadlineType: "No Deadline" | "ASAP" | "Soft Deadline" | "Hard Deadline"
demandSourceType: "Sales Order" | "Job Material"
- depreciationMethod:
- | "Straight Line"
- | "Declining Balance"
- | "Units of Production"
dimensionEntityType:
| "Custom"
| "Location"
@@ -64022,10 +62787,6 @@ export type Database = {
| "Department"
| "Employee"
| "CostCenter"
- | "WorkCenter"
- | "Process"
- | "FixedAssetClass"
- disposalMethod: "Sale" | "Scrapping"
disposition:
| "Conditional Acceptance"
| "Deviation Accepted"
@@ -64106,7 +62867,6 @@ export type Database = {
| "Seconds/Piece"
| "Total Hours"
| "Total Minutes"
- fixedAssetStatus: "Draft" | "Active" | "Fully Depreciated" | "Disposed"
fulfillmentType: "Inventory" | "Job"
gaugeCalibrationStatus:
| "Pending"
@@ -64227,8 +62987,6 @@ export type Database = {
| "Job Receipt"
| "Production Event"
| "Job Close"
- | "Asset Depreciation"
- | "Asset Disposal"
journalEntryStatus: "Draft" | "Posted" | "Reversed"
journalLineDocumentType:
| "Receipt"
@@ -64247,8 +63005,6 @@ export type Database = {
| "Production Event"
| "Job Close"
kanbanOutput: "label" | "qrcode" | "url"
- macrsConvention: "Half-Year" | "Mid-Quarter"
- macrsPropertyClass: "3" | "5" | "7" | "10" | "15" | "20" | "27.5" | "39"
maintenanceDispatchPriority: "Low" | "Medium" | "High" | "Critical"
maintenanceDispatchStatus:
| "Open"
@@ -64510,7 +63266,6 @@ export type Database = {
supplierStatusType: "Active" | "Inactive" | "Pending" | "Rejected"
supplySourceType: "Purchase Order" | "Production Order"
tableViewType: "Public" | "Private"
- taxDepreciationMethod: "Straight Line" | "Declining Balance" | "MACRS"
taxExemptionReason:
| "Resale"
| "Government"
@@ -65277,11 +64032,6 @@ export const Constants = {
customRuleTargetType: ["item", "storageUnit", "workCenter"],
deadlineType: ["No Deadline", "ASAP", "Soft Deadline", "Hard Deadline"],
demandSourceType: ["Sales Order", "Job Material"],
- depreciationMethod: [
- "Straight Line",
- "Declining Balance",
- "Units of Production",
- ],
dimensionEntityType: [
"Custom",
"Location",
@@ -65291,11 +64041,7 @@ export const Constants = {
"Department",
"Employee",
"CostCenter",
- "WorkCenter",
- "Process",
- "FixedAssetClass",
],
- disposalMethod: ["Sale", "Scrapping"],
disposition: [
"Conditional Acceptance",
"Deviation Accepted",
@@ -65383,7 +64129,6 @@ export const Constants = {
"Total Hours",
"Total Minutes",
],
- fixedAssetStatus: ["Draft", "Active", "Fully Depreciated", "Disposed"],
fulfillmentType: ["Inventory", "Job"],
gaugeCalibrationStatus: [
"Pending",
@@ -65514,8 +64259,6 @@ export const Constants = {
"Job Receipt",
"Production Event",
"Job Close",
- "Asset Depreciation",
- "Asset Disposal",
],
journalEntryStatus: ["Draft", "Posted", "Reversed"],
journalLineDocumentType: [
@@ -65536,8 +64279,6 @@ export const Constants = {
"Job Close",
],
kanbanOutput: ["label", "qrcode", "url"],
- macrsConvention: ["Half-Year", "Mid-Quarter"],
- macrsPropertyClass: ["3", "5", "7", "10", "15", "20", "27.5", "39"],
maintenanceDispatchPriority: ["Low", "Medium", "High", "Critical"],
maintenanceDispatchStatus: [
"Open",
@@ -65825,7 +64566,6 @@ export const Constants = {
supplierStatusType: ["Active", "Inactive", "Pending", "Rejected"],
supplySourceType: ["Purchase Order", "Production Order"],
tableViewType: ["Public", "Private"],
- taxDepreciationMethod: ["Straight Line", "Declining Balance", "MACRS"],
taxExemptionReason: [
"Resale",
"Government",