package types

import (
	"github.com/pingcap/schrodinger/util"
)

// Object is object used for various app such as config and others
type Object struct {
	ID           int64  `json:"id"`
	ExperimentID int64  `json:"experiment_id"`
	BoxID        int64  `json:"box_id"`
	Name         string `json:"name"`
	Payload      []byte `json:"payload"`
	Ctime        string `json:"create_time"`
	Utime        string `json:"update_time"`
}

// Clone clones object
func (object *Object) Clone() *Object {
	objClone := &Object{}
	if err := util.Clone(objClone, object); err != nil {
		return nil
	}
	return objClone
}
