class AmberCLI::Commands::GenerateCommand

Defined in:

amber_cli/commands/generate.cr

Constant Summary

FIELD_TYPE_MAP = {"string" => "String", "text" => "String", "integer" => "Int32", "int" => "Int32", "int32" => "Int32", "int64" => "Int64", "float" => "Float64", "float64" => "Float64", "decimal" => "Float64", "bool" => "Bool", "boolean" => "Bool", "time" => "Time", "timestamp" => "Time", "reference" => "Int64", "uuid" => "String", "email" => "String"}
SCHEMA_TYPE_MAP = {"string" => {type: "String", options: ""}, "text" => {type: "String", options: ""}, "integer" => {type: "Int32", options: ""}, "int" => {type: "Int32", options: ""}, "int32" => {type: "Int32", options: ""}, "int64" => {type: "Int64", options: ""}, "float" => {type: "Float64", options: ""}, "float64" => {type: "Float64", options: ""}, "decimal" => {type: "Float64", options: ""}, "bool" => {type: "Bool", options: ""}, "boolean" => {type: "Bool", options: ""}, "time" => {type: "Time", options: ", format: \"datetime\""}, "timestamp" => {type: "Time", options: ", format: \"datetime\""}, "email" => {type: "String", options: ", format: \"email\""}, "uuid" => {type: "String", options: ", format: \"uuid\""}}

Maps CLI field types to Schema field types with default options

VALID_TYPES = ["model", "controller", "scaffold", "migration", "mailer", "job", "schema", "channel", "api", "auth"] of ::String

Instance Method Summary

Instance methods inherited from class AmberCLI::Core::BaseCommand

execute execute, help_description : String help_description, option_parser : OptionParser option_parser, parse_and_execute(args : Array(String)) parse_and_execute, parsed_options : Hash(String, String | Bool | Array(String)) parsed_options, remaining_arguments : Array(String) remaining_arguments, setup_command_options setup_command_options

Constructor methods inherited from class AmberCLI::Core::BaseCommand

new(command_name : String) new

Instance Method Detail

def actions : Array(String) #

[View source]
def execute #

[View source]
def fields : Array(Tuple(String, String)) #

[View source]
def generator_type : String #

[View source]
def help_description : String #

[View source]
def mailer_actions : Array(String) #

Mailer generator options


[View source]
def max_retries : Int32 #

[View source]
def name : String #

[View source]
def queue_name : String #

Job generator options


[View source]
def schema_fields : Array(Tuple(String, String, Bool)) #

Schema generator options


[View source]
def setup_command_options #

[View source]
def topics : Array(String) #

Channel generator options


[View source]
def validate_arguments #

[View source]