Flanderzz / TeamSphere-API

To Be Added
1 stars 2 forks source link

Add User Invite Feature #17

Open Flanderzz opened 6 months ago

Flanderzz commented 6 months ago

Add a feature for users to invite friends to chat

Expectation:

Invite Flow: invite -> create -> communicate -> reminder -> accept | expire

Initiation:

Data Example:

{
   "inviter": {
     "name": "John Doe",
     "email": "john.doe@example.com",
   },
   "invite_id": "123456789",
   "invite_link": "https://example.com/invite/123456789",
   "created_date": "2024-01-15"
   "status": "OPEN",
   "recipients": [
     {
       "email": "recipient1@example.com",
       "status_progress": "SENT",
       "date_sent": "2024-01-15",
       "exp_date": "2024-01-22"
     },
     {
       "email": "recipient2@example.com",
       "status_progress": "ACCEPTED",
       "date_sent": "2024-01-15",
       "exp_date": "2024-01-22"
     },
     {
       "email": "recipient3@example.com",
       "status_progress": "DONE",
       "date_sent": "2024-01-15",
       "exp_date": "2024-01-22"
     },
     {
       "email": "recipient4@example.com",
       "status_progress": "EXPIRED",
       "date_sent": "2024-01-15",
       "exp_date": "2024-01-22"
     }
   ]
 }
Flanderzz commented 5 months ago

Currently here is how flow looks:

DB/Model layer:

Repository Layer:

Service Layer:

Controller Layer: GET /invite/{id}

POST /invite/{id}

Current issues: