Skip to content

ecoshub/services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

services

.Net Core Product and Billing service.

Live Demo at: http://146.148.102.96:80/api/products

How to run?

$ docker-compose build
$ docker-compose up

API Summary

add new produt(POST)  /api/products
body: add product model(below)
update produt(PUT)    /api/products
body: add product model(below)
get all products(GET) /api/products/{product_id}
get prodcut(GET)      /api/products/{product_id}
update stock(PUT)     /api/products/{product_id}/stock/{new_stock}
delete product(DELTE) /api/products/{product_id}
buy items(POST)       /api/products/buy
body: product_id array as string
get bill(GET)         /api/products/bill/{bill_id}
reset db(POST)        /api/products/reset
body: empty body
```# services
## .Net Core Product and Billing service.
#### sync product test api 

## How to run?

$ docker-compose build $ docker-compose up


## API Summary

add new produt(POST) /api/products body: add product model(below) update produt(PUT) /api/products body: add product model(below) get all products(GET) /api/products/{product_id} get prodcut(GET) /api/products/{product_id} update stock(PUT) /api/products/{product_id}/stock/{new_stock} delete product(DELTE) /api/products/{product_id} buy items(POST) /api/products/buy body: product_id array as string get bill(GET) /api/products/bill/{bill_id} reset db(POST) /api/products/reset body: empty body


## Architecture
<p align="center">
  <img src="diagram.png">
</p>
***Live demo port is maped to 80  not 8080

#### Product Model
```C#
    Guid productId
    string productName
    uint productStock
    double productPrice
    string productDescription
    DateTime productRegisterDate

Add Product Model

    string productName
    uint productStock
    double productPrice
    string productDescription

Sale Model

    Guid billId
    Guid saleId
    Guid productRefId
    DateTime saleDate
    uint saleAmount
    double saleUnitPrice
    double saleTotalPrice
    uint stockLeft

Architecture

***Live demo port is maped to 80 not 8080

Product Model

    Guid productId
    string productName
    uint productStock
    double productPrice
    string productDescription
    DateTime productRegisterDate

Add Product Model

    string productName
    uint productStock
    double productPrice
    string productDescription

Sale Model

        Guid billId
        Guid saleId
        Guid productRefId
        DateTime saleDate
        uint saleAmount
        double saleUnitPrice
        double saleTotalPrice
        uint stockLeft

About

.Net Core product and billing services.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published