first commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"product/internal/dao"
|
||||
|
||||
"pkg.local/modelbase"
|
||||
)
|
||||
|
||||
type ProductModel struct {
|
||||
modelbase.Base
|
||||
}
|
||||
|
||||
func (m ProductModel) TableName() string {
|
||||
return modelbase.Prefix() + "product"
|
||||
}
|
||||
|
||||
func (m ProductModel) Init() ProductModel {
|
||||
m.Table = m.TableName()
|
||||
return m
|
||||
}
|
||||
|
||||
func (m ProductModel) Create(data *dao.ProductCreate) error {
|
||||
return m.Base.Create(data)
|
||||
}
|
||||
Reference in New Issue
Block a user