File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -49,3 +49,20 @@ func (c *MigrationsController) GetOne() {
49
49
......
50
50
51
51
```
52
+
53
+
54
+ ##### model的example
55
+ ```
56
+
57
+ ......
58
+ type Migrations struct {
59
+ Id int `orm:"column(id_migration);auto" description:"surrogate key:735" example:"735"`
60
+ Name string `orm:"column(name);size(255);null" description:"migration name, unique"`
61
+ CreatedAt time.Time `orm:"column(created_at);type(timestamp);auto_now_add" description:"date migrated or rolled back"`
62
+ Statements string `orm:"column(statements);null" description:"SQL statements for this migration"`
63
+ RollbackStatements string `orm:"column(rollback_statements);null" description:"SQL statment for rolling back migration"`
64
+ Status string `orm:"column(status);null" description:"update indicates it is a normal migration while rollback means this migration is rolled back"`
65
+ }
66
+ ......
67
+
68
+ ```
You can’t perform that action at this time.
0 commit comments