Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Feat/Expenses/RF32: Endpoint for expenseReport data by id" #216

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

16 changes: 13 additions & 3 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
generator client {
provider = "prisma-client-js"
previewFeatures = ["omitApi"]
}

datasource db {
Expand Down Expand Up @@ -105,24 +104,35 @@ model expense {
created_at DateTime @default(now()) @db.Timestamp(6)
updated_at DateTime? @updatedAt @db.Timestamp(6)
id_report String @db.Uuid
url_file String? @db.VarChar(512)
id_file String? @db.Uuid
file file? @relation(fields: [id_file], references: [id], onDelete: NoAction, onUpdate: NoAction)
expense_report expense_report @relation(fields: [id_report], references: [id], onDelete: NoAction, onUpdate: NoAction)
}

model expense_report {
id String @id @db.Uuid
title String @db.VarChar(70)
description String @db.VarChar(255)
start_date DateTime @db.Date
end_date DateTime? @db.Date
status String? @db.VarChar(256)
total_amount Decimal? @db.Decimal(8, 2)
created_at DateTime @default(now()) @db.Timestamp(6)
updated_at DateTime? @updatedAt @db.Timestamp(6)
id_employee String @db.Uuid
expense expense[]
employee employee @relation(fields: [id_employee], references: [id], onDelete: NoAction, onUpdate: NoAction)
}

model file {
id String @id @db.Uuid
description String? @db.VarChar(256)
format String @default(".zip") @db.VarChar(256)
url String @unique @db.VarChar(256)
created_at DateTime @default(now()) @db.Timestamp(6)
updated_at DateTime? @updatedAt @db.Timestamp(6)
expense expense[]
}

model form {
id String @id @db.Uuid
title String @db.VarChar(70)
Expand Down
30 changes: 0 additions & 30 deletions src/api/controllers/expense.controller.ts

This file was deleted.

11 changes: 0 additions & 11 deletions src/api/routes/expense.routes.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/api/routes/index.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { AdminRouter } from './admin.routes';
import { CompanyRouter } from './company.routes';
import { DepartmentRouter } from './department.routes';
import { EmployeeRouter } from './employee.routes';
import { ExpenseRouter } from './expense.routes';
import { HomeRouter } from './home.routes';
import { NotificationRouter } from './notification.routes';
import { ProjectRouter } from './project.routes';
Expand Down Expand Up @@ -40,9 +39,6 @@ baseRouter.use(`${V1_PATH}/company`, CompanyRouter);
// Notification
baseRouter.use(`${V1_PATH}/notification`, NotificationRouter);

// Expense
baseRouter.use(`${V1_PATH}/expense`, ExpenseRouter);

// Health check
baseRouter.use(`${V1_PATH}/health`, (_req, res) => res.send('OK'));

Expand Down
77 changes: 0 additions & 77 deletions src/core/app/services/__tests__/expense.service.test.ts

This file was deleted.

45 changes: 0 additions & 45 deletions src/core/app/services/expense.service.ts

This file was deleted.

Loading
Loading