BLogic Systems

Impacts Of Online Menu Implementation

Last updated on 

How Implementation impact to current system

Overview

/publish/assets/0b5e47d93be6ba75729085b2e13478ce0d47048c13522ad2086c1f75194e3490.png
image.png

1. POS Server And POS Dashboard

  1. Must Implement Soft Delete
  • Why: Because in DB we have relationship to Menu Item table In POS Server, Hard delete can cause side effect errors.
  • If we have any Logic not allow to delete item if it exist relation entities, we might need to change to allowed, Because Cloud menu feature allow to delete item without checking relation entities. This will lead to differences Logic between Cloud and POS Dashboard
  • Because Cloud menu feature allow to CRUD relation entities(categories, taxies, vendors,…) so that we also need to implement soft delete for them
  • POS Server Get endpoints Must filter soft delete
  1. Must Implement Updated time
  • Why: Because we sync data between two databases, so we need to use UpdatedTime like a criteria to know which version is lastest.
  • This field will not allow to null. Because if record don’t have UpdatedAt field, that records will never to be sync into server
  1. Must adding storeID in every tables
  • Why: Because we store multiple stores on cloud, it will help Data center query faster
  1. Must change table stuctures
  • Why: Because we need to split Items Departments tables, so it will make data more clearly
  • Items Table split into
    • Items
    • SpecialItems
    • Modifiers
  • Departments split into
    • ModifierGroups
    • ItemCategories (This will link to Items and SpecialItems tables)
  1. Must add AuditLog table
    • Why: Because if we query all table everytime we trigger sync that will be highly consume resource. If we having AuditLog to track which table had been changed since last sync that will more effective.
    • Whenever we modify records should update this table. To know which table change, and when it change.
  2. Must Store LastSyncDate in persistent
    • Why: Because we need to know last time we sync.
  • I’m think we will create new table to store that field. Should split it into 1 seperate table, so it will be more clearly and in the future we might need to add some additional field into that table.
  1. Must Add AuditImages Table
    • Why: This table to tracking image change. Table should includes columns (FileName (this must be unique), StoreID, UpdatedAt, IsDeleted)
  • Whenever we modify images like replace or add, delete, we must update corresponds record

2. Data Center

  1. Logic must be Same like POS Dashboard
  • Why: Because we allow to CRUD entities on two points (myloginpos website and POS Dashboard). Same logic make correctness the sync.
  • If we change some logic in POS Dashboard. we also need to change it on myloginpos website
    • Example case 1: Create new column for entity table
    • Example case 2: Change entity validation…

3. Order Online Web app

  1. Get menu from cloud server to improve performance
  • Why: Because sync feature is optional, try to thing what if myloginpos/POS Dashboard update some entities and not using sync
  • Order online/web app’s menu will not up to date
    • What if user checkout(pay) some items that not exist in POS Server DB
    • What if user checkout some items have been modified prices, Ex: User see PHO item 20$ on app and want to checkout, but when charge credit card it took 30$