felicity-lims/webapp/models/storage.ts

95 lines
2 KiB
TypeScript
Raw Normal View History

import { ISample } from "./analysis"
import { IUser } from "./auth"
export interface IStoreRoom {
2023-03-19 23:21:32 +08:00
uid?: string;
name?: String;
description?: String;
createdAt?: Date;
2023-03-19 23:21:32 +08:00
createdByUid?: string;
createdBy?: IUser;
updatedAt?: Date;
2023-03-19 23:21:32 +08:00
updatedByUid?: string;
updatedBy?: IUser;
children?: IStorageLocation[];
tag?: string;
isOpen?: boolean;
isFolder?: boolean;
}
export interface IStorageLocation {
2023-03-19 23:21:32 +08:00
uid?: string;
name?: String;
description?: String;
2023-03-19 23:21:32 +08:00
storeRoomUid?: string;
storeRoom?: IStoreRoom;
createdAt?: Date;
2023-03-19 23:21:32 +08:00
createdByUid?: string;
createdBy?: IUser;
updatedAt?: Date;
2023-03-19 23:21:32 +08:00
updatedByUid?: string;
updatedBy?: IUser;
children?: IStorageSection[],
tag?: string,
isOpen?: boolean;
isFolder?: boolean;
}
export interface IStorageSection {
2023-03-19 23:21:32 +08:00
uid?: string;
name?: String;
description?: String;
2023-03-19 23:21:32 +08:00
storageLocationUid?: string;
storageLocation?: IStorageLocation;
createdAt?: Date;
2023-03-19 23:21:32 +08:00
createdByUid?: string;
createdBy?: IUser;
updatedAt?: Date;
2023-03-19 23:21:32 +08:00
updatedByUid?: string;
updatedBy?: IUser;
children?: IStorageContainer[],
tag?: string,
isOpen?: boolean;
isFolder?: boolean;
}
export interface IStorageContainer {
2023-03-19 23:21:32 +08:00
uid?: string;
name?: String;
description?: String;
2023-03-19 23:21:32 +08:00
storageSectionUid?: string;
storageSection?: IStorageSection;
grid?: boolean;
rowWise?: boolean;
cols?: number;
rows?: number;
slots?: number;
2023-01-15 14:04:29 +08:00
storedCount?: number;
samples?: ISample[];
createdAt?: Date;
2023-03-19 23:21:32 +08:00
createdByUid?: string;
createdBy?: IUser;
updatedAt?: Date;
2023-03-19 23:21:32 +08:00
updatedByUid?: string;
updatedBy?: IUser;
tag?: string,
isOpen?: boolean;
isFolder?: boolean;
}
interface IActivePath {
room?: number,
location?: number,
section?: number,
container?: number,
}
export interface ITreeData {
treeData: IStoreRoom[]
activePath: IActivePath,
activeTree: IStoreRoom | IStorageLocation | IStorageSection | IStorageContainer
}