Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support setting field comments #140

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

iTanken
Copy link
Contributor

@iTanken iTanken commented Sep 24, 2024

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

Support to set the field comment according to the comment tag.

User Case Description

type TestTableFieldCommentUpdate struct {
	ID       string     `gorm:"column:id;primaryKey"`
	Name     string     `gorm:"column:name;comment:姓名"`
	Age      uint       `gorm:"column:age;comment:周岁"`
	Birthday *time.Time `gorm:"column:birthday;comment:生日"`
}

func (*TestTableFieldCommentUpdate) TableName() string { return "test_table_field_comment" }

@iTanken iTanken force-pushed the feat_field_comment branch 4 times, most recently from 9762a77 to 1cae722 Compare September 26, 2024 05:24
@jinzhu jinzhu merged commit dd0e76a into go-gorm:master Oct 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants