{"id":31064911,"url":"https://github.com/pkg6/gormgen","last_synced_at":"2025-09-15T15:05:51.406Z","repository":{"id":299537005,"uuid":"1003346865","full_name":"pkg6/gormgen","owner":"pkg6","description":"Install gorm GEN as a binary tool","archived":false,"fork":false,"pushed_at":"2025-06-17T03:29:36.000Z","size":337,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-17T03:34:43.181Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pkg6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-17T02:34:30.000Z","updated_at":"2025-06-17T03:04:23.000Z","dependencies_parsed_at":"2025-06-17T03:36:04.696Z","dependency_job_id":"04c4c6d6-64be-46d7-94cd-35abde8ff11c","html_url":"https://github.com/pkg6/gormgen","commit_stats":null,"previous_names":["pkg6/gormgen"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pkg6/gormgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fgormgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fgormgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fgormgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fgormgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkg6","download_url":"https://codeload.github.com/pkg6/gormgen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Fgormgen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275274479,"owners_count":25435786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-15T15:05:47.729Z","updated_at":"2025-09-15T15:05:51.382Z","avatar_url":"https://github.com/pkg6.png","language":"Go","readme":"# gormgen\n\nInstall GEN as a binary tool\n\n## install\n\n```shell\ngo install github.com/pkg6/gormgen@latest\n```\n\n## usage\n\n```shell\n \n gormgen -h  \n \n Usage of gormgen:\n  -db string\n        input mysql|postgres|sqlite|sqlserver|clickhouse. consult[https://gorm.io/docs/connecting_to_the_database.html] (default \"mysql\")\n  -dsn string\n        consult[https://gorm.io/docs/connecting_to_the_database.html]\n  -fieldNullable\n        generate with pointer when field is nullable\n  -fieldCoverable\n        generate with pointer when field has default value\n  -fieldWithIndexTag\n        generate field with gorm index tag\n  -fieldWithTypeTag\n        generate field with gorm column type tag\n  -modelPkgName string\n        generated model code's package name\n  -outFile string\n        query code file name, default: gen.go\n  -outPath string\n        specify a directory for output (default \"./dao/query\")\n  -tables string\n        enter the required data table or leave it blank\n  -onlyModel\n        only generate models (without query file)\n  -withUnitTest\n        generate unit test for query code\n  -fieldSignable\n        detect integer field's unsigned type, adjust generated data type\n\n```\n#### c\ndefault \"\"\nIs path for gen.yml\nReplace the command line with a configuration file\nThe command line is the highest priority\n\n\n#### db\n\ndefault:mysql\n\ninput mysql or postgres or sqlite or sqlserver.\n\nconsult : https://gorm.io/docs/connecting_to_the_database.html\n\n#### dsn\n\nYou can use all gorm's dsn.\n\nconsult : https://gorm.io/docs/connecting_to_the_database.html\n\n#### fieldNullable\n\ngenerate with pointer when field is nullable\n\n#### fieldCoverable\n\ngenerate with pointer when field has default value\n\n#### fieldWithIndexTag\n\ngenerate field with gorm index tag\n\n#### fieldWithTypeTag\n\ngenerate field with gorm column type tag\n\n#### modelPkgName\n\ndefalut table name.\n\ngenerated model code's package name.\n\n#### outFile\n\nquery code file name, default: gen.go\n\n#### outPath\n\nspecify a directory for output (default \"./dao/query\")\n\n#### tables\n\nValue : enter the required data table or leave it blank.\n\neg :\n\n​       --tables=\"orders\" #orders table\n\n​       --tables=\"orders,users\" #orders table and users table\n\n​       --tables=\"\"          # All data tables in the database.\n\nGenerate some tables code.\n\n#### withUnitTest\n\nValue : False / True\n\nGenerate unit test.\n\n#### fieldSignable\n\nValue : False / True\n\ndetect integer field's unsigned type, adjust generated data type\n\n\n\n### example\n\n```shell\ngormgen -dsn \"user:pwd@tcp(127.0.0.1:3306)/database?charset=utf8mb4\u0026parseTime=True\u0026loc=Local\" -tables \"orders,doctor\"\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkg6%2Fgormgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkg6%2Fgormgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkg6%2Fgormgen/lists"}