Master Databases

users Master
Column Name Type Description
user_idINT(11)Primary Key, Auto Increment
usernameVARCHAR(50)Unique Login ID
password_hashVARCHAR(255)Encrypted Password
full_nameVARCHAR(100)Staff Full Name
emailVARCHAR(100)For Password Reset
phone_numberVARCHAR(20)Contact Number
profile_image_urlVARCHAR(255)URL path to user photo
roleENUM'Head', 'Manager', 'Purchase', 'Finance', 'Admin'
outlet_idINT(11)FK to outlets (Optional)
created_atDATETIMERecord creation timestamp
vendors Master
Column Name Type Description
vendor_idINT(11)Primary Key, Auto Increment
vendor_nameVARCHAR(100)Company Name
payment_termsENUM'CBD', 'COD', 'Credit Terms'
credit_term_daysINT(11)Days for Credit Terms (e.g. 30)
bank_nameVARCHAR(50)Bank Name
bank_account_numVARCHAR(50)Account Number
bank_account_holderVARCHAR(100)Account Holder Name
addressTEXTPhysical Address (Optional)
pic1_nameVARCHAR(100)1st PIC Name
pic1_positionVARCHAR(50)1st PIC Position (e.g. Sales)
pic1_phoneVARCHAR(20)1st PIC WhatsApp
pic2_nameVARCHAR(100)2nd PIC Name (Optional)
pic2_positionVARCHAR(50)2nd PIC Position
pic2_phoneVARCHAR(20)2nd PIC WhatsApp
office_phoneVARCHAR(20)Office Phone Number (Optional)
items Master
Column Name Type Description
item_idINT(11)Primary Key, Auto Increment
skuVARCHAR(20)Unique Stock Keeping Unit
item_nameVARCHAR(150)Name of the item
image1_urlVARCHAR(255)Item Picture 1 (Max 3)
image2_urlVARCHAR(255)Item Picture 2
image3_urlVARCHAR(255)Item Picture 3
categoryVARCHAR(50)e.g. 'Raw Material', 'Packaging'
unitVARCHAR(20)Inventory Base Unit (e.g. gram, ml, pcs)
min_stock_levelDECIMAL(10,2)Reorder Point
storage_sectionVARCHAR(50)e.g. 'Kitchen', 'Bar' (Maps to Head Section)
is_activeBOOLEAN1 = Active, 0 = Inactive
item_vendors Master (Relation)
Column Name Type Description
idINT(11)Primary Key
item_idINT(11)FK to items
vendor_idINT(11)FK to vendors
vendor_skuVARCHAR(50)Vendor's Item Code
uom_purchaseVARCHAR(20)Purchase Unit (e.g. Pack, Box)
conversion_factorDECIMAL(10,2)Qty of Base Unit per Purchase Unit
priceDECIMAL(15,2)Price per Purchase Unit
is_preferredBOOLEANAuto-set for lowest price
last_updatedDATETIMELast Price Update
outlets Master
Column Name Type Description
outlet_idINT(11)Primary Key
outlet_nameVARCHAR(100)e.g. 'Pudak', 'Eyckman'
addressTEXTLocation
po_categories Master (Config)
Column Name Type Description
idINT(11)Primary Key
category_nameVARCHAR(50)'Regular', 'Buffer', 'Event'
descriptionVARCHAR(255)Description of the category
is_activeBOOLEAN1 = Active

Operational Databases

request_orders Transaction
Column Name Type Description
ro_idINT(11)Primary Key
ro_numberVARCHAR(20)e.g. RO-2023-001
outlet_idINT(11)FK to outlets
created_byINT(11)FK to users (Head Section)
statusENUM'Draft', 'Pending', 'Approved', 'Processed'
created_atDATETIMERequest Date
purchase_orders Transaction
Column Name Type Description
po_idINT(11)Primary Key
po_numberVARCHAR(20)e.g. PO-2023-001
vendor_idINT(11)FK to vendors
category_idINT(11)FK to po_categories
total_amountDECIMAL(15,2)Grand Total
statusENUM'Ordered', 'Received', 'Cancelled'
payment_statusENUM'Pending', 'Paid'
inventory_stock Real-time
Column Name Type Description
idINT(11)Primary Key
outlet_idINT(11)FK to outlets
item_idINT(11)FK to items
quantityDECIMAL(10,2)Current On-Hand Stock
last_updatedDATETIMELast Movement Timestamp
inventory_transactions Log
Column Name Type Description
trans_idINT(11)Primary Key
typeENUM'In', 'Out', 'Adjust', 'Return'
item_idINT(11)FK to items
qty_changeDECIMAL(10,2)Positive or Negative change
reference_idINT(11)PO ID, Opname ID, or Usage ID
dateDATETIMETransaction Date
purchase_returns Refunds
Column Name Type Description
return_idINT(11)Primary Key
po_idINT(11)FK to purchase_orders
item_idINT(11)FK to items
quantityDECIMAL(10,2)Returned Qty
reasonVARCHAR(255)e.g. 'Damaged', 'Wrong Item'
refund_statusENUM'Pending', 'Completed'
refund_amountDECIMAL(15,2)Amount refunded by vendor