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