79 lines
1.7 KiB
TypeScript
79 lines
1.7 KiB
TypeScript
export interface Location {
|
|
id: number, // integer
|
|
cabinet: string | null,
|
|
drawer: string | null,
|
|
bin: string | null,
|
|
}
|
|
export const locationColumns = [
|
|
// id omitted on purpose
|
|
"cabinet",
|
|
"drawer",
|
|
"bin",
|
|
] as const satisfies (keyof Location)[];
|
|
|
|
export interface Component {
|
|
id: number, // integer
|
|
partNumber: string,
|
|
manufacturer: string | null,
|
|
description: string | null,
|
|
packaging: string | null,
|
|
category: string | null,
|
|
package: string | null,
|
|
value: string | null,
|
|
quantity: number, // integer
|
|
unit: string,
|
|
location: number | null, // integer
|
|
datasheet: string | null,
|
|
}
|
|
export const componentColumns = [
|
|
// id omitted on purpose
|
|
"partNumber",
|
|
"manufacturer",
|
|
"description",
|
|
"packaging",
|
|
"category",
|
|
"package",
|
|
"value",
|
|
"quantity",
|
|
"unit",
|
|
"location",
|
|
"datasheet",
|
|
] as const satisfies (keyof Component)[];
|
|
|
|
export interface Project {
|
|
id: number, // integer
|
|
name: string,
|
|
}
|
|
export const projectColumns = [
|
|
"name",
|
|
] as const satisfies (keyof Project)[];
|
|
|
|
export interface ProjectComponent {
|
|
project: number, // integer
|
|
component: number, // integer
|
|
quantity: number, // integer
|
|
}
|
|
export const projectComponentColumns = [
|
|
"project",
|
|
"component",
|
|
"quantity",
|
|
] as const satisfies (keyof ProjectComponent)[];
|
|
|
|
export interface Movement {
|
|
id: number, // integer
|
|
component: number, // integer
|
|
quantity: number, // integer
|
|
date: number | null, // integer
|
|
reason: string | null,
|
|
project: number | null, // integer
|
|
price: number | null, // integer
|
|
}
|
|
export const movementColumns = [
|
|
"component",
|
|
"quantity",
|
|
"date",
|
|
"reason",
|
|
"project",
|
|
"price",
|
|
] as const satisfies (keyof Movement)[];
|