Coverage for functions \ flipdare \ generated \ shared \ backend \ summary_email_category.py: 100%
0 statements
« prev ^ index » next coverage.py v7.13.0, created at 2026-05-08 12:22 +1000
« prev ^ index » next coverage.py v7.13.0, created at 2026-05-08 12:22 +1000
1#!/usr/bin/env python
2#
3# Copyright (c) 2026 Flipdare Pty Ltd. All rights reserved.
4#
5# This file is part of Flipdare's proprietary software and contains
6# confidential and copyrighted material. Unauthorised copying,
7# modification, distribution, or use of this file is strictly
8# prohibited without prior written permission from Flipdare Pty Ltd.
9#
10# This software includes third-party components licensed under MIT,
11# BSD, and Apache 2.0 licences. See THIRD_PARTY_NOTICES for details.
12#
13# NOTE: THIS FILE IS AUTO GENERATED. DO NOT EDIT.
14#
15# Generated by codegen_models.py
16#
17# Modify 'codegen_models.py'
18# and re-run the script above to update.
19#
21# pragma: no cover
22from enum import StrEnum
25class SummaryEmailCategory(StrEnum):
26 """Summary Email Type"""
28 CHAT = "chat"
29 FRIEND = "friend"
30 DARE = "dare"
31 GROUP = "group"
32 PLEDGE = "pledge"
33 OTHER = "other"
35 # ---- Convenience predicates -----------------------------------------
36 @property
37 def report_title(self) -> str:
38 match self:
39 case SummaryEmailCategory.CHAT:
40 return "Chats"
41 case SummaryEmailCategory.FRIEND:
42 return "Friends"
43 case SummaryEmailCategory.DARE:
44 return "New Dares"
45 case SummaryEmailCategory.GROUP:
46 return "Groups"
47 case SummaryEmailCategory.PLEDGE:
48 return "Pledges"
49 case SummaryEmailCategory.OTHER:
50 return "Other"
52 @staticmethod
53 def report_order() -> list["SummaryEmailCategory"]:
54 """Returns the order in which user report email types should appear in summaries"""
55 return [
56 SummaryEmailCategory.PLEDGE,
57 SummaryEmailCategory.DARE,
58 SummaryEmailCategory.GROUP,
59 SummaryEmailCategory.FRIEND,
60 SummaryEmailCategory.CHAT,
61 SummaryEmailCategory.OTHER,
62 ]