40 lines
1.1 KiB
Go
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;
|
|
|
|
} |