remove version
All checks were successful
Build and Publish / build-release (push) Successful in 1m23s
All checks were successful
Build and Publish / build-release (push) Successful in 1m23s
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user