added points to sale and logic backend

This commit is contained in:
Alex
2026-04-13 19:46:28 -06:00
parent 6efa440bbc
commit c244e5742a
6 changed files with 114 additions and 5 deletions

View File

@@ -230,6 +230,8 @@ CREATE TABLE IF NOT EXISTS sale (
couponDiscountAmount DECIMAL(10, 2) NOT NULL DEFAULT 0.00,
employeeDiscountAmount DECIMAL(10, 2) NOT NULL DEFAULT 0.00,
pointsEarned INT NOT NULL DEFAULT 0,
pointsUsed INT NOT NULL DEFAULT 0,
pointsDiscountAmount DECIMAL(10, 2) NOT NULL DEFAULT 0.00,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
CONSTRAINT fk_sale_employee FOREIGN KEY (employeeId) REFERENCES users(id),