0a9588abb7
- Add pagination support to findAll (page, limit query params) - Add findByTemplateId method to service - Add GET /by-template/:templateId endpoint to controller - Service already includes CRUD for QuestionBank and QuestionBankItem
2 lines
624 B
Plaintext
2 lines
624 B
Plaintext
CREATE TABLE IF NOT EXISTS "tenant_members" ("id" varchar PRIMARY KEY NOT NULL, "user_id" varchar NOT NULL, "tenant_id" varchar NOT NULL, "role" varchar CHECK( "role" IN ('SUPER_ADMIN','TENANT_ADMIN','USER') ) NOT NULL DEFAULT ('USER'), "created_at" datetime NOT NULL DEFAULT (datetime('now')), "updated_at" datetime NOT NULL DEFAULT (datetime('now')), CONSTRAINT "FK_396d571d91da471867fcfbdd2e4" FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT "FK_ffba0c9ecd4fd98550b3300ae68" FOREIGN KEY ("tenant_id") REFERENCES "tenants" ("id") ON DELETE CASCADE ON UPDATE NO ACTION);
|