TylerMetz / Saucier720

5 stars 0 forks source link

Redo Database.go to support the database on Azure #430

Closed rileycleavenger closed 1 year ago

rileycleavenger commented 1 year ago

Description

Need to create our SQL database on Azure and update Database.go. I think I can update the openDatabase() function and have it running correctly according to the example HERE.

Definition of Done

Database is hosted online and not locally

rileycleavenger commented 1 year ago

Passing this issue on to @TylerMetz because he wants more experience with SQL databases

rileycleavenger commented 1 year ago

Completed:

Important Info

Resources

To-do

rileycleavenger commented 1 year ago

I updated all of the structs in the Backend to match the new tables (as seen in PR #444), here they are:

type FoodItem struct {
    Name      string `json:"Name"`
    FoodType string `json:"FoodType"`
    SaleDetails string `json:"SaleDetails"`
    Quantity int `json:"Quantity"`
}
type GroceryStore struct {
    Name      string
    ZipCode   string
}
type List struct {
    ShoppingList []FoodItem
}
type Pantry struct {
    FoodInPantry []FoodItem
}
type Recipe struct {
    Instructions   string   `json:"instructions"`
    Ingredients    []string `json:"ingredients"`
    Title          string   `json:"title"`
    PictureLink    *string  `json:"pictureLink"`
    RecipeID        string   `json:"recipeID"`
    UserFavorite   bool     `json:"userFavorite"`
}
type Scraper struct {
    PublixDeals []FoodItem
    WalmartDeals []FoodItem
}
type User struct{
    FirstName string `json:"FirstName"`
    LastName string `json:"LastName"`
    Email string `json:"Email"`
        UserName string `json:"UserName"`
        Password string `json:"Password"`
    UserPantry Pantry 
    UserList List 
}
rileycleavenger commented 1 year ago

TO-DO: