View Source Glific.Saas.ConsultingHour (Glific v5.1.6)

The table structure to record consulting hours

Link to this section Summary

Functions

Standard changeset pattern we use for all data types

Return the count of consulting hours, using the same filter as list_consulting_hours

Create a consulting_hour record

Delete the consulting_hour record

Return the count of consulting hours, using the same filter as list_consulting_hours

Retrieve a consulting_hour record by clauses

Returns the list of consulting hours.

Update the consulting_hour record

Link to this section Types

@type t() :: %Glific.Saas.ConsultingHour{
  __meta__: Ecto.Schema.Metadata.t(),
  content: String.t() | nil,
  duration: non_neg_integer() | nil,
  id: non_neg_integer() | nil,
  inserted_at: :utc_datetime | nil,
  is_billable: boolean() | true,
  organization:
    Glific.Partners.Organization.t() | Ecto.Association.NotLoaded.t() | nil,
  organization_id: non_neg_integer() | nil,
  organization_name: String.t() | nil,
  participants: String.t() | nil,
  staff: String.t() | nil,
  updated_at: :utc_datetime | nil,
  when: DateTime.t() | nil
}

Link to this section Functions

Link to this function

changeset(consulting_hour, attrs)

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

Standard changeset pattern we use for all data types

Link to this function

count_consulting_hours(args)

View Source
@spec count_consulting_hours(map()) :: integer()

Return the count of consulting hours, using the same filter as list_consulting_hours

Link to this function

create_consulting_hour(attrs)

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

Create a consulting_hour record

Link to this function

delete_consulting_hour(consulting_hour)

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

Delete the consulting_hour record

Link to this function

fetch_consulting_hours(args)

View Source
@spec fetch_consulting_hours(map()) :: String.t()

Return the count of consulting hours, using the same filter as list_consulting_hours

Link to this function

get_consulting_hour(clauses)

View Source
@spec get_consulting_hour(map()) :: t() | nil

Retrieve a consulting_hour record by clauses

Link to this function

list_consulting_hours(args)

View Source
@spec list_consulting_hours(map()) :: [t()]

Returns the list of consulting hours.

examples

Examples

iex> list_consulting_hours()
[%ConsultingHour{}, ...]
Link to this function

update_consulting_hour(consulting_hour, attrs)

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

Update the consulting_hour record