View Source Glific.Flows.FlowCount (Glific v5.1.6)

The flow count object

Link to this section Summary

Functions

Standard changeset pattern we use for all data types

Create flow count

Get a list of flow count

Resets the flow count for a given flow

Upsert flow count

Link to this section Types

@type t() :: %Glific.Flows.FlowCount{
  __meta__: Ecto.Schema.Metadata.t(),
  count: integer() | nil,
  destination_uuid: Ecto.UUID.t() | nil,
  flow: Glific.Flows.Flow.t() | Ecto.Association.NotLoaded.t() | nil,
  flow_id: non_neg_integer() | nil,
  flow_uuid: Ecto.UUID.t() | nil,
  id: non_neg_integer() | nil,
  inserted_at: :utc_datetime | nil,
  organization:
    Glific.Partners.Organization.t() | Ecto.Association.NotLoaded.t() | nil,
  organization_id: non_neg_integer() | nil,
  recent_messages: [map()] | nil,
  type: String.t() | nil,
  updated_at: :utc_datetime | nil,
  uuid: Ecto.UUID.t() | nil
}

Link to this section Functions

Link to this function

changeset(flow_revision, attrs)

View Source
@spec changeset(t(), map()) :: Ecto.Changeset.t()

Standard changeset pattern we use for all data types

Link to this function

create_flow_count(attrs)

View Source
@spec create_flow_count(map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

Create flow count

Link to this function

get_flow_count_list(flow_uuid)

View Source
@spec get_flow_count_list(Ecto.UUID.t()) :: :error | list()

Get a list of flow count

Link to this function

reset_flow_count(flow_id)

View Source
@spec reset_flow_count(non_neg_integer()) :: any()

Resets the flow count for a given flow

Link to this function

update_flow_count(flow_count, attrs)

View Source
@spec update_flow_count(t(), map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

Update flow count

Link to this function

upsert_flow_count(attrs)

View Source
@spec upsert_flow_count(map()) :: :error | t()

Upsert flow count