# `Ecto.ERD.Node`
[🔗](https://github.com/fuelen/ecto_erd/blob/v0.7.0/lib/ecto/erd/node.ex#L1)

Node struct.

* If `source` is `nil`, then `schema_module` cannot be `nil` and node describes embedded schema.
* If `source` is not `nil` and `schema_module` is not `nil`, then the node describes a regular schema.
* If `schema_module` is `nil`, then `source` cannot be `nil`, and the node describes a source (table) that was
automatically inferred from many-to-many relations.
* If `cluster` is `nil`, then the node is rendered outside any cluster.

# `t`

```elixir
@type t() :: %Ecto.ERD.Node{
  cluster: nil | String.t(),
  fields: [Ecto.ERD.Field.t()],
  schema_module: nil | module(),
  source: nil | String.t()
}
```

# `set_cluster`

```elixir
@spec set_cluster(t(), nil | String.t()) :: t()
```

Set a `cluster` for the given `node`.

A cluster is a group of nodes that are displayed together.

---

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