oc-lib/models/bill/bill.go
2025-06-20 07:51:32 +02:00

26 lines
511 B
Go

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
}