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:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user