互动
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
760 B

5 years ago
4 years ago
5 years ago
  1. package models
  2. import (
  3. "time"
  4. "github.com/ouxuanserver/osmanthuswine/src/core"
  5. )
  6. //模块服务表
  7. type ModuleService struct {
  8. Id int `json:"id" xorm:"not null autoincr pk INT(11)"`
  9. Name string `json:"name" description:"模块的名称"`
  10. Price float64 `json:"price" description:"模块价格"`
  11. Free string `json:"free" description:"模块是否收费[收费|免费]"`
  12. IsDelete bool `json:"is_delete" xorm:"default(0)"`
  13. CreatedAt time.Time `json:"-" xorm:"created" description:"创建时间"`
  14. UpdatedAt time.Time `json:"-" xorm:"updated" description:"更新时间"`
  15. }
  16. func (t *ModuleService) GetByName(name string) (bool, error) {
  17. return core.GetXormAuto().Where("is_delete=0 and name=?", name).Get(t)
  18. }