# Charge Member Costs

Contains charge member cost records enriched with team price group validation status. 
This model tracks costs associated with charging sessions for members and includes a 
derived flag indicating whether the associated cost group has valid pricing configurations.
Data is filtered to only include member cost types from the team price groups.

**SQL:** `charge_member_costs`

## Schema

| Column Name                   | Data Type     | Description                                                                                                          |
|:------------------------------|:--------------|:---------------------------------------------------------------------------------------------------------------------|
| **Primary ID**                |               |                                                                                                                      |
| id                            | INTEGER       | Primary key                                                                                                          |
| **Other IDs**                 |               |                                                                                                                      |
| charge_id                     | INTEGER       | Foreign key referencing the specific charging session                                                                |
| cost_group_id                 | INTEGER       | Foreign key referencing the cost group configuration used for pricing                                                |
| **Timestamps**                |               |                                                                                                                      |
| created_at                    | TIMESTAMP_NTZ | Timestamp when the charge member cost record was created                                                             |
| updated_at                    | TIMESTAMP_NTZ | Timestamp when the charge member cost record was last modified                                                       |
| deleted_at                    | TIMESTAMP_NTZ | Timestamp when the record was soft deleted, null if record is active                                                 |
| **Attributes**                |               |                                                                                                                      |
| cost                          | NUMBER        | Calculated cost amount for the member's charging session                                                             |
| team_price_group_is_not_empty | BOOLEAN       | Indicates whether the associated cost group has valid pricing rows available, true when pricing configurations exist |

## Data inclusion criteria
This table includes records where the `team_price_group_id` belongs to the operator or sub-operators

## Data flow 
| Upstream tables          | Downstream tables |
|:-------------------------|:------------------|
| team_price_groups | ---               |
