-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Create Backend Schema in DRF #220
Comments
defined the model in Django (with a few changes) and here's how it gets mapped. Can we confirm that this is the schema that should be used or if further changes should be made or reverted?
The enum for Roles are listed below. Are there any others that should be added?
Also removed the following two fields. Let me know if they're required, but it feels like we can get equivalent info from
|
@Enzyme3 Thank you for getting this done so quickly! A couple of notes:
Email is a perfect replacement for this. One note: the data will eventually link to a peopleDepot user account (a project level account, actually). We should make sure random emails are not being entered. @sharadgaurav7 @sdimran Can you confirm that every HFLA project have their own unique emails with a @hackforla.org domain? If not, can the org arrange for it?
Our frontend would need more than just the name, unfortunately. From the latest design (Figma link), it seems we also need description, a logo, program area and meeting times. I know meeting times are pulled from an endpoint managed by the hackforla/vrms team, but the rest are TBD from peopleDepot. Can you touch based with the vrms team on slack to get the info from them? As for the other data, any thoughts on how we can get it to the frontend?
I will assume you mean tech. One clarification: This is actually planned to be a one-to-many relationship (one posting, many technologies). I apologize for being unclear about this yesterday. That said, we only need the names of the technologies, so varchar can still work. What is the plan to make sure that we don't use multiple names for some technologies (for example, React and ReactJS)?
Some additions, off the top of my head:
@sdimran @sharadgaurav7 any other roles? |
Oh and fyi, this is the tentative schema for peopleDepot in case it is helpful. |
Ack. And will add constraints for the hackforla domain if that requirement is confirmed. And just as a reminder to myself, should use Django's built-in email model
I think we first need to be clear on what data we do and do not own. And once we have that defined, we need a decision on how to proceed with the data that is owned by other teams and is not currently available, whether it be: pushing the other teams to make the data available before our deadlines, taking "temporary" ownership of the data and duplicating the needed parts into our DB, not including the data for the MVP, or some other option.
My initial thought was to have the frontend be responsible for querying multiple backends to get the data. E.g. if CivicTechJobs owns the opportunity title/description but not the project name/description/meetings, then FE will first pull down the list of valid opportunities, which will include a field of project id or something similar. The FE would then take the project id and to the people depot API to get the name/description, etc. However, things may not be very performant if an opportunities search pulls down 10 opportunities with different projects, and the FE has to make a call for each opp to get its details.
I purposely changed it to
Oh, I see. If that's the case we probably want another model to get that relationship setup. Also, looks like "tech" is also found in the people depot schema. If that's the source of truth, can push the React vs ReactJS question to that team. And if not, I think the easiest solution would be to store tech in a lookup table(not sure how Django does this) and new opps can be validated against it |
Good point. Just going to spitball here. What is the feasibility of caching this data into our database and incorporating updates from PeopleDepot (either over time or on-demand)? One advantage I see for this approach is that we will have models for projects. That way, we can safely take ownership of the PeopleDepot data while keeping a single source of truth (once PeopleDepot is ready). Regardless, we will take Tuesday's all team and dev meeting to come up with what to do with the project data.
Oh, gotcha! Yeah, the terminology gets a little fuzzy in this instance. Overall it's fine to call it that since we are clear what it means. Just fyi, the design team does use tech such as Figma, and in some cases MUI as well. Again, fuzzy terms.
+1 on adding another model |
@Aveline-art Hi Ava, I will confirm with bonnie on your 2 questions today. I am fairly confident that each project when onboarded or started have some iteration of their project name "@hackforla.org" but will confirm. and regarding roles I noticed we are missing marketing (we have content writer which is one of the types of marketing jobs under the CoP). took a look at the CoP's and there is a marketing board with a number of related roles. I will confirm today if we want to continue with "Marketing" as a selectable role in the qualifier and then attribute that identifier to specific job postings "Marketing & Communications Managers, Marketing & Communications Director, Content Writer" or if we want to display the types of job postings itself (to me the former makes more sense, that way we can reduce front end and back end dev to development/developer and specify in the search results page based on the job itself) will update the post in #252 with the answers |
Here's the latest in my local right now. Please give a look-over and validate that this is the format we want/need The pending work is to update the techologies array to include a
|
That looks really good, except we also need a technologies and tools field. Feedback from org can be found here. |
Updated draft schema: Table opportunities {
id int [pk, increment] // auto-increment
job_title varchar
project_id int [ref: - projects.id] [foreign-key]
max_commitment int [note: 'hours per week']
min_commitment int [note: 'hours per week']
max_duration int [note: 'days total']
min_duration int [note: 'days total']
positions_available int
description varchar
posted_date datetime [default: `now()`]
role_id int [ref: - roles.id]
experience_level_id int [ref: - experience_levels.id]
is_remote boolean
is_active boolean
}
Table opportunities_meetings {
id int [pk, increment] //auto-increment
meeting_id int [ref: > meetings.id]
opportunity_id int [ref: > opportunities.id]
type meeting_type
}
Table opportunities_tech {
id int [pk, increment] //auto-increment
opportunity_id int [ref: > opportunities.id]
type tech_type
}
// People Depot
Table project_auth {
id int [pk, increment] // auto-increment
project_id int [ref: - projects.id]
email varchar
password varchar // hash
}
Table projects {
id int [pk, increment] // auto-increment
name varchar
logo varchar
program_area varchar
slack varchar
}
Table roles {
id int [pk, increment] // auto-increment
name varchar
description varchar
}
Table experience_levels {
id int [pk, increment] // auto-increment
level varchar
}
// VRMS
Table meetings {
id int [pk, increment] // auto-increment
project_id int [ref: > projects.id]
meeting_time varchar
}
// Enums
Enum meeting_type {
not_attend
could_attend
should_attend
}
Enum tech_type {
preferred
required
} |
|
Peopledepot will have:
|
Related Issue (Can be worked on in tandem)
Note: This issue can be done concurrently with its dependency.
Overview
As part of our product we need to have a backend schema. For this issue we will add our tentative schema into our backend via DRF and a swagger UI.
Action Items
Resources/Instructions
Resources
Code for https://dbdiagram.io/d
The text was updated successfully, but these errors were encountered: