feat: 账单模块

This commit is contained in:
archer
2023-03-21 18:04:39 +08:00
parent 42c26bd155
commit 129f3a2a30
11 changed files with 190 additions and 37 deletions

10
src/types/index.d.ts vendored
View File

@@ -3,4 +3,12 @@ import type { Mongoose } from 'mongoose';
declare global {
var mongodb: Mongoose | string | null;
}
export {};
export type PagingData<T> = {
pageNum;
pageSize;
data: T[];
total;
};
export type RequestPaging = { pageNum: number; pageSize: number };

View File

@@ -75,3 +75,12 @@ export interface ChatPopulate extends ChatSchema {
userId: UserModelSchema;
modelId: ModelSchema;
}
export interface BillSchema {
_id: string;
userId: string;
chatId: string;
time: number;
textLen: number;
price: number;
}

9
src/types/user.d.ts vendored
View File

@@ -19,3 +19,12 @@ export interface UserUpdateParams {
value: string;
}[];
}
export interface UserBillType {
id: string;
time: string;
textLen: number;
userId: string;
chatId: string;
price: number;
}