-
Notifications
You must be signed in to change notification settings - Fork 1
feat: guide booking attractions crud #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
9a671b2
refactor(nest-common): extract S3 config token into dedicated file
0-sayed 4787074
feat(guide-booking): add attractions schema, enums, and migration
0-sayed 7f11079
feat(guide-booking): wire app module with auth, S3, Redis, and attrac…
0-sayed 425ac7d
docs: mark T07 Guide-Booking Attractions as complete
0-sayed ad1043f
fix(guide-booking): harden slug generation and enforce global uniqueness
0-sayed ac7e497
fix(guide-booking): fix boolean filter parsing and PATCH default over…
0-sayed 0854c87
fix(guide-booking): set updatedAt on soft delete
0-sayed 994836b
fix(guide-booking): add runtime JWT claim validation
0-sayed 6dbaa1a
fix(guide-booking): fail fast on missing AWS credentials
0-sayed 64e0cef
fix(guide-booking): use requireEnv for DATABASE_URL
0-sayed 335a649
build: tighten tsconfig with additional strict compiler options
0-sayed 87dbb00
build: upgrade ESLint to strictTypeChecked and stylisticTypeChecked
0-sayed 4a0f45a
build: add ts-reset, check script, and clean up dependencies
0-sayed 5798450
build: update knip config for stricter analysis
0-sayed 88e81fc
refactor(nest-common): fix type safety for strict TS and ESLint
0-sayed 36b5b1e
refactor(identity): fix type safety for strict TS and ESLint
0-sayed 22e2211
fix: annotate catch parameter as unknown in migrate scripts
0-sayed 895269a
docs: update CLAUDE.md banned behaviors for strict TS rules
0-sayed 14aeabd
fix(identity): validate ms() output for JWT expiry config
0-sayed afc318f
fix: override fast-xml-parser to >=5.5.6 for CVE-2026-26278
0-sayed a3016df
fix(guide-booking): align attractions code with strict TS/ESLint rules
0-sayed a6dabbd
fix(nest-common): reject empty x-request-id before fallback generation
0-sayed 887e2ea
Merge remote-tracking branch 'origin/main' into feat/guide-booking-at…
0-sayed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| export * from './s3.tokens'; | ||
| export * from './s3.module'; | ||
| export * from './s3.service'; | ||
| export * from './s3.tokens'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
services/guide-booking/drizzle/20260316212720_robust_madame_masque.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| CREATE TYPE "guide_booking"."attraction_area" AS ENUM('kharga', 'dakhla', 'farafra', 'baris', 'balat');--> statement-breakpoint | ||
| CREATE TYPE "guide_booking"."attraction_type" AS ENUM('attraction', 'historical', 'natural', 'festival', 'adventure');--> statement-breakpoint | ||
| CREATE TYPE "guide_booking"."best_season" AS ENUM('winter', 'summer', 'spring', 'all_year');--> statement-breakpoint | ||
| CREATE TYPE "guide_booking"."best_time_of_day" AS ENUM('morning', 'evening', 'any');--> statement-breakpoint | ||
| CREATE TYPE "guide_booking"."difficulty" AS ENUM('easy', 'moderate', 'hard');--> statement-breakpoint | ||
| CREATE TABLE "guide_booking"."attractions" ( | ||
| "id" uuid PRIMARY KEY NOT NULL, | ||
| "name_ar" text NOT NULL, | ||
| "name_en" text, | ||
| "slug" text NOT NULL, | ||
|
idris-builds marked this conversation as resolved.
|
||
| "type" "guide_booking"."attraction_type" NOT NULL, | ||
| "area" "guide_booking"."attraction_area" NOT NULL, | ||
| "description_ar" text, | ||
| "description_en" text, | ||
| "history_ar" text, | ||
| "best_season" "guide_booking"."best_season", | ||
| "best_time_of_day" "guide_booking"."best_time_of_day", | ||
| "entry_fee" jsonb, | ||
| "opening_hours" text, | ||
| "duration_hours" real, | ||
| "difficulty" "guide_booking"."difficulty", | ||
| "tips" text[], | ||
| "nearby_slugs" text[], | ||
| "location" geometry(point), | ||
| "images" text[], | ||
| "thumbnail" text, | ||
| "is_active" boolean DEFAULT true NOT NULL, | ||
| "is_featured" boolean DEFAULT false NOT NULL, | ||
| "rating_avg" real, | ||
| "review_count" integer DEFAULT 0, | ||
| "created_at" timestamp with time zone DEFAULT now() NOT NULL, | ||
| "updated_at" timestamp with time zone DEFAULT now() NOT NULL, | ||
| "deleted_at" timestamp with time zone, | ||
| CONSTRAINT "chk_attractions_duration_positive" CHECK ("guide_booking"."attractions"."duration_hours" > 0), | ||
| CONSTRAINT "chk_attractions_review_count_non_neg" CHECK ("guide_booking"."attractions"."review_count" >= 0), | ||
|
idris-builds marked this conversation as resolved.
|
||
| CONSTRAINT "chk_attractions_rating_avg_range" CHECK ("guide_booking"."attractions"."rating_avg" IS NULL OR ("guide_booking"."attractions"."rating_avg" >= 0 AND "guide_booking"."attractions"."rating_avg" <= 5)) | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE UNIQUE INDEX "attractions_slug_active_unique" ON "guide_booking"."attractions" USING btree ("slug") WHERE "guide_booking"."attractions"."deleted_at" IS NULL;--> statement-breakpoint | ||
| CREATE INDEX "idx_attractions_location" ON "guide_booking"."attractions" USING gist ("location");--> statement-breakpoint | ||
| CREATE INDEX "idx_attractions_type" ON "guide_booking"."attractions" USING btree ("type");--> statement-breakpoint | ||
| CREATE INDEX "idx_attractions_area" ON "guide_booking"."attractions" USING btree ("area");--> statement-breakpoint | ||
| CREATE INDEX "idx_attractions_is_active" ON "guide_booking"."attractions" USING btree ("is_active");--> statement-breakpoint | ||
| CREATE INDEX "idx_attractions_is_featured" ON "guide_booking"."attractions" USING btree ("is_featured");--> statement-breakpoint | ||
| CREATE INDEX "idx_attractions_created_at" ON "guide_booking"."attractions" USING btree ("created_at" DESC NULLS LAST); | ||
3 changes: 3 additions & 0 deletions
3
services/guide-booking/drizzle/20260317140321_white_diamondback.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| DROP INDEX "guide_booking"."attractions_slug_active_unique";--> statement-breakpoint | ||
| ALTER TABLE "guide_booking"."attractions" ALTER COLUMN "review_count" SET NOT NULL;--> statement-breakpoint | ||
| CREATE UNIQUE INDEX "attractions_slug_unique" ON "guide_booking"."attractions" USING btree ("slug"); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.