TS fixes
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
|||||||
|
|
||||||
import { tenants } from "./tenants"
|
import { tenants } from "./tenants"
|
||||||
import { vehicles } from "./vehicles"
|
import { vehicles } from "./vehicles"
|
||||||
import { inventoryItems } from "./inventoryitems"
|
import { inventoryitems } from "./inventoryitems"
|
||||||
import { authUsers } from "./auth_users"
|
import { authUsers } from "./auth_users"
|
||||||
|
|
||||||
export const checks = pgTable("checks", {
|
export const checks = pgTable("checks", {
|
||||||
@@ -26,7 +26,7 @@ export const checks = pgTable("checks", {
|
|||||||
// ❌ profile removed (old 0_profiles reference)
|
// ❌ profile removed (old 0_profiles reference)
|
||||||
|
|
||||||
inventoryItem: bigint("inventoryitem", { mode: "number" })
|
inventoryItem: bigint("inventoryitem", { mode: "number" })
|
||||||
.references(() => inventoryItems.id),
|
.references(() => inventoryitems.id),
|
||||||
|
|
||||||
tenant: bigint("tenant", { mode: "number" })
|
tenant: bigint("tenant", { mode: "number" })
|
||||||
.references(() => tenants.id),
|
.references(() => tenants.id),
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import { plants } from "./plants"
|
|||||||
import { createddocuments } from "./createddocuments"
|
import { createddocuments } from "./createddocuments"
|
||||||
import { vehicles } from "./vehicles"
|
import { vehicles } from "./vehicles"
|
||||||
import { products } from "./products"
|
import { products } from "./products"
|
||||||
import { inventoryItems } from "./inventoryitems"
|
import { inventoryitems } from "./inventoryitems"
|
||||||
import { folders } from "./folders"
|
import { folders } from "./folders"
|
||||||
import { filetags } from "./filetags"
|
import { filetags } from "./filetags"
|
||||||
import { authUsers } from "./auth_users"
|
import { authUsers } from "./auth_users"
|
||||||
@@ -51,7 +51,7 @@ export const files = pgTable("files", {
|
|||||||
|
|
||||||
check: uuid("check").references(() => checks.id),
|
check: uuid("check").references(() => checks.id),
|
||||||
|
|
||||||
inventoryitem: bigint("inventoryitem", { mode: "number" }).references(() => inventoryItems.id),
|
inventoryitem: bigint("inventoryitem", { mode: "number" }).references(() => inventoryitems.id),
|
||||||
|
|
||||||
folder: uuid("folder").references(() => folders.id),
|
folder: uuid("folder").references(() => folders.id),
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { projects } from "./projects"
|
|||||||
import { plants } from "./plants"
|
import { plants } from "./plants"
|
||||||
import { incominginvoices } from "./incominginvoices"
|
import { incominginvoices } from "./incominginvoices"
|
||||||
import { contacts } from "./contacts"
|
import { contacts } from "./contacts"
|
||||||
import { inventoryItems } from "./inventoryitems"
|
import { inventoryitems } from "./inventoryitems"
|
||||||
import { products } from "./products"
|
import { products } from "./products"
|
||||||
import { tasks } from "./tasks"
|
import { tasks } from "./tasks"
|
||||||
import { vehicles } from "./vehicles"
|
import { vehicles } from "./vehicles"
|
||||||
@@ -75,7 +75,7 @@ export const historyitems = pgTable("historyitems", {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
inventoryitem: bigint("inventoryitem", { mode: "number" }).references(
|
inventoryitem: bigint("inventoryitem", { mode: "number" }).references(
|
||||||
() => inventoryItems.id,
|
() => inventoryitems.id,
|
||||||
{ onDelete: "cascade" }
|
{ onDelete: "cascade" }
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
text,
|
text,
|
||||||
} from "drizzle-orm/pg-core"
|
} from "drizzle-orm/pg-core"
|
||||||
|
|
||||||
import { staffTimeEntries } from "./staff_time_entries"
|
import { stafftimeentries } from "./staff_time_entries"
|
||||||
import {sql} from "drizzle-orm";
|
import {sql} from "drizzle-orm";
|
||||||
|
|
||||||
export const staffTimeEntryConnects = pgTable("staff_time_entry_connects", {
|
export const staffTimeEntryConnects = pgTable("staff_time_entry_connects", {
|
||||||
@@ -15,7 +15,7 @@ export const staffTimeEntryConnects = pgTable("staff_time_entry_connects", {
|
|||||||
|
|
||||||
timeEntryId: uuid("time_entry_id")
|
timeEntryId: uuid("time_entry_id")
|
||||||
.notNull()
|
.notNull()
|
||||||
.references(() => staffTimeEntries.id, { onDelete: "cascade" }),
|
.references(() => stafftimeentries.id, { onDelete: "cascade" }),
|
||||||
|
|
||||||
projectId: bigint("project_id", { mode: "number" }), // referenziert später projects.id
|
projectId: bigint("project_id", { mode: "number" }), // referenziert später projects.id
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
|
|
||||||
import { tenants } from "./tenants"
|
import { tenants } from "./tenants"
|
||||||
import { authProfiles } from "./auth_profiles"
|
import { authProfiles } from "./auth_profiles"
|
||||||
import { staffTimeEntries } from "./staff_time_entries"
|
import { stafftimeentries } from "./staff_time_entries"
|
||||||
|
|
||||||
export const staffZeitstromTimestamps = pgTable("staff_zeitstromtimestamps", {
|
export const staffZeitstromTimestamps = pgTable("staff_zeitstromtimestamps", {
|
||||||
id: uuid("id").primaryKey().defaultRandom(),
|
id: uuid("id").primaryKey().defaultRandom(),
|
||||||
@@ -32,7 +32,7 @@ export const staffZeitstromTimestamps = pgTable("staff_zeitstromtimestamps", {
|
|||||||
time: timestamp("time", { withTimezone: true }).notNull(),
|
time: timestamp("time", { withTimezone: true }).notNull(),
|
||||||
|
|
||||||
staffTimeEntry: uuid("staff_time_entry").references(
|
staffTimeEntry: uuid("staff_time_entry").references(
|
||||||
() => staffTimeEntries.id
|
() => stafftimeentries.id
|
||||||
),
|
),
|
||||||
|
|
||||||
internalNote: text("internal_note"),
|
internalNote: text("internal_note"),
|
||||||
|
|||||||
Reference in New Issue
Block a user