sqlserver icon indicating copy to clipboard operation
sqlserver copied to clipboard

feat: support setting field comments

Open iTanken opened this issue 5 months ago • 0 comments

  • [x] Do only one thing
  • [x] Non breaking API changes
  • [x] 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 avatar Sep 24 '24 10:09 iTanken