refactor: add type

This commit is contained in:
Net 2024-07-25 11:07:28 +07:00
parent cc7d6b0a24
commit e0f8f49fda

View file

@ -69,10 +69,28 @@ export interface Attributes {
additional: {
fieldName: string | null;
type: AdditionalType | null;
ability?: Record<AdditionalType, Ability[AdditionalType]>;
}[];
}
export interface Ability {
string?: {
phoneNumber: {
length: number;
};
};
number?: {
comma?: boolean;
decimal?: {
point: number;
};
};
date?: string | null;
array?: string[] | null;
}
export type AdditionalType = 'string' | 'number' | 'date' | 'array';
// Product
export interface ServiceById {