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 {
|
export interface Attributes {
|
||||||
additional: {
|
additional: (PropString | PropNumber | PropDate | PropOptions)[];
|
||||||
fieldName: string | null;
|
|
||||||
type: AdditionalType | null;
|
|
||||||
ability?: Record<AdditionalType, Ability[AdditionalType]>;
|
|
||||||
}[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Ability {
|
type PropString = {
|
||||||
string?: {
|
type: 'string';
|
||||||
phoneNumber: {
|
fieldName: string;
|
||||||
length: number;
|
isPhoneNumber: boolean;
|
||||||
};
|
phoneNumberLength: number;
|
||||||
};
|
};
|
||||||
number?: {
|
|
||||||
comma?: boolean;
|
|
||||||
decimal?: {
|
|
||||||
point: number;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
date?: string | null;
|
|
||||||
array?: string[] | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
// Product
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue