Skip to content

A simple project created during DBI-Lessons utilizing MongoDB.

Notifications You must be signed in to change notification settings

Christoph-Knoll/DBI-Apotheke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DBI - Apotheke

Planning

User Stories

  • Create recipe

  • Retrieve recipe including total price

  • See all available products

  • Get information to each product, including its ingredients and its storage locations

Entities

  • ProductInfo

  • Ingredient

  • Product (pseudo foreign key to productInfo)

  • Storage

Generics

GenericRepository

  • GetAllItems

  • GetItemById

  • InsertItem

  • UpdateItem

  • DeleteItem

  • GetItemWithDetails (GenericMasterDetailReposiotry)

Service Base

Basic Service which uses the GenericRepositories functions.

Additional Repository Methods

ProductInfoRepository

  • GetByIngredient

  • GetProductInfoWithProducts

ProductRepository

  • GetByPzn

  • GetAllProductsByProductInfo

RecipeRepository

  • GetTotalPrice

StorageRepository

  • GetByPzn

Entity Structure

ProductInfo

{
    "Name": "Aspirin Complex",
    "Brand": "Aspirin",
    "State": "State.Liquid",
    "Ingredients": [
        {
            "Name": "A",
            "Amount": 50,
            "Unit": "Unit.ML"
        }
    ],
}

Product

{
    "PZN": 1,
    "Price": 20,
    "Amount": 100,
    "Unit": "Unit.ML",
    "ProductInfoId": "id"
}

Storage

{
    "PZN": 1,
    "Amount": 1,
    "StorageSite": "Linz"
}

Recipe

{
    "Name": "Franz Ferdinand",
    "Address": "Hauptstraße 5, 4040 Linz",
    "Issuer": "Dr. Med. Hubert Ferdinand",
    "PZNs": [ 1, 2 ]
}

Enums

enum Unit {
    MG,
    ML
}

enum State {
    Solid,
    Liquid
}

About

A simple project created during DBI-Lessons utilizing MongoDB.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •