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
+7 -2
View File
@@ -128,7 +128,7 @@ export class VideosService {
}
const authorId = dto.authorId ? BigInt(dto.authorId) : actor.id;
await this.assertAuthorBelongsToBusiness(businessId, authorId);
await this.assertAuthorBelongsToBusiness(businessId, authorId, actor);
if (dto.categoryId) {
await this.assertCategoryBelongsToBusiness(
@@ -235,7 +235,7 @@ export class VideosService {
authorId = null;
} else {
authorId = BigInt(dto.authorId);
await this.assertAuthorBelongsToBusiness(businessId, authorId);
await this.assertAuthorBelongsToBusiness(businessId, authorId, actor);
}
}
@@ -767,7 +767,12 @@ export class VideosService {
private async assertAuthorBelongsToBusiness(
businessId: bigint,
authorId: bigint,
actor: AuthUser,
) {
if (await this.permissions.isSuperAdmin(actor.id)) {
return;
}
const member = await this.prisma.businessUser.findFirst({
where: { businessId, userId: authorId },
});