filter mails by property contact alias

This commit is contained in:
androidlover5842
2026-01-24 21:57:06 +05:30
parent 9300a85bd3
commit 0d3472c60e
12 changed files with 178 additions and 16 deletions

View File

@@ -49,6 +49,9 @@ class Booking(
@Column(name = "expected_checkout_at", columnDefinition = "timestamptz")
var expectedCheckoutAt: OffsetDateTime? = null,
@Column(name = "email_audit_pdf_url")
var emailAuditPdfUrl: String? = null,
var notes: String? = null,
@ManyToOne(fetch = FetchType.LAZY)

View File

@@ -49,6 +49,9 @@ class InboundEmail(
@Column(name = "raw_pdf_path")
var rawPdfPath: String? = null,
@Column(name = "raw_eml_path")
var rawEmlPath: String? = null,
@Column(name = "extracted_data", columnDefinition = "jsonb")
var extractedData: String? = null,

View File

@@ -14,5 +14,14 @@ class Organization {
@Column(nullable = false)
var name: String? = null
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(
name = "org_email_alias",
joinColumns = [JoinColumn(name = "org_id")]
)
@Column(name = "email", nullable = false)
var emailAliases: MutableSet<String> = mutableSetOf()
@Column(name = "created_at", nullable = false, columnDefinition = "timestamptz")
val createdAt: OffsetDateTime = OffsetDateTime.now() }
val createdAt: OffsetDateTime = OffsetDateTime.now()
}

View File

@@ -37,6 +37,14 @@ class Property(
@Column(name = "address_text")
var addressText: String? = null,
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(
name = "property_email_address",
joinColumns = [JoinColumn(name = "property_id")]
)
@Column(name = "email", nullable = false)
var emailAddresses: MutableSet<String> = mutableSetOf(),
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(
name = "property_email_alias",