Add workshops CMS API with schedule, registrations, and public storefront routes.

Includes SQL migrations, Prisma models, dashboard CRUD, registration status workflow, and website OpenAPI updates for workshop listing and signup.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-22 12:22:24 +03:30
co-authored by Cursor
parent 9d56ec7396
commit c7d5204b49
19 changed files with 1919 additions and 19 deletions
+56
View File
@@ -2763,6 +2763,62 @@
}
}
},
"/tenants/{domain}/workshops": {
"get": {
"tags": ["Workshops"],
"summary": "List published workshops",
"parameters": [
{ "$ref": "#/components/parameters/domain" },
{ "name": "page", "in": "query", "schema": { "type": "integer" } },
{ "name": "pageSize", "in": "query", "schema": { "type": "integer", "default": 12 } },
{ "name": "categoryId", "in": "query", "schema": { "type": "string" } },
{ "name": "title", "in": "query", "schema": { "type": "string" } }
],
"responses": {
"200": { "description": "{ items, total, page, pageSize }" }
}
}
},
"/tenants/{domain}/workshops/{slug}": {
"get": {
"tags": ["Workshops"],
"summary": "Workshop by slug",
"parameters": [
{ "$ref": "#/components/parameters/domain" },
{ "name": "slug", "in": "path", "required": true, "schema": { "type": "string" } }
],
"responses": {
"200": { "description": "{ workshop } — includes eventDate, eventTime, duration" }
}
}
},
"/tenants/{domain}/workshops/{workshopId}/register": {
"post": {
"tags": ["Workshops"],
"summary": "Register logged-in website customer for a workshop",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "$ref": "#/components/parameters/domain" },
{ "name": "workshopId", "in": "path", "required": true, "schema": { "type": "string" } }
],
"responses": {
"201": { "description": "{ registration: { id, status: pending|approved|rejected, ... }, message }" },
"409": { "description": "Already registered" }
}
},
"delete": {
"tags": ["Workshops"],
"summary": "Cancel workshop registration",
"security": [{ "bearerAuth": [] }],
"parameters": [
{ "$ref": "#/components/parameters/domain" },
{ "name": "workshopId", "in": "path", "required": true, "schema": { "type": "string" } }
],
"responses": {
"200": { "description": "{ message }" }
}
}
},
"/businesses/{businessId}/payments/methods": {
"get": {
"tags": [