maxwolffe / Bribecaster

1 stars 1 forks source link

Models #1

Closed maxwolffe closed 9 years ago

maxwolffe commented 9 years ago

Ok. So we should break up the information that we need to store into different models, but we can talk about it on this.

It might make sense to have cases, representing a single visit to an office, that each have form responses associated with it.

Case: has_one visit_info - Model representing information collected at gov. site. Each case will have one of these. has_one precall_response - This can be a model representing the information gathered in precall information sent (sms delivered, sms response, robocall delivered) has_one call_response - Model representing responses collected by the call center agent. sms_selected - boolean followup_selected - boolean belongs_to office

VisitInfo: employee_id - int #this can either be associated with a user id in our database or a government employee id, do these exist in India? customer_name - String customer_number - int #phone number associated with the person coming to the office type_of_service - String #what did they come to the office for? Could be a list of options instead (enum?) time_of_visit - DateTime #when did they visit.; notes - Text #room for additional comments. belongs_to case #what case is this form associated with.

PrecallResponse: #What do we care about here? employee_id - int sms_recieved - boolean #can we get this information? sms_recieved_text - Text #how did they respond, if they did? sms_recieved_time - DateTime #when did they respond? robo_call_recieved - #did they answer the robo call? Is their number in service? Can we tell this? sms_time_sent - DateTime robocall_time_sent - DateTime belongs_to case

CallResponse: #What do we ask them here? Is this different for each case? Should this form be different for each type of service?

User: Employee_id - int #This may be different then their user_id in the database because they may have an India employee id associated with them. first_name - string last_name - string office - string (enum?)

has_many visit_info has_many precall_response has_many call_response

Office: location - #What's the best way to store this? office_head - int #employee_id of the office manager has_many users #who works at this office? has_many cases

Should we have corruption ratings here?