Commit 7ce6b0e
committed
refactor(models): 将User.Groups的默认值逻辑迁移到BeforeCreate钩子
将Groups字段的默认值设置从gorm标签迁移到BeforeCreate钩子函数中,使默认值逻辑更灵活可控1 parent 6bd4ff4 commit 7ce6b0e
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
20 | 28 | | |
21 | 29 | | |
22 | 30 | | |
| |||
0 commit comments