Skip to content

AhmetFurkanDEMIR/Boyner-Case-Study

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boyner Case Study

Projenin kaynak java classları

Projeyi localinizde çalıştırmanız için gerekli docker-compose dosyası

Ubuntu için docker kurulumu

Docker imajlarını ayağa kaldırma⇂

# Cleaning up Docker images
docker rm -f $(docker ps -a -q)
docker volume rm $(docker volume ls -q)

# Running all images (While in the project folder)
docker-compose up

Docker imajları ayağa kaktıktan sonra oluşacak tablo şeması⇂

Screenshot_2022-06-01_13-19-16

API kullanımı

Docker imajlarını ayağa kaldırdıktan sonra http://localhost:8080/api/ bağlantısı ile API yi localinizde kullanabilirsiniz, veya http://52.91.218.62:8080/api/ bağlantısı ile AWS EC2 üzerinde deploy ettiğim canlı API yi kullanabilirsiniz.

  • ProductCatalog

Post :⇂

tbl_category_attributes tablosuna yeni item ekleme⇂ http://localhost:8080/api/createProductCategoryAttributes

{
    "brand":"brand",
    "color":"red",
    "gender":"male",
    "size":"xl"
}

Screenshot_2022-06-01_13-46-45

tbl_product_category tablosuna yeni item ekleme⇂ http://localhost:8080/api/createProductCategory

{
    "name":"TshortCategory",
    "category_attributes":1
}

Screenshot_2022-06-01_13-50-32

Get :⇂

tbl_product_category tablosunda isim ile kategori arama⇂ http://localhost:8080/api/PrCategoryName

http://localhost:8080/api/PrCategoryName?name=TshortCategory

Screenshot_2022-06-01_13-58-34

Put :⇂

tbl_product_category tablosunda id ile güncelleme yapma⇂ http://localhost:8080/api/updateProductCategory

{
    "id":1,
    "name":"TshortCategory NEW",
    "category_attributes":1
}

Screenshot_2022-06-01_14-02-10

Delete :⇂

tbl_product_category tablosunda id ile bağlı tüm tablolara soft delete yapma⇂ http://localhost:8080/api/deleteProductCategory

http://localhost:8080/api/deleteProductCategory?id=1

Screenshot_2022-06-01_15-01-34

  • Product

Post :⇂

tbl_product_attributes tablosuna yeni item ekleme⇂ http://localhost:8080/api/createProductAttributes

{
    "brand":"brandProduct",
    "color":"blue",
    "gender":"Unisex",
    "size":"m"
}

Screenshot_2022-06-01_14-26-58

tbl_product tablosuna yeni item ekleme⇂ http://localhost:8080/api/createProduct

{
    "name":"Boyner Tshort",
    "price":99.99,
    "product_attributes":2,
    "product_catalog_id":1
}

Screenshot_2022-06-01_14-30-00

Get :⇂

tbl_product tablosunda name ile item arama⇂ http://localhost:8080/api/productName

http://localhost:8080/api/productName?name=Boyner Tshort

Screenshot_2022-06-01_14-36-43

tbl_product tablosunda CategoryName ile item arama⇂ http://localhost:8080/api/productCategoryName

http://localhost:8080/api/productCategoryName?name=TshortCategory NEW

Screenshot_2022-06-01_14-38-22

tbl_product tablosunda PriceRange ile item arama⇂ http://localhost:8080/api/productPriceRange

http://localhost:8080/api/productPriceRange?start=98.8&finish=100

Screenshot_2022-06-01_14-41-13

Put :⇂

tbl_product tablosunda id ile item güncelleme⇂ http://localhost:8080/api/updateProduct

{
    "id":1,
    "name":"Mavi Tshort",
    "price":250.20,
    "product_attributes":1,
    "product_catalog_id":1
}

Screenshot_2022-06-01_14-45-34

Delete :⇂

tbl_product tablosunda id ile item silme⇂ http://localhost:8080/api/deleteProduct

http://localhost:8080/api/deleteProduct?id=1

Screenshot_2022-06-01_14-47-56