Coverage for apps/core_los/reports_schemas.py: 100%

33 statements  

« prev     ^ index     » next       coverage.py v7.17.0, created at 2026-11-04 17:24 +0000

1"""Django Ninja schemas for the Reports & MCR dashboard/call-report endpoints.""" 

2 

3from __future__ import annotations 

4 

5from decimal import Decimal 

6 

7from ninja import Schema 

8 

9 

10class PipelineStageBucketOut(Schema): 

11 count: int 

12 volume: Decimal 

13 

14 

15class PipelineReportOut(Schema): 

16 total: int 

17 total_volume: Decimal 

18 by_stage: dict[str, PipelineStageBucketOut] 

19 

20 

21class RevenueReportOut(Schema): 

22 funded_count: int 

23 funded_volume: Decimal 

24 locked_pipeline_count: int 

25 est_comp_bps: int 

26 est_comp_amt: Decimal 

27 note: str 

28 

29 

30class CallReportPeriodOut(Schema): 

31 year: int 

32 quarter: str 

33 

34 

35class CallReportStateOut(Schema): 

36 applications: int 

37 closed: int 

38 volume: Decimal 

39 broker_comp: Decimal 

40 pass_through: Decimal 

41 

42 

43class CallReportTotalsOut(Schema): 

44 applications: int 

45 excluded: int 

46 

47 

48class CallReportOut(Schema): 

49 period: CallReportPeriodOut 

50 by_state: dict[str, CallReportStateOut] 

51 totals: CallReportTotalsOut