Coverage for functions \ flipdare \ firestore \ backend \ compliance_db.py: 100%
10 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# Copyright (c) 2026 Flipdare Pty Ltd. All rights reserved.
3#
4# This file is part of Flipdare's proprietary software and contains
5# confidential and copyrighted material. Unauthorised copying,
6# modification, distribution, or use of this file is strictly
7# prohibited without prior written permission from Flipdare Pty Ltd.
8#
9# This software includes third-party components licensed under MIT,
10# BSD, and Apache 2.0 licences. See THIRD_PARTY_NOTICES for details.
11#
14from google.cloud.firestore import Client as FirestoreClient
15from flipdare.firestore._app_db import AppDb
16from flipdare.generated.model.backend.compliance_model import ComplianceModel
17from flipdare.generated.shared.firestore_collections import FirestoreCollections
18from flipdare.wrapper.backend.compliance_wrapper import ComplianceWrapper
20__all__ = ["ComplianceDb"]
22_COMPLIANCE: str = FirestoreCollections.COMPLIANCE.value
25class ComplianceDb(AppDb[ComplianceWrapper, ComplianceModel]):
26 """Class for managing compliance-related database operations."""
28 def __init__(self, client: FirestoreClient) -> None:
29 super().__init__(
30 client=client,
31 collection_name=FirestoreCollections.COMPLIANCE,
32 model_class=ComplianceModel,
33 wrapper_class=ComplianceWrapper,
34 )