remove version
All checks were successful
Build and Publish / build-release (push) Successful in 1m23s

This commit is contained in:
2026-04-17 11:52:55 -05:00
parent 1152b78f3e
commit 1e493840de
5 changed files with 6 additions and 16 deletions

View File

@@ -33,8 +33,7 @@ defmodule WorkloadService.Aggregates.Task do
:task_info,
:submission,
:attachments,
:status,
:version
:status
]
@impl Aggregate
@@ -99,8 +98,7 @@ defmodule WorkloadService.Aggregates.Task do
application_id: e.application_id,
task_info: e.task_info,
attachments: e.attachments,
status: "created",
version: agg.version + 1
status: "created"
}
end
@@ -110,8 +108,7 @@ defmodule WorkloadService.Aggregates.Task do
agg
| submission: e.submission,
attachments: e.attachments || [],
status: "draft",
version: agg.version + 1
status: "draft"
}
end
@@ -119,8 +116,7 @@ defmodule WorkloadService.Aggregates.Task do
def apply(%__MODULE__{} = agg, %WorkloadService.Events.SubmissionApproved{}) do
%{
agg
| status: "approved",
version: agg.version + 1
| status: "approved"
}
end
@@ -128,8 +124,7 @@ defmodule WorkloadService.Aggregates.Task do
def apply(%__MODULE__{} = agg, %WorkloadService.Events.TaskCompleted{}) do
%{
agg
| status: "completed",
version: agg.version + 1
| status: "completed"
}
end

View File

@@ -19,7 +19,6 @@ defmodule WorkloadService.Projections.Task do
field(:submission, :map)
field(:attachments, {:array, :string})
field(:status, :string)
field(:version, :integer, default: 1)
timestamps(type: :utc_datetime)
end
@@ -41,8 +40,7 @@ defmodule WorkloadService.Projections.Task do
:task_info,
:submission,
:attachments,
:status,
:version
:status
])
|> validate_required([
:id,