domain
This commit is contained in:
snoop 2017-06-23 17:37:56 +09:00
parent d9cb144cea
commit 9f1f96a269
2 changed files with 25 additions and 3 deletions

View File

@ -3,6 +3,7 @@ package domain
import (
"encoding/json"
"loafle.com/overflow/commons_go/model/timestamp"
"git.loafle.net/overflow/overflow_service/proxy/utils"
)
type Domain struct {
@ -23,8 +24,11 @@ func NewDomainService() *DomainService {
func (d *DomainService)Create(dm *Domain) (string, error) {
str,err :=utils.InvokeDBByModel("domain", "save", dm, "com.loafle.overflow.module.domain.model.Domain")
if err != nil {
return "",err
}
return "", nil
return str, nil
}

View File

@ -1 +1,19 @@
package domain
import "testing"
func TestSave(t *testing.T) {
d := Domain{}
d.Name = "snoop's domain"
str,err := NewDomainService().Create(&d)
if err != nil{
t.Fatal(err)
}
t.Log(str)
}