# `Concord.KV.Record`
[🔗](https://github.com/gsmlg-dev/concord/blob/main/lib/concord/kv/record.ex#L1)

Per-key revisioned record in Concord's MVCC store.

Every key in Concord is backed by a `Record` that tracks its full revision
history metadata. Records are the internal representation stored in ETS;
the public API can return either bare values (for backward compatibility)
or full records (with `metadata: true`).

## Fields

- `value` — The stored value (any Erlang term)
- `create_revision` — Cluster revision when the key was first created
  (resets on delete-and-recreate)
- `mod_revision` — Cluster revision of the latest mutation
- `version` — Count of writes since creation; `0` means tombstone (deleted)
- `expires_at` — Absolute timestamp (seconds) of TTL expiry, or `nil`
- `lease_id` — Lease this key is attached to, or `nil`
- `content_type` — Optional MIME-ish hint (e.g., `"text/markdown"`)
- `metadata` — Optional application-level metadata map

# `t`

```elixir
@type t() :: %Concord.KV.Record{
  content_type: binary() | nil,
  create_revision: non_neg_integer(),
  expires_at: non_neg_integer() | nil,
  lease_id: non_neg_integer() | nil,
  metadata: map(),
  mod_revision: non_neg_integer(),
  value: term(),
  version: non_neg_integer()
}
```

# `expired?`

```elixir
@spec expired?(t(), non_neg_integer()) :: boolean()
```

Returns `true` if this record has expired based on the given current time.

# `tombstone`

```elixir
@spec tombstone(binary(), non_neg_integer(), t() | nil) :: t()
```

Creates a tombstone record for a deleted key.

# `tombstone?`

```elixir
@spec tombstone?(t()) :: boolean()
```

Returns `true` if this record is a tombstone (deleted key).

