zone {name}
seat_tables {table_name, seater, table_type:[square, round, ], position-x, position-y}
room {name, seater, created_by, is_active, order_by}

menu {name, is_active, valid_days, valid_time_from, valid_time_to}
menu_category {menu, name, alt_name, order_by, parent_category_id}

menu_item_attributes: {attribute_type, name, value}
menu_item_options: {option_type, name, value}

menu_item : {
    category_code : "",
    item_code : "",
    name : "",
    alt_name : "",
    type : "[SIMPLE | SET | DIY]",
    attributes : [],
    parent_items : [],
    child_items : [],
    min_selectable_item : 0,
    max_selectable_item : 0,
    menu_item_instances : [],
    options : [],
}

menu_item_instance : {
    item_instance_code : "",
    menu_item_attribute_values : [],
    item_code : "",
    parent_item_code : "",
    price : 0.00,
    is_available : t/f,
    is_on_promotion : t/f,
    promotion_price : 0.00,
}

order_item : {
    item_instance_code : "",
    item_instance_price: "",
    quantity : 0,
    option_values : [{key,value},],
    sub_order_items : [],
}

menu_items { menu_category, order_by, product_code, picture, menu_name, alt_menu_name, price, menu_item_type:[simple| set| DIY], available_size:[small: {product_code, price}, medium: {product_code, price}, large: {product_code, price}],
variants:[{product_code, name, picture, add_on_price, options {option_name, option_value} }], max_variants_selection: integer, set_menu_items:[menu_items], is_sold_out, is_on_promotion
promotion_price, options {option_name, option_value}}

customer {name, company, contact, email, member_id, member_type, member_authentication_code}

order { id, date, order_ref, order_source [tablet, order_station, emenu, api], order_type [dine-in, takeaway, delivery],customer_id, item_count, quantity_count, status [new, processing, fulfilled], waiters[], guest_info: {adult_count, child_count, woman_count, man_count}}
order_items { order_item_status, product_code, name, qty, price, remark, options , variants: [], set_menu_items :[]}
order_delivery_info {name, address, contact_no, delivery-by [InHouse | YDoor2Door | Food2U], tracker-id, sale}
booking {dining_facility_id, type, checkin_at, checkout_at, checkout_by, reserved_at, reserved_by, status, is_currently_checkin}
booking_order(booking, order)

order_queue_station {name, is_active, processing_items [product_code], print_copy: boolean, printer_name, font_size, cut_per_item, use_alternate_name}
order_queue_log {order_id, job_status [new, completed], print_status [], header: {table name, order_type, order_date}, items :{name, comment, qty}}
order_queue_process_by_zone {order_queue_station, zone}

payment_method_settings {payment_method, is_active, api_url , auth_token , account_id}
Employee {name, role, access_code, encrypted_code}

cashier_terminals {name:string, is_active,is_login_in, print_name:string, header, font_size, font, footer, show_tax, show_cashier, show_guest_info}
cashier_login_logs {cashier_station, employee, login_at, logout_at}

tax_profile {name, rate, inclusive, order_by}
sale {cashier, requested_by, receipt_no, customer, payment_status, sale_status, total_amount, total_discount, total_tax, tax_type, grand_total, amount_received, amount_changed}
sale_items {sale, product_code, product_name, remark, qty, unit_price, taxable_amount, price}
sale_discount_items {sale, product_code, product_name, regular_price, discounted_price, qty, taxable_amount, price, discount_type :[nett, percentage],discount_value}
sale_discount {sale, discount_type, discount_value, discount_amount, discount_code}
sale_taxes {sale, tax_name, tax_rate, tax_amount}
sales_payment {sale, payment_method, payment_amount, payment_reference, payment_status}
sales_audit {sale, action, action_by, approved_by, action_at}
sale_order {sale, order}

inventory_journal {product_code, qty, debit, credit, balance, references, stock_entry}
stock_entry { who, date, status [new, processing, completed], action [entry | audit] }

lookup {lookup_type, name, value} [status | payment_method | employee_role | payment_status | ]
