Live Structure
This commit is contained in:
@@ -43,6 +43,10 @@ func (ri *AbstractObject) GetAccessor(request *tools.APIRequest) Accessor {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *AbstractObject) SetID(id string) {
|
||||
r.UUID = id
|
||||
}
|
||||
|
||||
func (r *AbstractObject) GenerateID() {
|
||||
if r.UUID == "" {
|
||||
r.UUID = uuid.New().String()
|
||||
|
||||
@@ -18,6 +18,7 @@ type ShallowDBObject interface {
|
||||
// DBObject is an interface that defines the basic methods for a DBObject
|
||||
type DBObject interface {
|
||||
GenerateID()
|
||||
SetID(id string)
|
||||
GetID() string
|
||||
GetName() string
|
||||
IsDrafted() bool
|
||||
|
||||
Reference in New Issue
Block a user