Skip to content

Commit cc33deb

Browse files
committed
Revert "Add some comment"^
Set Hole version wrong. Revert to correct. This reverts commit 505b665.
1 parent 505b665 commit cc33deb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

models/hole.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ import (
1717
"treehole_next/utils"
1818
)
1919

20-
type Hole = HoleV2
20+
type Hole = HoleV1
2121

2222
type BaseHole struct {
2323
/// saved fields
24-
ID int `json:"id" gorm:"primaryKey"`
24+
ID int `json:"id" gorm:"primaryKey;"`
2525
CreatedAt time.Time `json:"time_created" gorm:"not null;index:idx_hole_div_cre,priority:2,sort:desc"`
2626
UpdatedAt time.Time `json:"time_updated" gorm:"not null;index:idx_hole_div_upd,priority:2,sort:desc"`
2727
DeletedAt gorm.DeletedAt `json:"time_deleted,omitempty" gorm:"index"`

models/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var DB *gorm.DB
2222
var gormConfig = &gorm.Config{
2323
NamingStrategy: schema.NamingStrategy{
2424
SingularTable: true, // use singular table name, table for `User` would be `user` with this option enabled
25-
NameReplacer: strings.NewReplacer("V1", "", "V2", ""), // 去除结构体后缀,如 “HoleV1” -> "Hole"
25+
NameReplacer: strings.NewReplacer("V1", "", "V2", ""),
2626
},
2727
Logger: logger.New(
2828
&log.Logger,

0 commit comments

Comments
 (0)