infrastructure.persistence.models.provider¶
src.infrastructure.persistence.models.provider
¶
Provider database model.
This module defines the Provider model for storing provider registry data. Providers are typically seeded at deployment and represent supported financial data providers (Schwab, Chase, Fidelity, etc.).
Reference
- docs/architecture/provider-domain-model.md
Classes¶
Provider
¶
Bases: BaseMutableModel
Provider model for the provider registry.
Stores metadata about supported financial data providers. Providers are typically seeded at deployment via migrations.
Fields
id: UUID primary key (from BaseMutableModel) created_at: Timestamp when provider was added (from BaseMutableModel) updated_at: Timestamp when provider was last modified (from BaseMutableModel) slug: URL-safe unique identifier (e.g., "schwab") name: Human-readable name (e.g., "Charles Schwab") category: Provider type (brokerage, bank, credit_card, etc.) credential_type: Authentication mechanism (oauth2, api_key, etc.) description: Optional description for UI display logo_url: Optional URL to provider logo website_url: Optional provider website URL is_active: Whether provider is available for new connections
Indexes
- idx_providers_slug: (slug) UNIQUE - primary lookup key
- idx_providers_active: (is_active) - filter active providers
Example
provider = Provider( slug="schwab", name="Charles Schwab", category="brokerage", credential_type="oauth2", is_active=True, ) session.add(provider) await session.commit()
Source code in src/infrastructure/persistence/models/provider.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |