# `Lightning.Projects.Project`
[🔗](https://github.com/OpenFn/lightning/blob/main/lib/lightning/projects/project.ex#L1)

Project model

# `retention_policy_type`

```elixir
@type retention_policy_type() :: :retain_all | :retain_with_errors | :erase_all
```

# `t`

```elixir
@type t() :: %Lightning.Projects.Project{
  __meta__: Ecto.Schema.Metadata.t(),
  allow_support_access: term(),
  channels: term(),
  collections: term(),
  color: term(),
  concurrency: term(),
  credentials: term(),
  dataclip_retention_period: term(),
  description: term(),
  env: term(),
  history_retention_period: term(),
  id: Ecto.UUID.t() | nil,
  inserted_at: term(),
  jobs: term(),
  keychain_credentials: term(),
  name: term(),
  oauth_clients: term(),
  parent: term(),
  parent_id: term(),
  project_credentials: term(),
  project_oauth_clients: term(),
  project_users:
    [Lightning.Projects.ProjectUser.t()] | Ecto.Association.NotLoaded.t(),
  raw_name: term(),
  requires_mfa: term(),
  retention_policy: term(),
  sandboxes: term(),
  scheduled_deletion: term(),
  starting_dataclip_id: term(),
  updated_at: term(),
  users: term(),
  workflows: term()
}
```

# `data_retention_options`

```elixir
@spec data_retention_options() :: [pos_integer(), ...]
```

# `deletion_changeset`

Changeset to validate a project deletion request, the user must enter the
projects name to confirm.

# `display_name`

```elixir
@spec display_name(t()) :: String.t()
```

Returns a display name for the project.

Walks up the loaded parent chain to build the full path,
e.g. `"root:child:grandchild"`. Stops when parent is nil or not loaded.

# `form_changeset`

Changeset for forms that accept a human-friendly `:raw_name` and derive
the URL-safe `:name` automatically.

# `form_with_users_changeset`

Like `form_changeset/2` but also casts the `:project_users` association.

# `project_with_users_changeset`

# `sandbox?`

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

Returns `true` if the project is a sandbox (i.e. `parent_id` is a UUID),
`false` otherwise.

# `validate`

---

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