add sets up
This commit is contained in:
25
models/bill/bill.go
Normal file
25
models/bill/bill.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package bill
|
||||
|
||||
import (
|
||||
"cloud.o-forge.io/core/oc-lib/models/utils"
|
||||
"cloud.o-forge.io/core/oc-lib/tools"
|
||||
)
|
||||
|
||||
/*
|
||||
* Bill is a struct that represents when emit billing
|
||||
*/
|
||||
type Bill struct {
|
||||
utils.AbstractObject
|
||||
}
|
||||
|
||||
func (r *Bill) StoreDraftDefault() {
|
||||
r.IsDraft = true
|
||||
}
|
||||
|
||||
func (r *Bill) CanDelete() bool {
|
||||
return r.IsDraft // only draft ComputeUnits can be deleted
|
||||
}
|
||||
|
||||
func (d *Bill) GetAccessor(request *tools.APIRequest) utils.Accessor {
|
||||
return NewAccessor(request) // Create a new instance of the accessor
|
||||
}
|
||||
Reference in New Issue
Block a user