Refactor code structure and dependencies

- Remove unused files and modules
- Update submodule URL for epess-database
- Update DATABASE_URL in compose.yaml
- Update CI workflow to fetch submodules during checkout and fix GITHUB_TOKEN issue
- Enable strict mode in tsconfig.json
- Add UsersService and UsersResolver in users module
- Remove AppService and AppController
- Update main.ts to remove unused imports and log statement
- Add PrismaModule and PrismaService
- Add PrismaContextMiddleware
- Update GraphQL module to use schema and PrismaService
- Update package.json dependencies and devDependencies
This commit is contained in:
2024-09-27 06:21:04 +07:00
parent 8fe5e62870
commit 258a35d364
23 changed files with 4751 additions and 894 deletions

View File

@@ -1,593 +0,0 @@
/* eslint-disable */
import type { Prisma, User, Center, CenterStaff, Service, ServiceAndCategory, Category, ServiceFeedback, Milestone, Schedule, ChatRoom, Message, Order, RefundTicket, Payment, Workshop, WorkshopSubscription, WorkshopOrganization, UploadedDocument, ServiceMeetingRoom, WorkshopMeetingRoom } from "@prisma/client";
export default interface PrismaTypes {
User: {
Name: "User";
Shape: User;
Include: Prisma.UserInclude;
Select: Prisma.UserSelect;
OrderBy: Prisma.UserOrderByWithRelationInput;
WhereUnique: Prisma.UserWhereUniqueInput;
Where: Prisma.UserWhereInput;
Create: {};
Update: {};
RelationName: "orders" | "serviceFeedbacks" | "documents" | "sendingMessage" | "Service" | "center" | "customerChatRoom" | "centerStaffChatRoom" | "CenterStaff" | "WorkshopSubscription";
ListRelations: "orders" | "serviceFeedbacks" | "documents" | "sendingMessage" | "Service" | "customerChatRoom" | "centerStaffChatRoom" | "WorkshopSubscription";
Relations: {
orders: {
Shape: Order[];
Name: "Order";
Nullable: false;
};
serviceFeedbacks: {
Shape: ServiceFeedback[];
Name: "ServiceFeedback";
Nullable: false;
};
documents: {
Shape: UploadedDocument[];
Name: "UploadedDocument";
Nullable: false;
};
sendingMessage: {
Shape: Message[];
Name: "Message";
Nullable: false;
};
Service: {
Shape: Service[];
Name: "Service";
Nullable: false;
};
center: {
Shape: Center | null;
Name: "Center";
Nullable: true;
};
customerChatRoom: {
Shape: ChatRoom[];
Name: "ChatRoom";
Nullable: false;
};
centerStaffChatRoom: {
Shape: ChatRoom[];
Name: "ChatRoom";
Nullable: false;
};
CenterStaff: {
Shape: CenterStaff | null;
Name: "CenterStaff";
Nullable: true;
};
WorkshopSubscription: {
Shape: WorkshopSubscription[];
Name: "WorkshopSubscription";
Nullable: false;
};
};
};
Center: {
Name: "Center";
Shape: Center;
Include: Prisma.CenterInclude;
Select: Prisma.CenterSelect;
OrderBy: Prisma.CenterOrderByWithRelationInput;
WhereUnique: Prisma.CenterWhereUniqueInput;
Where: Prisma.CenterWhereInput;
Create: {};
Update: {};
RelationName: "services" | "centerOwner" | "chatRoom" | "CenterStaff";
ListRelations: "services" | "chatRoom" | "CenterStaff";
Relations: {
services: {
Shape: Service[];
Name: "Service";
Nullable: false;
};
centerOwner: {
Shape: User;
Name: "User";
Nullable: false;
};
chatRoom: {
Shape: ChatRoom[];
Name: "ChatRoom";
Nullable: false;
};
CenterStaff: {
Shape: CenterStaff[];
Name: "CenterStaff";
Nullable: false;
};
};
};
CenterStaff: {
Name: "CenterStaff";
Shape: CenterStaff;
Include: Prisma.CenterStaffInclude;
Select: Prisma.CenterStaffSelect;
OrderBy: Prisma.CenterStaffOrderByWithRelationInput;
WhereUnique: Prisma.CenterStaffWhereUniqueInput;
Where: Prisma.CenterStaffWhereInput;
Create: {};
Update: {};
RelationName: "staff" | "center" | "service" | "createdWorkshop";
ListRelations: "createdWorkshop";
Relations: {
staff: {
Shape: User;
Name: "User";
Nullable: false;
};
center: {
Shape: Center;
Name: "Center";
Nullable: false;
};
service: {
Shape: Service;
Name: "Service";
Nullable: false;
};
createdWorkshop: {
Shape: Workshop[];
Name: "Workshop";
Nullable: false;
};
};
};
Service: {
Name: "Service";
Shape: Service;
Include: Prisma.ServiceInclude;
Select: Prisma.ServiceSelect;
OrderBy: Prisma.ServiceOrderByWithRelationInput;
WhereUnique: Prisma.ServiceWhereUniqueInput;
Where: Prisma.ServiceWhereInput;
Create: {};
Update: {};
RelationName: "managedBy" | "feedbacks" | "order" | "center" | "workshop" | "milestone" | "schedule" | "serviceAndCategory" | "workshopOrganization" | "user";
ListRelations: "managedBy" | "feedbacks" | "order" | "workshop" | "milestone" | "schedule" | "serviceAndCategory" | "workshopOrganization";
Relations: {
managedBy: {
Shape: CenterStaff[];
Name: "CenterStaff";
Nullable: false;
};
feedbacks: {
Shape: ServiceFeedback[];
Name: "ServiceFeedback";
Nullable: false;
};
order: {
Shape: Order[];
Name: "Order";
Nullable: false;
};
center: {
Shape: Center;
Name: "Center";
Nullable: false;
};
workshop: {
Shape: Workshop[];
Name: "Workshop";
Nullable: false;
};
milestone: {
Shape: Milestone[];
Name: "Milestone";
Nullable: false;
};
schedule: {
Shape: Schedule[];
Name: "Schedule";
Nullable: false;
};
serviceAndCategory: {
Shape: ServiceAndCategory[];
Name: "ServiceAndCategory";
Nullable: false;
};
workshopOrganization: {
Shape: WorkshopOrganization[];
Name: "WorkshopOrganization";
Nullable: false;
};
user: {
Shape: User | null;
Name: "User";
Nullable: true;
};
};
};
ServiceAndCategory: {
Name: "ServiceAndCategory";
Shape: ServiceAndCategory;
Include: Prisma.ServiceAndCategoryInclude;
Select: Prisma.ServiceAndCategorySelect;
OrderBy: Prisma.ServiceAndCategoryOrderByWithRelationInput;
WhereUnique: Prisma.ServiceAndCategoryWhereUniqueInput;
Where: Prisma.ServiceAndCategoryWhereInput;
Create: {};
Update: {};
RelationName: "service" | "category";
ListRelations: never;
Relations: {
service: {
Shape: Service;
Name: "Service";
Nullable: false;
};
category: {
Shape: Category;
Name: "Category";
Nullable: false;
};
};
};
Category: {
Name: "Category";
Shape: Category;
Include: Prisma.CategoryInclude;
Select: Prisma.CategorySelect;
OrderBy: Prisma.CategoryOrderByWithRelationInput;
WhereUnique: Prisma.CategoryWhereUniqueInput;
Where: Prisma.CategoryWhereInput;
Create: {};
Update: {};
RelationName: "serviceAndCategory";
ListRelations: "serviceAndCategory";
Relations: {
serviceAndCategory: {
Shape: ServiceAndCategory[];
Name: "ServiceAndCategory";
Nullable: false;
};
};
};
ServiceFeedback: {
Name: "ServiceFeedback";
Shape: ServiceFeedback;
Include: Prisma.ServiceFeedbackInclude;
Select: Prisma.ServiceFeedbackSelect;
OrderBy: Prisma.ServiceFeedbackOrderByWithRelationInput;
WhereUnique: Prisma.ServiceFeedbackWhereUniqueInput;
Where: Prisma.ServiceFeedbackWhereInput;
Create: {};
Update: {};
RelationName: "user" | "service";
ListRelations: never;
Relations: {
user: {
Shape: User;
Name: "User";
Nullable: false;
};
service: {
Shape: Service;
Name: "Service";
Nullable: false;
};
};
};
Milestone: {
Name: "Milestone";
Shape: Milestone;
Include: Prisma.MilestoneInclude;
Select: Prisma.MilestoneSelect;
OrderBy: Prisma.MilestoneOrderByWithRelationInput;
WhereUnique: Prisma.MilestoneWhereUniqueInput;
Where: Prisma.MilestoneWhereInput;
Create: {};
Update: {};
RelationName: "service";
ListRelations: never;
Relations: {
service: {
Shape: Service;
Name: "Service";
Nullable: false;
};
};
};
Schedule: {
Name: "Schedule";
Shape: Schedule;
Include: Prisma.ScheduleInclude;
Select: Prisma.ScheduleSelect;
OrderBy: Prisma.ScheduleOrderByWithRelationInput;
WhereUnique: Prisma.ScheduleWhereUniqueInput;
Where: Prisma.ScheduleWhereInput;
Create: {};
Update: {};
RelationName: "service";
ListRelations: never;
Relations: {
service: {
Shape: Service;
Name: "Service";
Nullable: false;
};
};
};
ChatRoom: {
Name: "ChatRoom";
Shape: ChatRoom;
Include: Prisma.ChatRoomInclude;
Select: Prisma.ChatRoomSelect;
OrderBy: Prisma.ChatRoomOrderByWithRelationInput;
WhereUnique: Prisma.ChatRoomWhereUniqueInput;
Where: Prisma.ChatRoomWhereInput;
Create: {};
Update: {};
RelationName: "message" | "customer" | "center" | "centerStaff" | "meetingRoom";
ListRelations: "message";
Relations: {
message: {
Shape: Message[];
Name: "Message";
Nullable: false;
};
customer: {
Shape: User;
Name: "User";
Nullable: false;
};
center: {
Shape: Center;
Name: "Center";
Nullable: false;
};
centerStaff: {
Shape: User | null;
Name: "User";
Nullable: true;
};
meetingRoom: {
Shape: ServiceMeetingRoom | null;
Name: "ServiceMeetingRoom";
Nullable: true;
};
};
};
Message: {
Name: "Message";
Shape: Message;
Include: Prisma.MessageInclude;
Select: Prisma.MessageSelect;
OrderBy: Prisma.MessageOrderByWithRelationInput;
WhereUnique: Prisma.MessageWhereUniqueInput;
Where: Prisma.MessageWhereInput;
Create: {};
Update: {};
RelationName: "sender" | "chatRoom";
ListRelations: never;
Relations: {
sender: {
Shape: User;
Name: "User";
Nullable: false;
};
chatRoom: {
Shape: ChatRoom;
Name: "ChatRoom";
Nullable: false;
};
};
};
Order: {
Name: "Order";
Shape: Order;
Include: Prisma.OrderInclude;
Select: Prisma.OrderSelect;
OrderBy: Prisma.OrderOrderByWithRelationInput;
WhereUnique: Prisma.OrderWhereUniqueInput;
Where: Prisma.OrderWhereInput;
Create: {};
Update: {};
RelationName: "user" | "payment" | "service" | "refundTicket";
ListRelations: never;
Relations: {
user: {
Shape: User;
Name: "User";
Nullable: false;
};
payment: {
Shape: Payment;
Name: "Payment";
Nullable: false;
};
service: {
Shape: Service;
Name: "Service";
Nullable: false;
};
refundTicket: {
Shape: RefundTicket | null;
Name: "RefundTicket";
Nullable: true;
};
};
};
RefundTicket: {
Name: "RefundTicket";
Shape: RefundTicket;
Include: Prisma.RefundTicketInclude;
Select: Prisma.RefundTicketSelect;
OrderBy: Prisma.RefundTicketOrderByWithRelationInput;
WhereUnique: Prisma.RefundTicketWhereUniqueInput;
Where: Prisma.RefundTicketWhereInput;
Create: {};
Update: {};
RelationName: "order";
ListRelations: never;
Relations: {
order: {
Shape: Order;
Name: "Order";
Nullable: false;
};
};
};
Payment: {
Name: "Payment";
Shape: Payment;
Include: Prisma.PaymentInclude;
Select: Prisma.PaymentSelect;
OrderBy: Prisma.PaymentOrderByWithRelationInput;
WhereUnique: Prisma.PaymentWhereUniqueInput;
Where: Prisma.PaymentWhereInput;
Create: {};
Update: {};
RelationName: "Order";
ListRelations: never;
Relations: {
Order: {
Shape: Order | null;
Name: "Order";
Nullable: true;
};
};
};
Workshop: {
Name: "Workshop";
Shape: Workshop;
Include: Prisma.WorkshopInclude;
Select: Prisma.WorkshopSelect;
OrderBy: Prisma.WorkshopOrderByWithRelationInput;
WhereUnique: Prisma.WorkshopWhereUniqueInput;
Where: Prisma.WorkshopWhereInput;
Create: {};
Update: {};
RelationName: "service" | "workshopOrganization" | "workshopSubscription" | "staff";
ListRelations: "workshopOrganization" | "workshopSubscription";
Relations: {
service: {
Shape: Service;
Name: "Service";
Nullable: false;
};
workshopOrganization: {
Shape: WorkshopOrganization[];
Name: "WorkshopOrganization";
Nullable: false;
};
workshopSubscription: {
Shape: WorkshopSubscription[];
Name: "WorkshopSubscription";
Nullable: false;
};
staff: {
Shape: CenterStaff;
Name: "CenterStaff";
Nullable: false;
};
};
};
WorkshopSubscription: {
Name: "WorkshopSubscription";
Shape: WorkshopSubscription;
Include: Prisma.WorkshopSubscriptionInclude;
Select: Prisma.WorkshopSubscriptionSelect;
OrderBy: Prisma.WorkshopSubscriptionOrderByWithRelationInput;
WhereUnique: Prisma.WorkshopSubscriptionWhereUniqueInput;
Where: Prisma.WorkshopSubscriptionWhereInput;
Create: {};
Update: {};
RelationName: "user" | "workshop";
ListRelations: never;
Relations: {
user: {
Shape: User;
Name: "User";
Nullable: false;
};
workshop: {
Shape: Workshop;
Name: "Workshop";
Nullable: false;
};
};
};
WorkshopOrganization: {
Name: "WorkshopOrganization";
Shape: WorkshopOrganization;
Include: Prisma.WorkshopOrganizationInclude;
Select: Prisma.WorkshopOrganizationSelect;
OrderBy: Prisma.WorkshopOrganizationOrderByWithRelationInput;
WhereUnique: Prisma.WorkshopOrganizationWhereUniqueInput;
Where: Prisma.WorkshopOrganizationWhereInput;
Create: {};
Update: {};
RelationName: "workshop" | "service";
ListRelations: never;
Relations: {
workshop: {
Shape: Workshop;
Name: "Workshop";
Nullable: false;
};
service: {
Shape: Service;
Name: "Service";
Nullable: false;
};
};
};
UploadedDocument: {
Name: "UploadedDocument";
Shape: UploadedDocument;
Include: Prisma.UploadedDocumentInclude;
Select: Prisma.UploadedDocumentSelect;
OrderBy: Prisma.UploadedDocumentOrderByWithRelationInput;
WhereUnique: Prisma.UploadedDocumentWhereUniqueInput;
Where: Prisma.UploadedDocumentWhereInput;
Create: {};
Update: {};
RelationName: "user";
ListRelations: never;
Relations: {
user: {
Shape: User;
Name: "User";
Nullable: false;
};
};
};
ServiceMeetingRoom: {
Name: "ServiceMeetingRoom";
Shape: ServiceMeetingRoom;
Include: Prisma.ServiceMeetingRoomInclude;
Select: Prisma.ServiceMeetingRoomSelect;
OrderBy: Prisma.ServiceMeetingRoomOrderByWithRelationInput;
WhereUnique: Prisma.ServiceMeetingRoomWhereUniqueInput;
Where: Prisma.ServiceMeetingRoomWhereInput;
Create: {};
Update: {};
RelationName: "chattingRoom";
ListRelations: never;
Relations: {
chattingRoom: {
Shape: ChatRoom;
Name: "ChatRoom";
Nullable: false;
};
};
};
WorkshopMeetingRoom: {
Name: "WorkshopMeetingRoom";
Shape: WorkshopMeetingRoom;
Include: never;
Select: Prisma.WorkshopMeetingRoomSelect;
OrderBy: Prisma.WorkshopMeetingRoomOrderByWithRelationInput;
WhereUnique: Prisma.WorkshopMeetingRoomWhereUniqueInput;
Where: Prisma.WorkshopMeetingRoomWhereInput;
Create: {};
Update: {};
RelationName: never;
ListRelations: never;
Relations: {};
};
}

View File