25 lines
386 B
Go
25 lines
386 B
Go
package model
|
|
|
|
import (
|
|
"admin/internal/dao"
|
|
|
|
"pkg.local/modelbase"
|
|
)
|
|
|
|
type AuthorityModel struct {
|
|
modelbase.Base
|
|
}
|
|
|
|
func (m AuthorityModel) TableName() string {
|
|
return modelbase.Prefix() + "authority"
|
|
}
|
|
|
|
func (m AuthorityModel) Init() AuthorityModel {
|
|
m.Table = m.TableName()
|
|
return m
|
|
}
|
|
|
|
func (m AuthorityModel) Create(data *dao.Authority) error {
|
|
return m.Base.Create(data)
|
|
}
|