Model Generator
Overview
azu generate model <name> [field:type] [options]Basic Usage
# Generate a basic model
azu generate model user
# Generate with fields
azu generate model user name:string email:string age:int32
# Generate with relationships
azu generate model post title:string content:text user_id:referencesCommand Options
Option
Description
Default
Field Types
Type
Crystal Type
Database Type
Description
Generated Files
Model File
Migration File
Examples
User Model
Post Model with Relationships
Category Model with UUID
Relationships
belongs_to
has_many
has_one
many_to_many
Validations
Scopes
Query Examples
Last updated