Giter VIP home page Giter VIP logo

chariondm / moto-delivery-manager Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 557 KB

MotoDeliveryManager is a system built with .NET and C# for managing the rental of motorcycles and delivery drivers. It provides functionalities for registering new motorcycles, managing deliveries, and handling driver registrations and rentals.

C# 98.35% Shell 1.65%
clean-architecture clean-code hexagonal-architecture c4 c4-model ddd ddd-architecture domain-driven-design dotnet8 evolutionary-architecture modular-applications modular-architecture

moto-delivery-manager's People

Watchers

 avatar

moto-delivery-manager's Issues

Calculate Rental Termination Cost

As a delivery driver,
I want to know the total cost of my rental agreement upon termination,
So that I can make the necessary payment.

Acceptance Criteria:

  • The system must calculate the total cost of the rental based on the rental plan and any additional fees incurred.
    • If the motorcycle is returned early, apply a penalty fee on the unused days.
      • For a 7-day plan, a 20% penalty is applied to the cost of unused days.
      • For a 15-day plan, a 40% penalty is applied to the cost of unused days.
      • For a 30-day plan, a 60% penalty is applied to the cost of unused days.
    • If the motorcycle is returned late, additional fees must be applied.
      • Additional days beyond the expected end date incur a charge of R$50,00 per extra day.

Note:

  • Eu como entregador quero informar a data que irei devolver a moto e consultar o valor total da locação.
    • Quando a data informada for inferior a data prevista do término, será cobrado o valor das diárias e uma multa adicional
      • Para plano de 7 dias o valor da multa é de 20% sobre o valor das diárias não efetivadas.
      • Para plano de 15 dias o valor da multa é de 40% sobre o valor das diárias não efetivadas.
      • Para plano de 30 dias o valor da multa é de 60% sobre o valor das diárias não efetivadas.
    • Quando a data informada for superior a data prevista do término, será cobrado um valor adicional de R$50,00 por diária adicional.

Remove Motorcycle

As an admin,
I want to remove a motorcycle that was incorrectly registered,
So that the system maintains only correct and relevant data.

Acceptance Criteria:

  • A motorcycle can only be removed if there are no rental records linked to it.
  • The system should ask for confirmation before proceeding with the removal.
  • The user receives a success message once the removal is completed.

List Motorcycles

As an admin,
I want to view all registered motorcycles and filter them by license plate,
So that I can easily manage and locate specific motorcycles within the system.

Acceptance Criteria:

  • All registered motorcycles are listed by default.
  • The user can filter the motorcycle list by license plate.
  • The query should return motorcycles that match the search criteria.

Register Motorcycle

As an admin,
I want to register a new motorcycle in the system,
So that I can offer more motorcycle options for rental to delivery personnel.

Acceptance Criteria:

  • The motorcycle must have a unique identifier, year, model, and license plate as mandatory data.
  • The motorcycle's license plate must be unique within the system.
  • The system must validate the motorcycle's data before saving.
  • The user receives a success confirmation after registration.

Update Motorcycle License Plate

As an admin,

I want to correct a motorcycle's incorrectly entered license plate,
So that the motorcycle data in the system is always accurate and up-to-date.

Acceptance Criteria:

  • The system should allow only the license plate of the motorcycle to be changed.
  • The new license plate must be validated to ensure it is unique within the system.
  • The system must confirm the change to the user.

Motorcycle Rental by Delivery Driver

As a delivery driver,
I want to rent a motorcycle for a specified period,
So that I can use it for my deliveries during that time.

Acceptance Criteria:

  • The driver must be licensed in category A to rent a motorcycle.
  • The rental agreement must specify the start, end date, and expected return time.
    • The start of rental date always starts after the rental agreement is created.
  • Only available motorcycles at the specified time can be rented.
  • The system must calculate the total cost of the rental based on the rental plan and any additional fees incurred.
  • The driver must receive a notification of the successful rental initiation and the final rental cost.

Note:

  • Eu como entregador quero alugar uma moto por um período.
    • Os planos disponíveis para locação são:
      • 7 dias com um custo de R$30,00 por dia
      • 15 dias com um custo de R$28,00 por dia
      • 30 dias com um custo de R$22,00 por dia
    • A locação obrigatóriamente tem que ter uma data de inicio e uma data de término e outra data de previsão de término.
    • O inicio da locação obrigatóriamente é o primeiro dia após a data de criação.
    • O entregador só conseguirá concluir na locação caso exista motos disponíveis.
    • Somente entregadores habilitados na categoria A podem efetuar uma locação

List Rental Plans

As a delivery driver,
I want to view available rental plans,
So that I can select the one that best suits my needs.

Acceptance Criteria:

  • The system must provide a list of available rental plans.
  • Each rental plan must include the duration and cost per day.
  • The driver must be able to select a rental plan for further processing.

Update Registration with driver's license Photo

As a delivery driver,
I want to upload a photo of my driver's license to update my registration,
So that my profile is complete and complies with the requirements to rent motorcycles.

Acceptance Criteria:

  • The file must be in png or bmp format.
  • The photo must be stored outside the database, in a designated storage.
  • The system must update the driver's registration with the image file path.
  • The user receives a success message after the image is uploaded.

Note:

  • Eu como entregador quero enviar a foto de minha CNH para atualizar meu cadastro.
    • O formato do arquivo deve ser png ou bmp.
    • A foto não poderá ser armazenada no banco de dados, você pode utilizar um storage (disco local, Amazon S3, MinIO ou outros).

Delivery Driver Registration

As a delivery driver,
I want to register on the platform,
So that I can rent motorcycles and make deliveries.

Acceptance Criteria:

  • All required fields (identifier, name, CNPJ, date of birth, driver's license number, driver's license type, driver's license photo) must be filled out.
  • The CNPJ and driver's license number must be unique in the system.
  • Only driver's licenses of type A, B, or both A+B are accepted for registration.
  • The user receives a success message upon completion of the registration.

--> Note:

  • Eu como usuário entregador quero me cadastrar na plataforma para alugar motos.
    • Os dados do entregador são (identificador, nome, CNPJ, data de nascimento, número da CNH, tipo da CNH, imagem da CNH)
    • Os tipos de CNH válidos são A, B ou ambas A+B.
    • O CNPJ é único e não pode se repetir.
    • O número da CNH é único e não pode se repetir.

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.