You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
378 B

package dbModel
import (
"github.com/jinzhu/gorm"
"main/init/qmsql"
)
type Authority struct {
gorm.Model `json:"-"`
AuthorityId uint `json:"authorityId"`
AuthorityName string `json:"authorityName"`
Menus []Menu `json:"_"`
}
func (a *Authority) CreateAuthority() (err error, authority *Authority) {
err = qmsql.DEFAULTDB.Create(a).Error
return err, a
}