added manager, driver, order, route, vehicle, warehouse endpoints,models and migrations.

This commit is contained in:
2026-03-23 18:28:01 +05:00
parent f710cda3f3
commit 6e8750a566
22 changed files with 2463 additions and 111 deletions

View File

@@ -0,0 +1,14 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS managers (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID UNIQUE REFERENCES users(id) ON DELETE CASCADE,
warehouse_id UUID REFERENCES warehouses(id) ON DELETE SET NULL,
slug VARCHAR(120) UNIQUE NOT NULL
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS managers;
-- +goose StatementEnd