feat: add TenantLedger model and query generation
- Introduced TenantLedger model with fields for managing tenant transactions, including ID, TenantID, UserID, OrderID, transaction Type, Amount, and balance details. - Implemented CRUD operations for TenantLedger with methods for Create, Update, Delete, and Reload. - Generated query methods for TenantLedger to facilitate database interactions, including filtering, pagination, and aggregation functions. - Established relationships with Order model for foreign key references.
This commit is contained in:
@@ -9,6 +9,8 @@ var _db *gorm.DB
|
||||
// exported CamelCase Services
|
||||
var (
|
||||
Content *content
|
||||
Ledger *ledger
|
||||
Order *order
|
||||
Tenant *tenant
|
||||
Test *test
|
||||
User *user
|
||||
@@ -19,6 +21,8 @@ type services struct {
|
||||
db *gorm.DB
|
||||
// define Services
|
||||
content *content
|
||||
ledger *ledger
|
||||
order *order
|
||||
tenant *tenant
|
||||
test *test
|
||||
user *user
|
||||
@@ -29,6 +33,8 @@ func (svc *services) Prepare() error {
|
||||
|
||||
// set exported Services here
|
||||
Content = svc.content
|
||||
Ledger = svc.ledger
|
||||
Order = svc.order
|
||||
Tenant = svc.tenant
|
||||
Test = svc.test
|
||||
User = svc.user
|
||||
|
||||
Reference in New Issue
Block a user