fix query helpers and add policy type to projections
All checks were successful
Build and Publish / build-release (push) Successful in 1m34s
All checks were successful
Build and Publish / build-release (push) Successful in 1m34s
This commit is contained in:
@@ -8,13 +8,14 @@ defmodule WorkloadService.Projections.Task do
|
||||
import Ecto.Changeset
|
||||
|
||||
@derive {Flop.Schema,
|
||||
filterable: [:status, :org_id, :application_id],
|
||||
filterable: [:status, :org_id, :application_id, :policy_type],
|
||||
sortable: [:inserted_at, :updated_at, :status]}
|
||||
|
||||
@primary_key {:id, :string, []}
|
||||
schema "tasks" do
|
||||
field(:org_id, :string)
|
||||
field(:application_id, :string)
|
||||
field(:policy_type, :string)
|
||||
field(:task_info, :map)
|
||||
field(:submission, :map)
|
||||
field(:attachments, {:array, :string})
|
||||
@@ -37,6 +38,7 @@ defmodule WorkloadService.Projections.Task do
|
||||
:id,
|
||||
:org_id,
|
||||
:application_id,
|
||||
:policy_type,
|
||||
:task_info,
|
||||
:submission,
|
||||
:attachments,
|
||||
|
||||
@@ -14,6 +14,7 @@ defmodule WorkloadService.Projectors.TaskProjector do
|
||||
id: to_string(e.id),
|
||||
org_id: e.id.org_id,
|
||||
application_id: to_string(e.application_id),
|
||||
policy_type: e.application_id.policy_type,
|
||||
task_info: e.task_info,
|
||||
attachments: e.attachments || [],
|
||||
status: "created"
|
||||
|
||||
Reference in New Issue
Block a user