Closed dscpsyl closed 1 month ago
Below we have a dbml
file describing the basic idea of the database structure.
// Use DBML to define your database structure
// Docs: https://dbml.dbdiagram.io/docs
Enum series {
One
Two
Three
Four
Five
Promotional
Limited
}
Enum brandimg {
img
null
}
Table cards { // Scrapped from the loget website https://loget-card.jp/list_card.aspx
Id interger [pk]
Name varchar
Series series
Image img
Region list [note:"A list of region filters from broad to specific based on website"]
SpotmapLink link
SpotWebsiteLink link
Pictogram img
BrandImg brandimg
}
Table users {
Id interger
username varchar
email varchar [pk]
cardsCollected set [note: "a set of cards.Id that have been collected. if it is not in this set, then it has not been collected"]
}
Ref: users.cardsCollected > cards.Id
Based on this structure, it makes sense to use a NoSQL db. As such, we will choose MongoDB for ease of development.
For now, the region list will be removed from the database as its cost to implement outweigh the benefits
I wrote the models in Django ODM, hoping that Djongo could connect them, but then I realized that it is not supported anymore. It seems we either have to abandon Django ODM or choose one of the supported DBs, which isn't the worst idea.
Database creation has been successful. We are now working on the front end with user interaction
We need to decide and create the database to hold all the information.
The current idea: We have a NoSQL database with two documents. One has all the data from the cards from the Loget Site. This will automatically be updated to match the website via a scraper with the required information. The other table will be the user table with SSO and a set that contains the
cardId
's of all the cards someone claims to have collected. The frontend will update based on this list.