Data Models Reference
Complete field reference for every DTO, record, and entity in the system.
SDUI Types
SectionDef
| Field | Type | Description |
|---|---|---|
id | string | Auto-generated UUID |
type | string | Unique identifier (e.g., HeroSection). Immutable after creation. |
name | string | Display name in admin UI |
description | string | Human-readable description |
category | string | Grouping in admin UI (e.g., layout, content, marketing) |
icon | string | Icon identifier or URL for admin UI |
platforms | string | Target platforms: ALL, WEB, MOBILE, TABLET |
tag | string | Metadata tag for filtering/search |
maxBlocks | int | Maximum child blocks allowed (0 = unlimited) |
settings | SettingDefinition[] | Configurable settings with types and defaults |
blocks | BlockSchema[] | Allowed child block types |
presets | Preset[] | Pre-configured section templates |
status | string | ACTIVE, DRAFT, DEPRECATED |
SettingDefinition
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Setting key (used in settings map) |
type | SettingType | Yes | Input type: TEXT, TEXTAREA, RICHTEXT, NUMBER, RANGE, CHECKBOX, SELECT, COLOR, IMAGE, VIDEO, URL, HTML |
label | string | Yes | Display label in admin UI |
defaultValue | any | No | Default when template doesn't override |
info | string | No | Help tooltip in admin UI |
placeholder | string | No | Placeholder for text inputs |
min | int | No | Minimum value (NUMBER, RANGE) |
max | int | No | Maximum value (NUMBER, RANGE) |
step | int | No | Increment step (NUMBER, RANGE) |
unit | string | No | Display unit (e.g., px, %, em) |
options | SelectOption[] | No | Dropdown options (SELECT type only) |
SelectOption
| Field | Type | Description |
|---|---|---|
value | string | Option value (stored in settings) |
label | string | Display label |
group | string | Optional grouping for categorized dropdowns |
BlockSchema
| Field | Type | Description |
|---|---|---|
type | string | Block type identifier (e.g., Button) |
name | string | Display name |
limit | int | Max instances of this block per section (0 = unlimited) |
settings | SettingDefinition[] | Block-level configurable settings with defaults |
Preset
| Field | Type | Description |
|---|---|---|
name | string | Preset name (e.g., "Hero with CTA", "Hero minimal") |
settings | Map | Pre-filled section settings |
blocks | PresetBlock[] | Pre-filled blocks |
PresetBlock
| Field | Type | Description |
|---|---|---|
type | string | Block type (must match a BlockSchema type) |
settings | Map | Pre-filled block settings |
SectionInstance
| Field | Type | Description |
|---|---|---|
id | string | Unique within template |
type | string | References a SectionDef type |
disabled | boolean | If true, excluded from render |
settings | Map | Overrides merged on top of definition defaults |
blocks | BlockInstance[] | Child blocks |
visibilityRules | VisibilityRule[] | Conditional rendering rules (AND logic) |
BlockInstance
| Field | Type | Description |
|---|---|---|
id | string | Unique within section |
type | string | References a BlockSchema type |
disabled | boolean | If true, excluded from render |
settings | Map | Overrides merged on top of block schema defaults |
visibilityRules | VisibilityRule[] | Conditional rendering rules |
VisibilityRule
| Field | Type | Description |
|---|---|---|
field | string | Context field: utm_source, utm_medium, utm_campaign, traffic_source, partner_id, loyalty_tier, device_type, geo_country |
operator | string | EQUALS, NOT_EQUALS, IN, NOT_IN, GREATER_THAN, LESS_THAN, CONTAINS, STARTS_WITH |
value | string | Value to compare. For IN/NOT_IN: comma-separated list. |
RenderContext
Passed to the renderer on the website module. Built from TrafficContext.
| Field | Type | Description |
|---|---|---|
platform | Platform | Resolved from device type: MOBILE, TABLET, WEB, ALL |
userId | string | Guest ID (if authenticated) |
contextData | Map | Flattened traffic context: utm_source, partner_id, loyalty_tier, etc. |
featureFlags | Set | Feature flags (reserved for future use) |
RenderResponse
| Field | Type | Description |
|---|---|---|
templateId | string | ID of the resolved template |
route | string | Route that was requested |
platform | string | Platform that matched |
sections | RenderedSection[] | Sections with merged settings, disabled/hidden excluded |
RenderedSection
| Field | Type | Description |
|---|---|---|
id | string | Section instance ID |
type | string | Section type |
settings | Map | Merged: definition defaults + instance overrides |
blocks | RenderedBlock[] | Rendered child blocks |
RenderedBlock
| Field | Type | Description |
|---|---|---|
id | string | Block instance ID |
type | string | Block type |
settings | Map | Merged: block schema defaults + instance overrides |
Traffic Context Types
TrafficContext
| Field | Type | Description |
|---|---|---|
bev | string | Browser Event Value cookie |
guestId | string | Linked guest ID (after login) |
utmSource | string | UTM source param |
utmMedium | string | UTM medium |
utmCampaign | string | UTM campaign |
utmTerm | string | UTM term |
utmContent | string | UTM content |
trafficSource | TrafficSource | Classified: ORGANIC, PAID, SOCIAL, EMAIL, REFERRAL, DIRECT, PARTNER |
referrerUrl | string | HTTP Referer header |
landingPage | string | First page visited |
partnerId | string | Partner ID (from param or header) |
deviceType | string | MOBILE, DESKTOP, TABLET, UNKNOWN |
userAgent | string | Raw User-Agent |
ipAddress | string | Client IP |
geoCountry | string | Country code from GeoIP |
loyaltyTierLevel | int | Loyalty tier (from account) |
Pricing Types
PricingContextRule
| Field | Type | Description |
|---|---|---|
| Predicates | All nullable — null means "match any" | |
trafficSource | string | ORGANIC, PAID, SOCIAL, EMAIL, REFERRAL, DIRECT, PARTNER |
utmSource | string | Exact match |
utmMedium | string | Exact match |
utmCampaign | string | Exact match |
partnerId | string | Exact match |
loyaltyTierMin | int | Tier >= this |
loyaltyTierMax | int | Tier <= this |
| Effects | ||
channelId | string | Override pricing channel |
additionalMultiplier | decimal | Price multiplier (0.90 = 10% off) |
additionalOfferIds | string[] | Extra offers to include |
disablePromotions | boolean | Hide all promotions |
disableCoupons | boolean | Hide all coupons |
disableBankOffers | boolean | Hide all bank offers |
allowedPromotionIds | string[] | Whitelist (empty = all pass) |
allowedBankOfferIds | string[] | Whitelist |
allowedCouponIds | string[] | Whitelist |
| Meta | ||
priority | int | Higher = evaluated first |
status | string | ACTIVE, INACTIVE |
startAt / endAt | Instant | Time bounds |
PricingAdjustment
Resolved output from a matched PricingContextRule.
| Field | Type | Description |
|---|---|---|
channelId | string | Override channel |
additionalMultiplier | BigDecimal | Price multiplier |
additionalOfferIds | Set | Extra offer IDs |
disablePromotions | boolean | Remove all promotions |
disableCoupons | boolean | Remove all coupons |
disableBankOffers | boolean | Remove all bank offers |
allowedPromotionIds | Set | Promotion whitelist |
allowedBankOfferIds | Set | Bank offer whitelist |
allowedCouponIds | Set | Coupon whitelist |
sourcePricingRuleId | Long | Which rule matched |
Sales Intelligence Types
SalesIntelligence
| Field | Type | Description |
|---|---|---|
listingId | string | Listing this applies to |
agentPitch | string | AI-generated (or human-edited) pitch text |
conversionSignals | ConversionSignal[] | Positive/negative signals |
salesTips | string[] | Actionable tips |
humanReviewed | boolean | If true, AI will not overwrite |
reviewedBy | string | User ID who reviewed |
reviewedAt | Instant | When reviewed |
bookingStats | BookingStats | Set manually by ops |
aiGeneratedAt | Instant | When AI last generated |
ConversionSignal
| Field | Type | Description |
|---|---|---|
type | string | POSITIVE, NEGATIVE, NEUTRAL |
icon | string | trend_up, price_tag, warning, star, location |
text | string | Signal description |
BookingStats
| Field | Type | Description |
|---|---|---|
bookingsThisMonth | int | Manual count |
lastBookedAgo | string | Human-readable (e.g., "2 days ago") |
ListingNote
| Field | Type | Description |
|---|---|---|
id | Long | Auto-generated |
listingId | string | FK to listing |
userId | string | FK to users table |
note | string | Agent's personal note |
createdAt | Instant | |
updatedAt | Instant |
Search Types
ListingSearchIntent
AI-extracted structured filters from a natural language query.
| Field | Type | Description |
|---|---|---|
listingIds | string[] | Ranked by AI relevance |
checkInDate | string | YYYY-MM-DD (resolved from "this weekend" etc.) |
checkOutDate | string | YYYY-MM-DD |
adultCount | int | Extracted from query |
childCount | int | Extracted from query |
city | string | Destination |
propertyType | string | Villa, Resort, etc. |
budgetPerNight | int | INR |
petFriendly | boolean | |
originalQuery | string | The raw query text |
ListingFilter (rawParams)
Complete list of all supported filter parameters. Generated from com.elivaas.common.dto.listing.FilterCatalog — do not edit by hand. Run ./gradlew :common:generateFilterDocs after adding a filter.
| filterName | Type | Example | Description |
|---|---|---|---|
channelId | string | B2C | Sales channel (B2C, B2B) |
city | string[] | ["Goa"] | Filter by city (case-insensitive) |
state | string[] | ["Himachal Pradesh"] | Filter by state (case-insensitive) |
country | string[] | ["India"] | Filter by country (case-insensitive) |
locality | string[] | ["Kasauli"] | Filter by locality (case-insensitive) |
listingId | string[] | ["lst_abc"] | Specific listing IDs (case-sensitive, opaque) |
brand | string[] | ["privé"] | Filter by brand (case-insensitive) |
propertyType | string[] | ["Villa"] | Villa, Apartment, Resort (case-insensitive) |
tags | string[] | ["Scenic Views"] | Required tags (post-filter, in-memory) |
amenities | string[] | ["Pool","Wifi"] | Required amenities (post-filter) |
roomView | string[] | ["Sea View","Mountain View"] | Matches property_views.view_name via property_view_mappings (case-insensitive) |
bhk | string[] | ["2 BHK","3"] | Leading int parsed; matches properties.total_bedrooms |
houseRules | string[] | ["smoking","alcohal"] | Matches property_rules.name via property_rule_mappings (case-insensitive). status not yet applied |
searchQuery | string | Nimishka | Text search on listing/property name (ILIKE) |
query | string | villa in goa for 4 adults next weekend | Natural-language query. Triggers AI intent extraction in the search controller, which synthesizes additional rawParam filters (city, dates, propertyType, etc.) and merges them into this request. Echoed back via response.rawParams so the UI can render selected filters. |
minPrice | int | 5000 | Min per-night price |
maxPrice | int | 20000 | Max per-night price |
minBedrooms | int | 2 | Min total bedrooms (sum of properties.total_bedrooms weighted by quantity) |
maxBedrooms | int | 5 | Max total bedrooms |
minBathrooms | int | 1 | Min bathrooms (column pending — currently no-op) |
maxBathrooms | int | 4 | Max bathrooms (column pending — currently no-op) |
minAdults | int | 2 | Min adult capacity (sum-weighted) |
maxAdults | int | 10 | Max adult capacity |
minRating | double | 4.0 | Min rating (column pending — currently no-op) |
adults | int | 4 | Required adults |
children | int | 2 | Required children |
infants | int | 1 | Required infants |
pets | int | 1 | Required pets |
checkInDate | string | 2026-06-01 | YYYY-MM-DD |
checkOutDate | string | 2026-06-04 | YYYY-MM-DD |
petFriendly | boolean | true | Pet-friendly only |
stressProperties | boolean | true | Stressed/deal properties |
allowCombination | boolean | true | Enable multi-listing groups |
maxListingsInGroup | int | 3 | Max listings per group (default 3) |
includeSingleListings | boolean | true | Include single-fit listings in result |
proximityMeters | double | 500 | Radius for combination grouping |
anchorLat | double | 15.5 | Anchor latitude for proximity |
anchorLon | double | 73.7 | Anchor longitude for proximity |
minSingleResults | int | 3 | Trigger combinations only below this many singles |
page | int | 1 | 1-based page index for singleListings |
size | int | 10 | Page size for singleListings |
bev | string | v_abc123 | Visitor cookie (auto-injected) |
partner_id | string | ptn_xyz | Partner (auto-injected or explicit) |
utm_source | string | google | UTM source |
utm_medium | string | cpc | UTM medium |
utm_campaign | string | summer-sale | UTM campaign |
Cache Types
CachedVisitorContext (Redis OM)
Stored in Redis with key prefix visitor_ctx:. TTL: 7 days.
| Field | Type | Indexed | Description |
|---|---|---|---|
bev | string | PK | Visitor cookie value |
partnerId | string | Yes | Partner ID |
utmSource | string | Yes | UTM source |
utmMedium | string | No | UTM medium |
utmCampaign | string | No | UTM campaign |
utmTerm | string | No | UTM term |
utmContent | string | No | UTM content |
trafficSource | string | No | Classified source |
guestId | string | No | Linked guest |
deviceType | string | No | Device type |
geoCountry | string | No | Country |
loyaltyTierLevel | int | No | Loyalty tier |
createdAtEpoch | long | No | Timestamp |
CachedSduiTemplate (Redis OM)
Stored in Redis with key prefix sdui_tpl:. TTL: 10 minutes.
| Field | Type | Indexed | Description |
|---|---|---|---|
cacheKey | string | PK | {app}:{route}:{platform} |
app | string | Yes | App namespace |
route | string | Yes | Route path |
platform | string | No | Platform |
templateId | string | No | Template ID |
sectionsJson | string | No | Serialized sections |
status | string | No | Template status |
version | long | No | Version number |
Partner
| Field | Type | Description |
|---|---|---|
id | string | PK (e.g., VISA, HDFC) |
name | string | Display name |
contactEmail | string | Partnership contact |
channelId | string | Optional dedicated pricing channel |
defaultUtmSource | string | Default UTM for attribution |
status | string | ACTIVE, INACTIVE |
metadata | JSONB | Custom data |