Files
mayfly-go/models/role.go

21 lines
328 B
Go
Raw Normal View History

2020-09-01 10:34:11 +08:00
package models
import (
2021-01-08 15:37:32 +08:00
"mayfly-go/base/model"
"github.com/beego/beego/v2/client/orm"
2020-09-01 10:34:11 +08:00
)
type Role struct {
2021-01-08 15:37:32 +08:00
model.Model
2020-09-01 10:34:11 +08:00
Name string `orm:"column(name)" json:"username"`
//AccountId int64 `orm:"column(account_id)`
Account *Account `orm:"rel(fk);index"`
}
func init() {
orm.RegisterModelWithPrefix("t_", new(Role))
}