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
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Standard changeset pattern we use for all data types
Return the count of consulting hours, using the same filter as list_consulting_hours
@spec create_consulting_hour(map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}
Create a consulting_hour record
@spec delete_consulting_hour(t()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}
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.
examples
Examples
iex> list_consulting_hours()
[%ConsultingHour{}, ...]
@spec update_consulting_hour(t(), map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}
Update the consulting_hour record