Skip to content

Commit 6b366a9

Browse files
authored
Update beego.md
1 parent dc8c45f commit 6b366a9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

beego.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,20 @@ func (c *MigrationsController) GetOne() {
4949
......
5050
5151
```
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+
```

0 commit comments

Comments
 (0)