This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
defmodule PolicyService.Events.Car.CarPolicyApplicationSubmitted do
|
||||
@derive Jason.Encoder
|
||||
defstruct [
|
||||
:application_id,
|
||||
:org_id,
|
||||
:submitted_by,
|
||||
:applicant_info,
|
||||
:car_details,
|
||||
:selected_providers,
|
||||
:submitted_at
|
||||
]
|
||||
end
|
||||
|
||||
defmodule PolicyService.Events.Car.CarQuoteRequestSent do
|
||||
@derive Jason.Encoder
|
||||
defstruct [
|
||||
:application_id,
|
||||
:org_id,
|
||||
:provider_id,
|
||||
:provider_email,
|
||||
:applicant_info,
|
||||
:car_details,
|
||||
:requested_at
|
||||
]
|
||||
end
|
||||
|
||||
defmodule PolicyService.Events.Car.CarProviderQuoteReceived do
|
||||
@derive Jason.Encoder
|
||||
defstruct [
|
||||
:application_id,
|
||||
:org_id,
|
||||
:recorded_by,
|
||||
:provider_id,
|
||||
:quote_id,
|
||||
:premium,
|
||||
:coverage_details,
|
||||
:valid_until,
|
||||
:received_at
|
||||
]
|
||||
end
|
||||
|
||||
defmodule PolicyService.Events.Car.AllCarQuotesReceived do
|
||||
@derive Jason.Encoder
|
||||
defstruct [:application_id, :org_id, :quote_count]
|
||||
end
|
||||
|
||||
defmodule PolicyService.Events.Car.CarQuoteAccepted do
|
||||
@derive Jason.Encoder
|
||||
defstruct [:application_id, :org_id, :accepted_by, :quote_id, :provider_id, :accepted_at]
|
||||
end
|
||||
|
||||
defmodule PolicyService.Events.Car.CarSolicitationSent do
|
||||
@derive Jason.Encoder
|
||||
defstruct [:application_id, :org_id, :provider_id, :quote_id, :sent_at]
|
||||
end
|
||||
|
||||
defmodule PolicyService.Events.Car.CarPolicyIssued do
|
||||
@derive Jason.Encoder
|
||||
defstruct [
|
||||
:application_id,
|
||||
:org_id,
|
||||
:recorded_by,
|
||||
:policy_number,
|
||||
:provider_id,
|
||||
:effective_date,
|
||||
:expiry_date,
|
||||
:issued_at
|
||||
]
|
||||
end
|
||||
80
lib/policy_service/events/policy.ex
Normal file
80
lib/policy_service/events/policy.ex
Normal file
@@ -0,0 +1,80 @@
|
||||
defmodule PolicyService.Events.Policy do
|
||||
defmodule PolicyApplicationSubmitted do
|
||||
@derive Jason.Encoder
|
||||
defstruct [
|
||||
:id,
|
||||
:submitted_by,
|
||||
:applicant_info,
|
||||
:policy_details,
|
||||
:selected_providers,
|
||||
:submitted_at
|
||||
]
|
||||
end
|
||||
|
||||
defmodule QuoteRequestSent do
|
||||
@derive Jason.Encoder
|
||||
defstruct [
|
||||
:id,
|
||||
:provider_id,
|
||||
:provider_email,
|
||||
:applicant_info,
|
||||
:policy_details,
|
||||
:requested_at
|
||||
]
|
||||
end
|
||||
|
||||
defmodule ProviderQuoteReceived do
|
||||
@derive Jason.Encoder
|
||||
defstruct [
|
||||
:id,
|
||||
:recorded_by,
|
||||
:provider_id,
|
||||
:quote_id,
|
||||
:premium,
|
||||
:coverage_details,
|
||||
:valid_until,
|
||||
:plans,
|
||||
:received_at
|
||||
]
|
||||
end
|
||||
|
||||
defmodule AllQuotesReceived do
|
||||
@derive Jason.Encoder
|
||||
defstruct [:id, :org_id, :quote_count]
|
||||
end
|
||||
|
||||
defmodule QuoteAccepted do
|
||||
@derive Jason.Encoder
|
||||
defstruct [
|
||||
:id,
|
||||
:accepted_by,
|
||||
:quote,
|
||||
:plan,
|
||||
:provider,
|
||||
:accepted_at
|
||||
]
|
||||
end
|
||||
|
||||
defmodule SolicitationSent do
|
||||
@derive Jason.Encoder
|
||||
defstruct [
|
||||
:id,
|
||||
:solicitation_id,
|
||||
:provider_id,
|
||||
:template_id,
|
||||
:s3_key,
|
||||
:sent_at
|
||||
]
|
||||
end
|
||||
|
||||
defmodule PolicyIssued do
|
||||
@derive Jason.Encoder
|
||||
defstruct [
|
||||
:id,
|
||||
:policy_number,
|
||||
:effective_date,
|
||||
:expiry_date,
|
||||
:issued_at
|
||||
]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user