add @fk to note

添加外键注解。
This commit is contained in:
xxj
2021-02-02 15:16:10 +08:00
parent dccbfce68a
commit 689c8a30d9
10 changed files with 94 additions and 18 deletions

View File

@@ -28,4 +28,5 @@ type genForeignKey struct {
ReferencedColumnName string `gorm:"column:referenced_column_name"` // Which column of the affected table.该索引受影响的表的哪一列
}
var noteRegex = regexp.MustCompile(`^\[@gormt\s(\S+)+\]`)
var noteRegex = regexp.MustCompile(`^\[@gorm\s(\S+)+\]`)
var foreignKeyRegex = regexp.MustCompile(`^\[@fk\s(\S+)+\]`)