# Data base schema description ### [Db schema](https://drive.google.com/file/d/10A_4GNvSVwx7wj9lZcCpY1anLRADKjQQ/view?usp=sharing) ## users The main client of the site. Could be freelancer or customer * role - enum: * 'client', * 'freelancer' * confidentialSetting - enum: * 'visible' - phone and email will be shown to client, * 'phoneOnly' - email will be hide from client, * 'emailOnly' - phone will be hide from client, * 'hidden' - phone and email will be hide from client) ## forgot_password User can restore his password ## public_file Save user photo * url - url to image in AWS S3 bucket * key - unique key to have access to image ## freelancer Details of user type freelancer * updatedAt - date, when entity is updates date change automaticly ## education Describe freelancer's education ## experience Describe freelancer's experience ## category Entity describe all categories contained on the site ## skill Entity describe skills that freelancer have and that required to job post ## job_post Job post may be draft (field `isDraft`) * fileId - job post may contain some file * durationType - enum('week', 'month') * englishLevel - enum ('pre-intermediate', 'intermediate', 'upper-intermediate') ## local_file Save file to job post * mimetype - type of file like 'pdf' ## proposal May contain file. May be send from client and freelancer side * type - enum: * 'proposal' - proposal to client * 'invite' - invite to interview freelancer ## offer Offer sends from client side to freelancer after they chatting about job post * status enum: * 'pending' - status of offer when it created * 'accepted' - if freelancer accepted * 'rejected' - if freelancer rejected * 'expired' - if time expired ## contract Is created when offer accepted ## chat_room Client and freelancer can chat with help chat room * prolongLink - chat room delete after 6 month when contract close, but client can prolong chat room time * status - enum: * 'forAll' - visibility for all * 'freelancerOnly' - only for freealncer * 'clientOnly' - only for client ## message Messages showing in chat * messageType - enum: * 'fromUser' - user send it * 'fromSystem' - proposal * 'fromSystemOffer' - offer message ## notification Notification send to user when he receive offer, proposal, message * type - enum: * 'message' - when vis-a-vis send message * 'offer' - recive freealncer when client send to him offer * 'proposal' - when someone send you proposal