cloud-erp-school-system / backend

GNU General Public License v3.0
0 stars 0 forks source link

Client Request: Step 03 #15

Closed patricksan closed 3 years ago

patricksan commented 3 years ago

What?

Please, reference to file: /documentation/phases/Phase-01-school-management/01-New Client Request.pdf

This ticket is to create the Model + API from Step 03. This is related to Download and Upload Documents

How?

Expected

captain0612 commented 3 years ago

@patricksan where are these files stored? is it stored on s3 or is the file converted to base64 encrypted string and stored in db ? And also its an one to many relation , correct me if im wrong (1 org can have multiple docs)

patricksan commented 3 years ago

Excellent question. We should create an interface DocumentService and how we save the file should be transparent. Initially we will use a FileSystemDocumentImpl that will save the file locally in a folder configured in the application.properties.

With the time we can create a second implementation, eg: S3DocumentImpl.

Like this way we are safe.

Related to the one to many, that is true. So the client can have multiples files, you can see the screen in the PDF.

But it is very important to noticed that the DocumentService can work completely with no link to client. As we will use this overall in the system, is the others tables that will link to the DocumentTable.

For testing, for example, you can have a postman api that do all the CRUD in the table.

A JUnit is great to implement this.

Let me know if you have more questions.

patricksan commented 3 years ago

Hey @captain0612, do you have any update on this ticket?

patricksan commented 3 years ago