互动
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.

22 lines
724 B

package models
import (
"time"
"github.com/ouxuanserver/osmanthuswine/src/core"
)
//模块服务表
type ModuleService struct {
Id int64 `json:"id"`
Name string `json:"name" description:"模块的名称"`
Price float64 `json:"price" description:"模块价格"`
Free string `json:"free" description:"模块是否收费[收费|免费]"`
IsDelete bool `json:"is_delete" xorm:"default(0)"`
CreatedAt time.Time `json:"-" xorm:"created" description:"创建时间"`
UpdatedAt time.Time `json:"-" xorm:"updated" description:"更新时间"`
}
func (t *ModuleService) GetByName(name string) (bool, error) {
return core.GetXormAuto().Where("is_delete=0 and name=?", name).Get(t)
}