2023-01-02 00:04:52 +08:00
|
|
|
import { IUser } from "./auth"
|
|
|
|
import { IDepartment, ISupplier } from "./setup"
|
|
|
|
import { IStoreRoom } from "./storage";
|
|
|
|
|
|
|
|
export interface IStockItem {
|
2023-03-19 23:21:32 +08:00
|
|
|
uid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
name?: String;
|
2023-03-19 23:21:32 +08:00
|
|
|
departmentUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
department?: IDepartment;
|
|
|
|
description?: String;
|
|
|
|
createdAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
createdByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
createdBy?: IUser;
|
|
|
|
updatedAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
updatedByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
updatedBy?: IUser;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IStockCategory {
|
2023-03-19 23:21:32 +08:00
|
|
|
uid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
name?: String;
|
|
|
|
description?: String;
|
|
|
|
createdAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
createdByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
createdBy?: IUser;
|
|
|
|
updatedAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
updatedByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
updatedBy?: IUser;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IHazard {
|
2023-03-19 23:21:32 +08:00
|
|
|
uid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
name?: String;
|
|
|
|
description?: String;
|
|
|
|
createdAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
createdByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
createdBy?: IUser;
|
|
|
|
updatedAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
updatedByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
updatedBy?: IUser;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IStockUnit {
|
2023-03-19 23:21:32 +08:00
|
|
|
uid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
name?: String;
|
|
|
|
createdAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
createdByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
createdBy?: IUser;
|
|
|
|
updatedAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
updatedByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
updatedBy?: IUser;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IStockPackaging {
|
2023-03-19 23:21:32 +08:00
|
|
|
uid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
name?: String;
|
|
|
|
createdAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
createdByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
createdBy?: IUser;
|
|
|
|
updatedAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
updatedByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
updatedBy?: IUser;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IStockProduct {
|
2023-03-19 23:21:32 +08:00
|
|
|
uid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
name?: String;
|
2023-03-19 23:21:32 +08:00
|
|
|
departmentUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
department?: IDepartment;
|
2023-03-19 23:21:32 +08:00
|
|
|
supplierUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
supplier?: ISupplier;
|
2023-03-19 23:21:32 +08:00
|
|
|
categoryUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
category?: IStockCategory;
|
2023-03-19 23:21:32 +08:00
|
|
|
hazardUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
hazard?: IHazard;
|
2023-03-19 23:21:32 +08:00
|
|
|
storeRoomUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
storeRoom?: IStoreRoom;
|
|
|
|
lotNumber?: String;
|
|
|
|
batch?: String;
|
|
|
|
size?: number;
|
2023-03-19 23:21:32 +08:00
|
|
|
unitUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
unit?: IStockUnit;
|
2023-03-19 23:21:32 +08:00
|
|
|
packagingUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
packaging?: IStockPackaging;
|
|
|
|
price?: number;
|
|
|
|
quantityReceived?: number;
|
|
|
|
minimumLevel?: number;
|
|
|
|
remaining?: number;
|
|
|
|
dateReceived?: Date;
|
|
|
|
expiryDate?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
receivedByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
receivedBy?: IUser;
|
|
|
|
createdAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
createdByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
createdBy?: IUser;
|
|
|
|
updatedAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
updatedByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
updatedBy?: IUser;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IStockOrder {
|
2023-03-19 23:21:32 +08:00
|
|
|
uid?: string;
|
|
|
|
orderByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
orderBy?: IUser;
|
2023-03-19 23:21:32 +08:00
|
|
|
departmentUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
department?: IDepartment;
|
|
|
|
status?: String;
|
|
|
|
remarks?: String;
|
|
|
|
orderNumber?: String;
|
|
|
|
createdAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
createdByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
createdBy?: IUser;
|
|
|
|
updatedAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
updatedByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
updatedBy?: IUser;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IStockOrderProduct {
|
2023-03-19 23:21:32 +08:00
|
|
|
uid?: string;
|
|
|
|
productUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
product?: IStockProduct;
|
2023-03-19 23:21:32 +08:00
|
|
|
orderUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
order?: IStockOrder;
|
|
|
|
price?: number;
|
|
|
|
quantity?: number;
|
|
|
|
createdAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
createdByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
createdBy?: IUser;
|
|
|
|
updatedAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
updatedByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
updatedBy?: IUser;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IStockTransaction {
|
2023-03-19 23:21:32 +08:00
|
|
|
uid?: string;
|
|
|
|
productUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
product?: IStockProduct;
|
|
|
|
issued?: number;
|
2023-03-19 23:21:32 +08:00
|
|
|
departmentUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
department?: IDepartment;
|
|
|
|
dateIssued?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
transactionByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
transactionBy?: IUser;
|
|
|
|
createdAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
createdByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
createdBy?: IUser;
|
|
|
|
updatedAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
updatedByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
updatedBy?: IUser;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IStockAdjustment {
|
2023-03-19 23:21:32 +08:00
|
|
|
uid?: string;
|
|
|
|
productUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
product?: IStockProduct;
|
|
|
|
adjustmentType?: String;
|
|
|
|
adjust?: number;
|
|
|
|
adjustmentDate?: Date;
|
|
|
|
remarks?: String;
|
2023-03-19 23:21:32 +08:00
|
|
|
adjustmentByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
adjustmentBy?: IUser;
|
|
|
|
createdAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
createdByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
createdBy?: IUser;
|
|
|
|
updatedAt?: Date;
|
2023-03-19 23:21:32 +08:00
|
|
|
updatedByUid?: string;
|
2023-01-02 00:04:52 +08:00
|
|
|
updatedBy?: IUser;
|
|
|
|
}
|