All checks were successful
Build and Publish / build-release (push) Successful in 1m23s
40 lines
1003 B
Elixir
40 lines
1003 B
Elixir
defmodule WorkloadService.Events do
|
|
@moduledoc """
|
|
All domain events for the workload service.
|
|
"""
|
|
|
|
defmodule TaskCreated do
|
|
@moduledoc """
|
|
Emitted when a new task is created (quote or solicitation).
|
|
ID format: "org_id:type:task_id" (e.g., "test:quote:uuid") - TaskId struct
|
|
"""
|
|
@derive Jason.Encoder
|
|
defstruct [:id, :application_id, :task_info, :attachments]
|
|
end
|
|
|
|
defmodule SubmissionUpdated do
|
|
@moduledoc """
|
|
Emitted when submission is updated (user provides response data).
|
|
"""
|
|
@derive Jason.Encoder
|
|
defstruct [:id, :submission, :attachments]
|
|
end
|
|
|
|
defmodule SubmissionApproved do
|
|
@moduledoc """
|
|
Emitted when submission is approved and ready to send.
|
|
"""
|
|
@derive Jason.Encoder
|
|
defstruct [:id]
|
|
end
|
|
|
|
defmodule TaskCompleted do
|
|
@moduledoc """
|
|
Emitted when task is completed and sent to policy-service.
|
|
Triggers RabbitMQ publish.
|
|
"""
|
|
@derive Jason.Encoder
|
|
defstruct [:id, :completed_by]
|
|
end
|
|
end
|