feat: เพิ่ม type
This commit is contained in:
parent
3ad024e6f5
commit
0815dd19ee
1 changed files with 17 additions and 11 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Status } from '../types';
|
||||
import { Pagination } from 'src/stores/types';
|
||||
import { Pagination, UpdatedBy, CreatedBy } from 'src/stores/types';
|
||||
|
||||
export type ServiceAndProduct =
|
||||
| (Service & { type: 'service' })
|
||||
|
|
@ -8,9 +8,9 @@ export type ServiceAndProduct =
|
|||
export interface Service {
|
||||
productTypeId: string;
|
||||
updatedAt: string;
|
||||
updatedBy: string;
|
||||
updatedBy: UpdatedBy;
|
||||
createdAt: string;
|
||||
createdBy: string;
|
||||
createdBy: CreatedBy;
|
||||
status: Status;
|
||||
attributes: Attributes;
|
||||
detail: string;
|
||||
|
|
@ -19,6 +19,7 @@ export interface Service {
|
|||
id: string;
|
||||
work: Work[];
|
||||
imageUrl: string;
|
||||
registeredBranchId: string;
|
||||
}
|
||||
|
||||
export interface WorkCreate {
|
||||
|
|
@ -54,6 +55,7 @@ export interface ServiceCreate {
|
|||
image?: File;
|
||||
status?: Status;
|
||||
productTypeId: string;
|
||||
registeredBranchId: string;
|
||||
}
|
||||
|
||||
export interface Attributes {
|
||||
|
|
@ -69,9 +71,9 @@ export type AdditionalType = 'string' | 'number' | 'date' | 'array';
|
|||
export interface ServiceById {
|
||||
work: (Work & { productOnWork: ProductOnWork[] })[];
|
||||
updatedAt: string;
|
||||
updatedBy: string;
|
||||
updatedBy: UpdatedBy;
|
||||
createdAt: string;
|
||||
createdBy: string;
|
||||
createdBy: CreatedBy;
|
||||
status: Status;
|
||||
attributes: Attributes;
|
||||
detail: string;
|
||||
|
|
@ -80,14 +82,16 @@ export interface ServiceById {
|
|||
id: string;
|
||||
imageUrl: 'string';
|
||||
productTypeId: string;
|
||||
registeredBranchId: string;
|
||||
}
|
||||
|
||||
export interface ProductOnWork {
|
||||
product: ProductList;
|
||||
registeredBranchId: string;
|
||||
updatedAt: string;
|
||||
updatedBy: string;
|
||||
updatedBy: UpdatedBy;
|
||||
createdAt: string;
|
||||
createdBy: string;
|
||||
createdBy: CreatedBy;
|
||||
productId: string;
|
||||
workId: string;
|
||||
order: number;
|
||||
|
|
@ -103,9 +107,9 @@ export interface WorkItems {
|
|||
export interface ProductList {
|
||||
remark: string;
|
||||
updatedAt: string;
|
||||
updatedBy: string;
|
||||
updatedBy: UpdatedBy;
|
||||
createdAt: string;
|
||||
createdBy: string;
|
||||
createdBy: CreatedBy;
|
||||
productTypeId: string;
|
||||
status: Status;
|
||||
serviceCharge: number;
|
||||
|
|
@ -117,9 +121,11 @@ export interface ProductList {
|
|||
code: string;
|
||||
id: string;
|
||||
imageUrl: string;
|
||||
registeredBranchId: string;
|
||||
}
|
||||
|
||||
export interface ProductCreate {
|
||||
registeredBranchId: string;
|
||||
productTypeId: string;
|
||||
remark: string;
|
||||
serviceCharge: number;
|
||||
|
|
@ -154,9 +160,9 @@ export type ProductGroup = {
|
|||
detail: string;
|
||||
remark: string;
|
||||
status: Status;
|
||||
createdBy: string;
|
||||
createdBy: CreatedBy;
|
||||
createdAt: string;
|
||||
updatedBy: string;
|
||||
updatedBy: UpdatedBy;
|
||||
updatedAt: string;
|
||||
_count: { product: number; type: number; service: number };
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue