diff --git a/tests/.expect/dal_1/model/users.gen.go b/tests/.expect/dal_1/model/users.gen.go index 1db026b2..cbfa8222 100644 --- a/tests/.expect/dal_1/model/users.gen.go +++ b/tests/.expect/dal_1/model/users.gen.go @@ -12,19 +12,14 @@ const TableNameUser = "users" // User mapped from table type User struct { - ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` - CreatedAt time.Time `gorm:"column:created_at" json:"created_at"` - Name string `gorm:"column:name" json:"name"` // oneline - Address string `gorm:"column:address" json:"address"` - RegisterTime time.Time `gorm:"column:register_time" json:"register_time"` - /* - multiline - line1 - line2 - */ - Alive bool `gorm:"column:alive" json:"alive"` - CompanyID int64 `gorm:"column:company_id;default:666" json:"company_id"` - PrivateURL string `gorm:"column:private_url;default:https://a.b.c" json:"private_url"` + ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"-"` + CreatedAt time.Time `gorm:"column:created_at" json:"-"` + Name string `gorm:"column:name;index:idx_name,priority:1;comment:oneline" json:"-"` + Address string `gorm:"column:address" json:"-"` + RegisterTime time.Time `gorm:"column:register_time" json:"-"` + Alive bool `gorm:"column:alive;comment:multiline\nline1\nline2" json:"-"` + CompanyID int64 `gorm:"column:company_id;default:666" json:"-"` + PrivateURL string `gorm:"column:private_url;default:https://a.b.c" json:"-"` } // TableName User's table name diff --git a/tests/.expect/dal_2/model/users.gen.go b/tests/.expect/dal_2/model/users.gen.go index b9df6533..0affe0c5 100644 --- a/tests/.expect/dal_2/model/users.gen.go +++ b/tests/.expect/dal_2/model/users.gen.go @@ -14,17 +14,12 @@ const TableNameUser = "users" type User struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"-"` CreatedAt *time.Time `gorm:"column:created_at" json:"-"` - Name *string `gorm:"column:name;index:idx_name,priority:1" json:"-"` // oneline + Name *string `gorm:"column:name;index:idx_name,priority:1;comment:oneline" json:"-"` Address *string `gorm:"column:address" json:"-"` RegisterTime *time.Time `gorm:"column:register_time" json:"-"` - /* - multiline - line1 - line2 - */ - Alive *bool `gorm:"column:alive" json:"-"` - CompanyID *int64 `gorm:"column:company_id;default:666" json:"-"` - PrivateURL *string `gorm:"column:private_url;default:https://a.b.c" json:"-"` + Alive *bool `gorm:"column:alive;comment:multiline\nline1\nline2" json:"-"` + CompanyID *int64 `gorm:"column:company_id;default:666" json:"-"` + PrivateURL *string `gorm:"column:private_url;default:https://a.b.c" json:"-"` } // TableName User's table name diff --git a/tests/.expect/dal_3/model/users.gen.go b/tests/.expect/dal_3/model/users.gen.go index b9df6533..0affe0c5 100644 --- a/tests/.expect/dal_3/model/users.gen.go +++ b/tests/.expect/dal_3/model/users.gen.go @@ -14,17 +14,12 @@ const TableNameUser = "users" type User struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"-"` CreatedAt *time.Time `gorm:"column:created_at" json:"-"` - Name *string `gorm:"column:name;index:idx_name,priority:1" json:"-"` // oneline + Name *string `gorm:"column:name;index:idx_name,priority:1;comment:oneline" json:"-"` Address *string `gorm:"column:address" json:"-"` RegisterTime *time.Time `gorm:"column:register_time" json:"-"` - /* - multiline - line1 - line2 - */ - Alive *bool `gorm:"column:alive" json:"-"` - CompanyID *int64 `gorm:"column:company_id;default:666" json:"-"` - PrivateURL *string `gorm:"column:private_url;default:https://a.b.c" json:"-"` + Alive *bool `gorm:"column:alive;comment:multiline\nline1\nline2" json:"-"` + CompanyID *int64 `gorm:"column:company_id;default:666" json:"-"` + PrivateURL *string `gorm:"column:private_url;default:https://a.b.c" json:"-"` } // TableName User's table name diff --git a/tests/.expect/dal_4/model/users.gen.go b/tests/.expect/dal_4/model/users.gen.go index b9df6533..0affe0c5 100644 --- a/tests/.expect/dal_4/model/users.gen.go +++ b/tests/.expect/dal_4/model/users.gen.go @@ -14,17 +14,12 @@ const TableNameUser = "users" type User struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"-"` CreatedAt *time.Time `gorm:"column:created_at" json:"-"` - Name *string `gorm:"column:name;index:idx_name,priority:1" json:"-"` // oneline + Name *string `gorm:"column:name;index:idx_name,priority:1;comment:oneline" json:"-"` Address *string `gorm:"column:address" json:"-"` RegisterTime *time.Time `gorm:"column:register_time" json:"-"` - /* - multiline - line1 - line2 - */ - Alive *bool `gorm:"column:alive" json:"-"` - CompanyID *int64 `gorm:"column:company_id;default:666" json:"-"` - PrivateURL *string `gorm:"column:private_url;default:https://a.b.c" json:"-"` + Alive *bool `gorm:"column:alive;comment:multiline\nline1\nline2" json:"-"` + CompanyID *int64 `gorm:"column:company_id;default:666" json:"-"` + PrivateURL *string `gorm:"column:private_url;default:https://a.b.c" json:"-"` } // TableName User's table name diff --git a/tests/.expect/dal_test/model/users.gen.go b/tests/.expect/dal_test/model/users.gen.go index 1db026b2..1de375ad 100644 --- a/tests/.expect/dal_test/model/users.gen.go +++ b/tests/.expect/dal_test/model/users.gen.go @@ -14,15 +14,10 @@ const TableNameUser = "users" type User struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` CreatedAt time.Time `gorm:"column:created_at" json:"created_at"` - Name string `gorm:"column:name" json:"name"` // oneline + Name string `gorm:"column:name;comment:oneline" json:"name"` Address string `gorm:"column:address" json:"address"` RegisterTime time.Time `gorm:"column:register_time" json:"register_time"` - /* - multiline - line1 - line2 - */ - Alive bool `gorm:"column:alive" json:"alive"` + Alive bool `gorm:"column:alive;comment:multiline\nline1\nline2" json:"alive"` CompanyID int64 `gorm:"column:company_id;default:666" json:"company_id"` PrivateURL string `gorm:"column:private_url;default:https://a.b.c" json:"private_url"` }