# `mix ash_scylla.new_template`
[🔗](https://github.com/ohhi-vn/ash_scylla/blob/main/lib/mix/tasks/ash_scylla.new_template.ex#L15)

Generates an Ash Resource template backed by AshScylla.

## Usage

    mix ash_scylla.new_template User name:string, email:string
    mix ash_scylla.new_template User name:string --domain MyApp.MyDomain
    mix ash_scylla.new_template User name:string --resource MyApp.MyDomain.User

The task writes a resource file under `lib/<app>/resources/<resource>.ex`.
It creates a starter template that you can customize with primary keys,
actions, repo, domain, and ScyllaDB-specific options.

## Options

- `--domain` - Domain module to include in the generated resource.
  The resource name is automatically prefixed with the domain module.
  For example: `--domain MyApp.MyDomain` with name `User` produces
  `MyApp.MyDomain.User`.

- `--resource` - Fully-qualified resource module name. Overrides the
  positional name argument entirely.
  For example: `--resource MyApp.MyDomain.User`.

## Examples

    # Simple resource (no domain)
    mix ash_scylla.new_template User user_id:uuid, name:string, age:int

    # Resource with domain (auto-prefixes name)
    mix ash_scylla.new_template User name:string --domain MyApp.MyDomain

    # Resource with fully-qualified name
    mix ash_scylla.new_template User name:string --resource MyApp.Games.User

---

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