change layout
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"lone-services/pkg/modelbase"
|
||||
"lone-services/services/admin/internal/dao"
|
||||
)
|
||||
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user