mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 16:00:25 +08:00
first
This commit is contained in:
19
models/role.go
Normal file
19
models/role.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/orm"
|
||||
"mayfly-go/base"
|
||||
)
|
||||
|
||||
type Role struct {
|
||||
base.Model
|
||||
|
||||
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))
|
||||
}
|
||||
Reference in New Issue
Block a user