Files
policy-service/lib/policy_service/aggregates/fire_policy_application.ex
HaimKortovich 5037bc3632
Some checks are pending
Build and Publish / build-release (push) Waiting to run
wip
2026-04-13 15:30:31 -05:00

12 lines
420 B
Elixir

defmodule PolicyService.Aggregates.FirePolicyApplication do
use PolicyService.Aggregates.PolicyApplication,
policy_type: "fire",
commands: PolicyService.Commands.FirePolicy
def validate_details(%{property_address: addr, property_value: val})
when is_binary(addr) and byte_size(addr) > 0 and is_number(val) and val > 0,
do: :ok
def validate_details(_), do: {:error, :invalid_fire_details}
end