mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 15:25:43 +00:00
feat(BE-115,116,117): implement chickin CRUD, approve logic, and stock availabilit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
CREATE TABLE stock_availabilities (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
entity_type VARCHAR(50) NOT NULL,
|
||||
entity_id BIGINT NOT NULL,
|
||||
product_id BIGINT,
|
||||
quantity NUMERIC(15, 3) NOT NULL DEFAULT 0,
|
||||
reserved_quantity NUMERIC(15, 3) NOT NULL DEFAULT 0,
|
||||
unit VARCHAR(20),
|
||||
last_updated TIMESTAMPTZ DEFAULT now(),
|
||||
created_at TIMESTAMPTZ DEFAULT now(),
|
||||
deleted_at TIMESTAMPTZ
|
||||
);
|
||||
|
||||
ALTER TABLE stock_availabilities
|
||||
ADD CONSTRAINT fk_product_id FOREIGN KEY (product_id) REFERENCES products (id);
|
||||
Reference in New Issue
Block a user