-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cmd/gf): table and field names converted to its lower case before…
… CamelCase converting in command `gen dao` (#3801)
- Loading branch information
Showing
12 changed files
with
284 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
cmd/gf/internal/cmd/testdata/issue/3749/dao/internal/table_user.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// ================================================================================= | ||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. | ||
// ================================================================================= | ||
|
||
package dao | ||
|
||
import ( | ||
"for-gendao-test/pkg/dao/internal" | ||
) | ||
|
||
// internalTableUserDao is internal type for wrapping internal DAO implements. | ||
type internalTableUserDao = *internal.TableUserDao | ||
|
||
// tableUserDao is the data access object for table table_user. | ||
// You can define custom methods on it to extend its functionality as you wish. | ||
type tableUserDao struct { | ||
internalTableUserDao | ||
} | ||
|
||
var ( | ||
// TableUser is globally public accessible object for table table_user operations. | ||
TableUser = tableUserDao{ | ||
internal.NewTableUserDao(), | ||
} | ||
) | ||
|
||
// Fill with you ideas below. |
22 changes: 22 additions & 0 deletions
22
cmd/gf/internal/cmd/testdata/issue/3749/model/do/table_user.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
cmd/gf/internal/cmd/testdata/issue/3749/model/entity/table_user.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CREATE TABLE `%s` ( | ||
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'User ID', | ||
`parentId` varchar(45) NOT NULL COMMENT '', | ||
`PASSPORT` varchar(45) NOT NULL COMMENT 'User Passport', | ||
`PASS_WORD` varchar(45) NOT NULL COMMENT 'User Password', | ||
`NICKNAME2` varchar(45) NOT NULL COMMENT 'User Nickname', | ||
`create_at` datetime DEFAULT NULL COMMENT 'Created Time', | ||
`update_at` datetime DEFAULT NULL COMMENT 'Updated Time', | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters