Giter Club home page Giter Club logo

inventory_management's People

Contributors

caspering avatar kasperingops avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

inventory_management's Issues

Refactor FruitAndVege service to use DTO object

Acceptance Criteria

  • A FruitAndVege DTO class exists with attributes identical to FruitAndVege
  • A mapper interface (mapstruct) is defined mapping an entity object to DTO and vice versa
  • The service class is refactored to accept DTOs on save operations and return DTOs on read operations
  • The service tests are updated to use DTOs as required

Add CSV dependency and implement CSV record to produce object mapper

Acceptance Criteria

  • Add Apache Commons CSV dependency: Maven: Apache Commons CSV
  • Implement converter class for extracting produce data from a CSVRecord object
  • Unit test is added to test conversion: test the happy path and come up with a few edge cases

Considerations

  • Here is the Apache Commons CSV documentation: Apache Commons CSV Docs
  • Check out the CSVRecord Javadoc for information on how to extract fields
  • We'll use this module in another issue when we implement processing an entire CSV input file

Create persistence model for produce (fruits & veggies)

Acceptance Criteria

  • A base entity class exists
  • An entity class exists with the appropriate fields
  • A corresponding repository exists for the produce entity
  • When the application runs, a corresponding table exists in H2 with the appropriate columns

Add processed food entity model (plus Repository, Service, and Bootstrap class)

Acceptance Criteria

  • processed food entity model exists with a corresponding repo
  • model has additional type, mfg date, and expiration date fields
  • bootstrap class is added (or existing produce bootstrap class added to) that loads a few sample processed food items
  • Service class with CRUD operations is implemented
  • A test class exists with a test method for each CRUD operation

Implement Service layer for Produce

Acceptance Criteria

  • CRUD operations for a single produce item exist
  • Create
  • Read
  • Update
  • Delete
  • Tests exist to verify all four actions using a mock repository

Implement GET REST endpoint for produce (controller)

Acceptance Criteria

  • A produce controller class exists
  • GET /produce/{id} returns a JSON object representing the requested fruit or veggie
  • If the item doesn't exist, the endpoint returns 404 NOT FOUND
  • A test class contains two test cases (using MockMVC), verifying both the found not found cases

Buggy

In postman processed food's get request works when searched by ID but doesnt when searched by food type.
example: /api/v1/processedFoods/VEGAN returns an error log
/api/v1/processedFoods/by-name/VEGAN returns an error log

these should return all processed foodtype VEGAN.
buggy

Add stationary model entity

Acceptance Criteria

  • A stationary entity model class is added with a corresponding repository class
  • A service exists with CRUD operations
  • A test class is added that exercises the CRUD operations

Suggestions

  • This would be a good time to consolidate common properties into a class between BaseEntity and the concrete product classes
  • Refactoring at this point will give you an opportunity to test for regression with your unit tests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.