fix: edit type Attributes
This commit is contained in:
parent
417e47d597
commit
ed8dda6c0c
1 changed files with 23 additions and 21 deletions
|
|
@ -66,30 +66,32 @@ export interface ServiceCreate {
|
|||
}
|
||||
|
||||
export interface Attributes {
|
||||
additional: {
|
||||
fieldName: string | null;
|
||||
type: AdditionalType | null;
|
||||
ability?: Record<AdditionalType, Ability[AdditionalType]>;
|
||||
}[];
|
||||
additional: (PropString | PropNumber | PropDate | PropOptions)[];
|
||||
}
|
||||
|
||||
export interface Ability {
|
||||
string?: {
|
||||
phoneNumber: {
|
||||
length: number;
|
||||
};
|
||||
};
|
||||
number?: {
|
||||
comma?: boolean;
|
||||
decimal?: {
|
||||
point: number;
|
||||
};
|
||||
};
|
||||
date?: string | null;
|
||||
array?: string[] | null;
|
||||
}
|
||||
type PropString = {
|
||||
type: 'string';
|
||||
fieldName: string;
|
||||
isPhoneNumber: boolean;
|
||||
phoneNumberLength: number;
|
||||
};
|
||||
|
||||
export type AdditionalType = 'string' | 'number' | 'date' | 'array';
|
||||
type PropNumber = {
|
||||
type: 'number';
|
||||
fieldName: string;
|
||||
comma: boolean;
|
||||
decimalPlace: number;
|
||||
};
|
||||
|
||||
type PropDate = {
|
||||
type: 'date';
|
||||
fieldName: string;
|
||||
};
|
||||
|
||||
type PropOptions = {
|
||||
type: 'array';
|
||||
fieldName: string;
|
||||
};
|
||||
|
||||
// Product
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue