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

001 create a detailed description for the data layer #11

Merged
Merged
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
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,41 @@
Purs-Android is an android version of the test application which is concidered as a "Take Home Assignment"

# Requirements
## Data Layer

### Connection
- The application must have connection to the internet to retrieve the working hours
- If no connection, the error should be displayed notifying user that he has no connection to the internet
- If connection lost during request, the error should be displayed notifying a user that connection to the endpoint failed
- If there is no connection or the connection is lost while retrieving data from a remote computer, the cached data, if any, should be displayed

### Cache
- When application successfully retrieved the data from remote that data should be persisted on the device for further usage if needed
- Every time user opens application the cache should be updated in order to keep data fresh

### Data format
#### Cloud
The JSON structure contains location structure so the DTO for **location** should be created with the following fields
- Location name – _String_
- List of working days – _Collection_

The **working day** structure should contain the following fields:
- Day of week – _String_
- Start local time – _String_
- End local time – _String_

#### Cache
The cached structure should be similar to the cloud. There should be 2 entities: **location** and **working hours**. The location structure should contain location id which can be an integer, and the location name which is the String.

Location
- `LocationId` – _Int_
- `LocationName` – _String_

Working hours
- `WorkDayName` – _String_
- `StartTime` – _String_
- `EndTime` – _String_
- `LocationId` – _Int_ (a foreign key pointing a location associated with it)

# UI Design

Expand Down
Loading