Skip to content

Commit bead8ec

Browse files
authored
Update gorm.md (#65)
1 parent 196e2e9 commit bead8ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/community/pkgs/orm/gorm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ type AfterFindInterface interface {
487487
下面是 gorm 支持的一些标签
488488

489489
| 标签名 | 说明 |
490-
| :----------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
490+
| :----------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
491491
| `column` | 指定 db 列名 |
492492
| `type` | 列数据类型,推荐使用兼容性好的通用类型,例如:所有数据库都支持 bool、int、uint、float、string、time、bytes 并且可以和其他标签一起使用,例如:`not null``size`, `autoIncrement`… 像 `varbinary(8)` 这样指定数据库数据类型也是支持的。在使用指定数据库数据类型时,它需要是完整的数据库数据类型,如:`MEDIUMINT UNSIGNED not NULL AUTO_INCREMENT` |
493493
| `serializer` | 指定将数据序列化或反序列化到数据库中的序列化器, 例如: `serializer:json/gob/unixtime` |
@@ -510,7 +510,7 @@ type AfterFindInterface interface {
510510
| `<-` | 设置字段写入的权限, `<-:create` 只创建、`<-:update` 只更新、`<-:false` 无写入权限、`<-` 创建和更新权限 |
511511
| `->` | 设置字段读的权限,`->:false` 无读权限 |
512512
| `-` | 忽略该字段,`-` 表示无读写,`-:migration` 表示无迁移权限,`-:all` 表示无读写迁移权限 |
513-
| `comment` | 迁移时为字段添加注释 | |
513+
| `comment` | 迁移时为字段添加注释 |
514514
| `foreignKey` | 指定当前模型的列作为连接表的外键 |
515515
| `references` | 指定引用表的列名,其将被映射为连接表外键 |
516516
| `polymorphic` | 指定多态类型,比如模型名 |

0 commit comments

Comments
 (0)