# `Milvex.Collection.Transformers.DefineStruct`

Transformer that generates a struct and @type t from the Collection DSL fields.

This makes Collection modules work like Ecto schemas - the field names from the
DSL become struct fields with appropriate types.

## Example

    defmodule MyApp.Movies do
      use Milvex.Collection

      collection do
        name "movies"
        fields do
          primary_key :id, :int64
          varchar :title, 256
          vector :embedding, 128
        end
      end
    end

    # Generates:
    # @type t :: %MyApp.Movies{id: integer(), title: String.t(), embedding: [float()]}
    # defstruct [:id, :title, :embedding]

    movie = %MyApp.Movies{id: 1, title: "Inception", embedding: [0.1, 0.2]}

# `after?`

# `after_compile?`

# `before?`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
