Skip to content

Commit

Permalink
Merge pull request #216 from Black-Dot-2024/revert-205-feat/RF32-Expe…
Browse files Browse the repository at this point in the history
…nseReportDeets

Revert "Feat/Expenses/RF32: Endpoint for expenseReport data by id"
  • Loading branch information
DHurtado714-itesm authored May 24, 2024
2 parents e748fa3 + 3237ae9 commit 8ec4f0e
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 482 deletions.

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

0 comments on commit 8ec4f0e

Please sign in to comment.