Database
Complete Models Inventory (53 Models)
Exhaustive directory of all 53 Django models across all 13 backend apps.
Complete Models Inventory (53 Models)
IMPLEMENTED
The backend database schema consists of exactly 53 active Django models verified in the codebase.
1. apps.core (10 Models)
Tenant: Root multi-tenant ISP organization.TenantDomain: Custom domain and subdomain mappings for host-derived tenancy.TenantApiToken: Machine-to-machine authentication tokens.CompanySetting: Tenant-specific branding, currency, and portal settings.AuditLog: Immutable audit trail for compliance and tracking.TenantOnboardingRequest: Self-service signup applications from potential ISP tenants.SaaSPackage: SaaS billing tiers and subscriber quota limits.TenantSubscription: Active SaaS contract binding a tenant to aSaaSPackage.SaaSPayment: Billing records for tenant platform payments.DatabaseBackup: Metadata records for automated database backups.
2. apps.authentication (6 Models)
StaffProfile: User profile details linked to Django'sauth.User.Permission: Granular system permission code.Role: Tenant-scoped collection of permissions.StaffMembership: User-to-tenant-to-role binding.Reseller: Wholesale bandwidth reseller profile.ResellerLedgerEntry: Financial balance transactions for resellers.
3. apps.customers (1 Model)
Customer: Master subscriber entity with PPPoE credentials, location, and status.
4. apps.billing (5 Models)
Package: Broadband tier with bandwidth, price, and MikroTik profile.ResellerPricing: Custom discounted wholesale rates for packages per reseller.Invoice: Monthly subscription invoice.Recharge: Record of subscription validity renewal.Offer: Promotional discounts and billing campaigns.
5. apps.finance (6 Models)
BillingAccount: Double-entry accounting ledger account for a subscriber.InvoiceLine: Itemized charge on anInvoice.PaymentAllocation: Settlement mapping payments to specific invoices.LedgerEntry: Immutable credit/debit transaction journal.Adjustment: Staff manual fee adjustments or waivers.IdempotencyKey: Unique mutation protection keys with cached responses.
6. apps.payments (5 Models)
PaymentGateway: bKash, Nagad, or bank gateway credentials.PaymentTransaction: Completed subscriber payments.PaymentAttempt: Raw payment gateway transaction attempts.InboundPaymentEvent: Staging buffer for SMS webhooks.SmsLog: Inbound/outbound SMS gateway records.
7. apps.network (6 Models)
POPBranch: Network Point-of-Presence physical location.Router: MikroTik edge router registration and credentials.OLT: Optical Line Terminal chassis registration.ONU: Optical Network Unit attached to a PON port.UserSession: Real-time active PPPoE tunnel cache.NetworkSyncJob: Post-commit durable queue for router/OLT hardware sync operations.
8. apps.support (2 Models)
Ticket: NOC and customer support tickets.TicketReply: Communication thread on a ticket.
9. apps.hr (5 Models)
Employee: Staff employee record.Attendance: Daily attendance check-in/out.LeaveRequest: Employee leave applications.AdvanceSalary: Employee salary advance tracking.PayrollRecord: Monthly salary disbursement journal.
10. apps.store (3 Models)
ItemCategory: Hardware inventory categories.StoreItem: Physical items in stock (cables, routers, SFPs).StockTransaction: Stock movements in and out of the warehouse.
11. apps.tasks (1 Model)
Task: Maintenance and field technician work orders.
12. apps.callcenter (3 Models)
CallLog: Telephony customer communication records.VoiceSetting: Telephony gateway configurations.VoiceTemplate: IVR broadcast audio scripts.