521 B · text History b868907
defmodule GitGud.Workflows.CacheEntryPart do
  @moduledoc """
  One uploaded chunk of a pending `CacheEntry`: the bytes at
  `offset..offset+size-1` of the final object, stored under `storage_key`
  until `ActionsCache.finalize/2` assembles the entry.
  """

  use Ecto.Schema

  alias GitGud.Workflows.CacheEntry

  schema "cache_entry_parts" do
    field :offset, :integer
    field :size, :integer
    field :storage_key, :string

    belongs_to :cache_entry, CacheEntry

    timestamps(type: :utc_datetime)
  end
end