How to represent a class diagram between Manager and employee

Asked

Viewed 13,468 times

1

Hello, everyone I have a Food Truck system and need to know mainly the relationship of the manager and employee... Is my diagram correct? The module 1 mainly.

inserir a descrição da imagem aqui • Specification:

  1. Manager module I. Creation of an employee (mandatory registration, user name, position, salary, status and password) so that they have access to the system. You can list all your employees, edit any information, delete, set inactive, so you will not have access to the system; II. The manager must have in his attributes everything that employee, but his status will always be released, having access to opening, closing and cash administration, purchases (expense) of inputs to perform the dishes; III. Performs customer listing, edit information and delete, as well as remove access to the system; IV. Makes order creation, where we will necessarily have a registered customer name or not, order date, total order value, status (open or closed) and having at least 1 or more items in the order; V. Makes product creation (dishes) in stock (must have name, value, description, quantity, weight), and can list and edit; VI. Lists the box entries of the various types of movements generated as basic orders at the place and delivery; VII. Checks and lists the messages (SAC) of registered customers and reply.

  2. Employee module I. Performs creation of orders requested by customers. After registering the order data, the employee confirms the order and the order will be automatically sent to the kitchen (Food Truck); II. performs the verification and editing of your orders in progress or ready; III. Performs the verification of your personal and financial data (Financial data cannot be modified by the employee);

  3. Client module: I. After registration, performs delivery orders where must contain address (street, street number, city, state, zip code, phone) of the customer, requesting customer and a release status for delivery that will be sent only if paid previously; II. Order delivery must have a form of payment, if debit card or credit card and release status where if customer enter all payment data, the system will automatically modify its status to released and can be delivered; III. Performs the verification of your personal data and requests in progress, released and denied. IV. You can send a SAC message to the Food Truck.

  • 1

    Dude, every case is a case, but since the manager only has one thing different than the employee, which is the "identifier" to know if it is the manager. I would put a boolean attribute inside the employee to identify if you are a manager or not, now if you have more hierarchies that I said would not work.

  • Has client....

  • 1

    Hello, I have inheritance in this example...but I managed to do as follows... I have manager, employee and client and I made an attribute that receives the value of Discriminatorvalue and this way when logging in I can check if the return user is ADMIN, FUNC or CLIE and redirect to page x or how I would do that would be access permissions.

  • 1

    Great, answer the question so it will help people who are having similar doubts

  • Hello, you guys! The best relationship I found and ended was: I created a User class with generic parameters to all and below inheriting we have the classes administrator, employee and Client, so when accessed the system I have the user logged in and this way we can work better access and its specific data.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.