overflow_proxy_service/proxy/crawlerinputitemmapping/crawlerinputitemmapping_service.go
snoop 0aeac2c1fb added
util
  crawlers
2017-06-08 17:34:21 +09:00

40 lines
1.1 KiB
Go

package crawlerinputitemmapping
import (
"git.loafle.net/overflow/commons_go/model/timestamp"
"encoding/json"
"git.loafle.net/overflow/overflow_proxy_service/proxy/crawler"
"git.loafle.net/overflow/overflow_proxy_service/proxy/crawlerInputItem"
"git.loafle.net/overflow/overflow_proxy_service/proxy/utils"
)
type CrawlerInputItemMapping struct {
Id json.Number `json:"id,Number,omitempty"`
Crawler crawler.Crawler `json:"crawler,omitempty"`
CrawlerInputItem crawlerInputItem.CrawlerInputItem `json:"crawlerInputItem,omitempty"`
Order string `json:"order,omitempty"`
RequireType string `json:"requireType,omitempty"`
CreateDate timestamp.Timestamp `json:"createDate,omitempty"`
}
type CrawlerInputItemMappingService struct {
}
func NewCrawlerInputItemMappingService() *CrawlerInputItemMappingService {
return &CrawlerInputItemMappingService{}
}
func (c *CrawlerInputItemMappingService)Create(ciim *CrawlerInputItemMapping) string {
out, err := utils.InvokeDB("crawlerInputItemMapping", "create", ciim, "")
if err != nil {
return ""
}
return out;
}