added
domain
This commit is contained in:
parent
d9cb144cea
commit
9f1f96a269
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user