class
AmberCLI::Commands::GenerateCommand
- AmberCLI::Commands::GenerateCommand
- AmberCLI::Core::BaseCommand
- Reference
- Object
Defined in:
amber_cli/commands/generate.crConstant Summary
-
DEFAULT_AUTH_MODEL_NAME =
"User" -
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"} -
PREVIEW_TYPES =
["api", "auth"] of ::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\""}, "reference" => {type: "Int64", options: ""}} -
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
- #actions : Array(String)
- #execute
- #fields : Array(Tuple(String, String))
- #generator_type : String
- #help_description : String
-
#mailer_actions : Array(String)
Mailer generator options
- #max_retries : Int32
- #name : String
-
#queue_name : String
Job generator options
-
#references : Array(String)
Association names for
name:referencefields. -
#schema_fields : Array(Tuple(String, String, Bool))
Schema generator options
- #setup_command_options
-
#topics : Array(String)
Channel generator options
- #validate_arguments
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 references : Array(String)
#
Association names for name:reference fields. Each one becomes a
belongs_to and a <name>_id foreign key column.