rubbishclass-srv/community/community-service.go

27 lines
384 B
Go

package community
import (
"github.com/jinzhu/gorm"
"yyjishu.com/rubbish-class/rubbish"
)
type CommunityModel struct {
gorm.Model
Name string `gorm:"type:varchar(20);"`
}
type Community struct {
}
func (c *Community) Map() {
}
func (c *Community) Create(model *CommunityModel) error {
return nil
}
func (c *Community) Init() {
rubbish.DB.AutoMigrate(&CommunityModel{})
}