feat(listings): add ROOM_RENTAL, CONDOTEL, SERVICED_APARTMENT property types (GOO-20)

- Add ROOM_RENTAL, CONDOTEL, SERVICED_APARTMENT to PropertyType enum in schema.prisma
- Create migration 20260422010000_add_room_rental_property_types with ALTER TYPE ADD VALUE
- Add DEFAULT_RANGES in PrismaPriceValidator: ROOM_RENTAL 1M-10M VND/month, CONDOTEL 20M-300M, SERVICED_APARTMENT 20M-250M VND/m²
- Add i18n translations: vi "Phòng trọ / Condotel / Căn hộ dịch vụ", en "Room Rental / Condotel / Serviced Apartment"
- Typesense indexes propertyType as a generic string facet — no schema change needed

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-22 23:26:01 +07:00
parent ee6d6d4c17
commit c478abae38
8 changed files with 151 additions and 6 deletions

View File

@@ -45,7 +45,7 @@ export function createPropertySearchServer(deps: PropertySearchDeps): McpServer
'Search property listings using natural language queries with filters.',
SearchPropertiesSchema,
async (params: z.infer<z.ZodObject<typeof SearchPropertiesSchema>>) => {
const filters: string[] = ['status:=active'];
const filters: string[] = ['status:=ACTIVE'];
if (params.propertyType) filters.push(`propertyType:=${params.propertyType}`);
if (params.transactionType) filters.push(`transactionType:=${params.transactionType}`);