# Table

**Kind:** Class

**Source:** `Pams/Web/Pams.Web/Client/app/models/dashboard/data-source-schema/table.model.ts` (line 4)

**Part of:** [Pams](subsystem-pams)

`Table` models a table in the dashboard data-source schema. Its `clone()` method returns a copied `Table` instance for workflows that need to preserve the original table object.

## Methods

| Method | Signature | Returns |
|---|---|---|
| `clone` | `clone(model: Table)` | `void` |

## Properties

| Property | Type |
|---|---|
| `ConString` | `string` |
| `ConName` | `string` |
| `Id` | `string` |
| `Name` | `string` |
| `TableID` | `string` |
| `Schema` | `string` |
| `NameSpace` | `string` |
| `Columns` | `Column[]` |
| `Data` | `any` |

## Where it refuses work

- `Table` stops the work with an early return when `model == null`.

## Diagram

```mermaid
graph LR
  Schema[Data Source Schema] --> Table[Table]
  Table --> Clone[clone()]
  Clone --> Copy[Copied Table]
  Copy --> Consumer[Dashboard Consumer]
```

## Usage

```ts
import { Table } from './table.model';

function copyTable(table: Table): Table {
  return table.clone();
}

const copiedTable = copyTable(existingTable);
```

## AI Coding Instructions

- Use `clone()` when passing a copied table to code that may modify it.
- Keep `Table` instances within the data-source-schema model layer.
- Do not assume a cloned table is the same object reference as the source table.
- Preserve table-related changes through the model API rather than replacing model instances with plain objects.

## Relationships

- IMPORTS → `Column`
- IMPORTS → `GetColumnPrameter`

## Used by

3 references from 3 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Imported by (3)

- `DataSourceService` — `Pams/Web/Pams.Web/Client/app/services/dashboard/data-source.service.ts`:1
- `DashboardWidget` — `Pams/Web/Pams.Web/Client/app/models/dashboard/dashboard-widget.model.ts`:10
- `DataSourceConnection` — `Pams/Web/Pams.Web/Client/app/models/dashboard/data-source-schema/data-source-connection.model.ts`:4
