|
| 1 | +using System; |
| 2 | +using CommandLine; |
| 3 | + |
| 4 | +namespace Hawaii.Cli.Classes |
| 5 | +{ |
| 6 | + public sealed class CommandLineOptions |
| 7 | + { |
| 8 | + [Option('n', "name", Required = false, HelpText = "file name")] |
| 9 | + public String? name { get; set; } |
| 10 | + |
| 11 | + [Option("database-type", Required = false, HelpText = "Type of database to connect")] |
| 12 | + public String? databaseType { get; set; } |
| 13 | + |
| 14 | + [Option("connection-string", Required = false, HelpText = "Connection details to connect to database")] |
| 15 | + public String? connectionString { get; set; } |
| 16 | + |
| 17 | + //TODO: Link options with Specidied commands |
| 18 | + // we need to make sure certain options are only required with certain commands. |
| 19 | + // for example: source is required only with add/update and not init |
| 20 | + |
| 21 | + [Option('s', "source", Required = false, HelpText = "name of the table")] |
| 22 | + public String? source { get; set; } |
| 23 | + |
| 24 | + [Option("rest", Required = false, HelpText = "route for rest api")] |
| 25 | + public String? restRoute { get; set; } |
| 26 | + |
| 27 | + [Option("graphql", Required = false, HelpText = "Type of graphQL")] |
| 28 | + public String? graphQLType { get; set; } |
| 29 | + |
| 30 | + [Option("permission", Required = false, HelpText = "permission required to acess source table")] |
| 31 | + public String? permission { get; set; } |
| 32 | + |
| 33 | + [Option("fields.include", Required = false, HelpText = "fields that are allowed access to permission")] |
| 34 | + public String? fieldsToInclude { get; set; } |
| 35 | + |
| 36 | + [Option("fields.exclude", Required = false, HelpText = "fields that are excluded from the action lists")] |
| 37 | + public String? fieldsToExclude { get; set; } |
| 38 | + |
| 39 | + [Option("relationship", Required = false, HelpText = "specify relationship between two entities")] |
| 40 | + public String? relationship { get; set; } |
| 41 | + |
| 42 | + [Option("target.entity", Required = false, HelpText = "specify relationship between two entities")] |
| 43 | + public String? targetEntity { get; set; } |
| 44 | + |
| 45 | + [Option("cardinality", Required = false, HelpText = "specify relationship between two entities")] |
| 46 | + public String? cardinality { get; set; } |
| 47 | + |
| 48 | + [Option("mapping.fields", Required = false, HelpText = "specify relationship between two entities")] |
| 49 | + public String? mappingFields { get; set; } |
| 50 | + |
| 51 | + [Option(Default = false, HelpText = "Prints all messages to standard output.")] |
| 52 | + public bool Verbose { get; set; } |
| 53 | + |
| 54 | + } |
| 55 | +} |
0 commit comments