项目作者: MrDywar

项目描述 :
Ecommerce cart service (web api)
高级语言: C#
项目地址: git://github.com/MrDywar/cart-service.git
创建时间: 2020-01-24T06:02:31Z
项目社区:https://github.com/MrDywar/cart-service

开源协议:MIT License

下载


cart-service

Given:
Product model

  1. class Product
  2. {
  3. public int Id { get; set; }
  4. public string Name { get; set; }
  5. public decimal Cost { get; set; }
  6. public bool ForBonusPoints { get; set; }
  7. }

Task:
Implement CartService

Requirements:

  1. Stack: Asp Net Core 3.1 WEB Api + storage of choice Redis / Sql Server + Dapper

  2. Functionality:

  • Add / remove an arbitrary number of products
  • Store basket data for 30 days
  • The ability to register web hooks that need to be pulled when the basket is deleted after the expiration of the storage period
  • once a day generate and save a report (txt / pdf / excel to choose from), which will indicate:
    • how many baskets
    • how many of them contain products for points
    • how many baskets expire within 10/20/30 days
    • average check basket

Notes:

  • no validation
  • no tests
  • no additional indexes on DB (LatestUpdatedOn for search, ProductId+ShoppingCartId for unique constraint)