41 lines
826 B
TypeScript
41 lines
826 B
TypeScript
|
import React from "react";
|
||
|
|
||
|
export type Invoice = {
|
||
|
id: string;
|
||
|
customer_id: string;
|
||
|
amount: number;
|
||
|
date: string;
|
||
|
// In TypeScript, this is called a string union type.
|
||
|
// It means that the "status" property can only be one of the two strings: 'pending' or 'paid'.
|
||
|
status: 'pending' | 'paid';
|
||
|
};
|
||
|
type Status={
|
||
|
success:boolean;
|
||
|
code:number ;
|
||
|
message: string;
|
||
|
}
|
||
|
export type ResultPage<T> = {
|
||
|
content:T[];
|
||
|
totalPages:number;
|
||
|
totalElements:number;
|
||
|
|
||
|
}
|
||
|
export type ResponseVO<T>={
|
||
|
data:T;
|
||
|
timeStamp:number;
|
||
|
status:Status;
|
||
|
}
|
||
|
|
||
|
export type DataType ={
|
||
|
key: React.ReactNode;
|
||
|
id: number;
|
||
|
code: string;
|
||
|
name: string;
|
||
|
description: string;
|
||
|
state: number;
|
||
|
priority: number;
|
||
|
type:number;
|
||
|
action?:React.ReactNode;
|
||
|
children: DataType[];
|
||
|
}
|