feat: complete admin backend controllers and services

- AdminPlansController & Service (CRUD, reorder)
- AdminPaymentMethodsController & Service (CRUD, reorder)
- AdminPaymentsController & Service (verify, reject, pending count)
- AdminUsersController & Service (search, suspend, grant pro access, stats)
- AdminConfigController & Service (dynamic config management)
- Wire all controllers into AdminModule
- Import AdminModule in AppModule

Admin API Routes:
- GET/POST/PUT/DELETE /admin/plans
- GET/POST/PUT/DELETE /admin/payment-methods
- GET /admin/payments (with status filter)
- POST /admin/payments/:id/verify
- POST /admin/payments/:id/reject
- GET /admin/users (with search)
- POST /admin/users/:id/grant-pro
- GET/POST/DELETE /admin/config

All routes protected by AuthGuard + AdminGuard
This commit is contained in:
dwindown
2025-10-11 14:32:45 +07:00
parent 9b789b333f
commit 12850ab12d
53 changed files with 3098 additions and 34 deletions

View File

@@ -13,11 +13,11 @@ export declare class TransactionsController {
id: string;
createdAt: Date;
userId: string;
walletId: string;
date: Date;
amount: import("@prisma/client/runtime/library").Decimal;
direction: string;
date: Date;
memo: string | null;
walletId: string;
recurrenceId: string | null;
}[]>;
create(req: RequestWithUser, walletId: string, body: {
@@ -31,11 +31,11 @@ export declare class TransactionsController {
id: string;
createdAt: Date;
userId: string;
walletId: string;
date: Date;
amount: import("@prisma/client/runtime/library").Decimal;
direction: string;
date: Date;
memo: string | null;
walletId: string;
recurrenceId: string | null;
}>;
exportCsv(req: RequestWithUser, walletId: string, from: string | undefined, to: string | undefined, category: string | undefined, direction: 'in' | 'out' | undefined, res: Response): Promise<void>;
@@ -44,11 +44,11 @@ export declare class TransactionsController {
id: string;
createdAt: Date;
userId: string;
walletId: string;
date: Date;
amount: import("@prisma/client/runtime/library").Decimal;
direction: string;
date: Date;
memo: string | null;
walletId: string;
recurrenceId: string | null;
}>;
delete(req: RequestWithUser, walletId: string, id: string): Promise<{
@@ -56,11 +56,11 @@ export declare class TransactionsController {
id: string;
createdAt: Date;
userId: string;
walletId: string;
date: Date;
amount: import("@prisma/client/runtime/library").Decimal;
direction: string;
date: Date;
memo: string | null;
walletId: string;
recurrenceId: string | null;
}>;
}

View File

@@ -9,11 +9,11 @@ export declare class TransactionsService {
id: string;
createdAt: Date;
userId: string;
walletId: string;
date: Date;
amount: Prisma.Decimal;
direction: string;
date: Date;
memo: string | null;
walletId: string;
recurrenceId: string | null;
}[]>;
listAll(userId: string): Prisma.PrismaPromise<{
@@ -21,11 +21,11 @@ export declare class TransactionsService {
id: string;
createdAt: Date;
userId: string;
walletId: string;
date: Date;
amount: Prisma.Decimal;
direction: string;
date: Date;
memo: string | null;
walletId: string;
recurrenceId: string | null;
}[]>;
listWithFilters(userId: string, walletId: string, filters: {
@@ -38,11 +38,11 @@ export declare class TransactionsService {
id: string;
createdAt: Date;
userId: string;
walletId: string;
date: Date;
amount: Prisma.Decimal;
direction: string;
date: Date;
memo: string | null;
walletId: string;
recurrenceId: string | null;
}[]>;
create(userId: string, walletId: string, input: {
@@ -56,11 +56,11 @@ export declare class TransactionsService {
id: string;
createdAt: Date;
userId: string;
walletId: string;
date: Date;
amount: Prisma.Decimal;
direction: string;
date: Date;
memo: string | null;
walletId: string;
recurrenceId: string | null;
}>;
update(userId: string, walletId: string, id: string, dto: TransactionUpdateDto): Promise<{
@@ -68,11 +68,11 @@ export declare class TransactionsService {
id: string;
createdAt: Date;
userId: string;
walletId: string;
date: Date;
amount: Prisma.Decimal;
direction: string;
date: Date;
memo: string | null;
walletId: string;
recurrenceId: string | null;
}>;
delete(userId: string, walletId: string, id: string): Promise<{
@@ -80,11 +80,11 @@ export declare class TransactionsService {
id: string;
createdAt: Date;
userId: string;
walletId: string;
date: Date;
amount: Prisma.Decimal;
direction: string;
date: Date;
memo: string | null;
walletId: string;
recurrenceId: string | null;
}>;
}