feat:完善项目

This commit is contained in:
henry
2021-09-28 11:47:19 +08:00
commit da7b3130fe
167 changed files with 456676 additions and 0 deletions

27
task/order.go Normal file
View File

@ -0,0 +1,27 @@
package task
import (
"SciencesServer/utils"
"encoding/json"
)
type Order struct {
ID string `json:"id"`
Name string `json:"name"`
}
func (this *Order) MarshalBinary() ([]byte, error) {
return json.Marshal(this)
}
func (this *Order) UnmarshalBinary(data []byte) error {
return utils.FromJSONBytes(data, this)
}
func (this *Order) Handle() error {
return nil
}
func NewOrder() *Order {
return &Order{ID: "23", Name: "Henry"}
}