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 { Status } from '../types';
|
||||||
import { Pagination } from 'src/stores/types';
|
import { Pagination, UpdatedBy, CreatedBy } from 'src/stores/types';
|
||||||
|
|
||||||
export type ServiceAndProduct =
|
export type ServiceAndProduct =
|
||||||
| (Service & { type: 'service' })
|
| (Service & { type: 'service' })
|
||||||
|
|
@ -8,9 +8,9 @@ export type ServiceAndProduct =
|
||||||
export interface Service {
|
export interface Service {
|
||||||
productTypeId: string;
|
productTypeId: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
updatedBy: string;
|
updatedBy: UpdatedBy;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
createdBy: string;
|
createdBy: CreatedBy;
|
||||||
status: Status;
|
status: Status;
|
||||||
attributes: Attributes;
|
attributes: Attributes;
|
||||||
detail: string;
|
detail: string;
|
||||||
|
|
@ -19,6 +19,7 @@ export interface Service {
|
||||||
id: string;
|
id: string;
|
||||||
work: Work[];
|
work: Work[];
|
||||||
imageUrl: string;
|
imageUrl: string;
|
||||||
|
registeredBranchId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WorkCreate {
|
export interface WorkCreate {
|
||||||
|
|
@ -54,6 +55,7 @@ export interface ServiceCreate {
|
||||||
image?: File;
|
image?: File;
|
||||||
status?: Status;
|
status?: Status;
|
||||||
productTypeId: string;
|
productTypeId: string;
|
||||||
|
registeredBranchId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Attributes {
|
export interface Attributes {
|
||||||
|
|
@ -69,9 +71,9 @@ export type AdditionalType = 'string' | 'number' | 'date' | 'array';
|
||||||
export interface ServiceById {
|
export interface ServiceById {
|
||||||
work: (Work & { productOnWork: ProductOnWork[] })[];
|
work: (Work & { productOnWork: ProductOnWork[] })[];
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
updatedBy: string;
|
updatedBy: UpdatedBy;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
createdBy: string;
|
createdBy: CreatedBy;
|
||||||
status: Status;
|
status: Status;
|
||||||
attributes: Attributes;
|
attributes: Attributes;
|
||||||
detail: string;
|
detail: string;
|
||||||
|
|
@ -80,14 +82,16 @@ export interface ServiceById {
|
||||||
id: string;
|
id: string;
|
||||||
imageUrl: 'string';
|
imageUrl: 'string';
|
||||||
productTypeId: string;
|
productTypeId: string;
|
||||||
|
registeredBranchId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductOnWork {
|
export interface ProductOnWork {
|
||||||
product: ProductList;
|
product: ProductList;
|
||||||
|
registeredBranchId: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
updatedBy: string;
|
updatedBy: UpdatedBy;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
createdBy: string;
|
createdBy: CreatedBy;
|
||||||
productId: string;
|
productId: string;
|
||||||
workId: string;
|
workId: string;
|
||||||
order: number;
|
order: number;
|
||||||
|
|
@ -103,9 +107,9 @@ export interface WorkItems {
|
||||||
export interface ProductList {
|
export interface ProductList {
|
||||||
remark: string;
|
remark: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
updatedBy: string;
|
updatedBy: UpdatedBy;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
createdBy: string;
|
createdBy: CreatedBy;
|
||||||
productTypeId: string;
|
productTypeId: string;
|
||||||
status: Status;
|
status: Status;
|
||||||
serviceCharge: number;
|
serviceCharge: number;
|
||||||
|
|
@ -117,9 +121,11 @@ export interface ProductList {
|
||||||
code: string;
|
code: string;
|
||||||
id: string;
|
id: string;
|
||||||
imageUrl: string;
|
imageUrl: string;
|
||||||
|
registeredBranchId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductCreate {
|
export interface ProductCreate {
|
||||||
|
registeredBranchId: string;
|
||||||
productTypeId: string;
|
productTypeId: string;
|
||||||
remark: string;
|
remark: string;
|
||||||
serviceCharge: number;
|
serviceCharge: number;
|
||||||
|
|
@ -154,9 +160,9 @@ export type ProductGroup = {
|
||||||
detail: string;
|
detail: string;
|
||||||
remark: string;
|
remark: string;
|
||||||
status: Status;
|
status: Status;
|
||||||
createdBy: string;
|
createdBy: CreatedBy;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedBy: string;
|
updatedBy: UpdatedBy;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
_count: { product: number; type: number; service: number };
|
_count: { product: number; type: number; service: number };
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue