add sets up

This commit is contained in:
mr
2025-06-20 07:51:32 +02:00
parent 938f9f1326
commit d8ccdec501
23 changed files with 277 additions and 92 deletions

25
models/bill/bill.go Normal file
View 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
}