@pisell/pisellos
Version:
一个可扩展的前端模块化SDK框架,支持插件系统
69 lines (68 loc) • 1.89 kB
TypeScript
import { ProductList, CartModule, AccountListModule, OrderModule } from '../../modules';
import { CustomerModule } from '../../modules/Customer';
export interface BookingTicketState {
cart: CartModule;
products: ProductList;
accountList: AccountListModule;
customer: CustomerModule;
order: OrderModule;
}
export declare function createModule<T extends keyof BookingTicketState>(moduleName: T, solutionName: string, name?: string, version?: string): BookingTicketState[T];
export declare enum BookingTicketHooks {
onInited = "bookingTicket:onInited",
onDestroy = "bookingTicket:onDestroy",
onProductsLoaded = "bookingTicket:onProductsLoaded",
onCustomerSelected = "bookingTicket:onCustomerSelected",
onCustomerListUpdate = "bookingTicket:onCustomerListUpdate",
onCustomerListReset = "bookingTicket:onCustomerListReset"
}
/**
* 获取客户列表的参数
*/
export interface IGetCustomerListParams {
/** 页码 */
skip?: number;
/** 每页数量 */
num?: number;
/** 搜索关键词 */
search?: string;
/** 其他筛选参数 */
[]: any;
}
/**
* 客户信息
*/
export interface ICustomer {
/** 客户ID */
id: string | number;
/** 客户姓名 */
name: string;
/** 客户电话 */
phone?: string;
/** 客户邮箱 */
email?: string;
/** 其他客户信息 */
[]: any;
}
/**
* 加载商品列表的参数
*/
export interface ILoadProductsParams {
/** 日期 格式:YYYY-MM-DD */
schedule_date?: string;
/** 客户ID */
customer_id?: number;
/** 餐牌列表ID */
menu_list_ids?: number[];
/** 时间 格式:YYYY-MM-DD HH:mm:ss*/
schedule_datetime?: string;
}
/**
* 扫描结果
*/
export interface IScanResult {
status: 'success' | 'fail';
scanType: string;
scanCode: string;
result: any;
}