# Sub Dictionary: `tbl_User{X}Activity`

> Pattern template - applies to **17 tables** (programs: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
> Representative table: `tbl_User1Activity` (program 1)

## Table Info

| Property | Value |
|----------|-------|
| Pattern | `tbl_User{X}Activity` |
| Database | quitsure |
| Connection | `mysql` |
| Engine | InnoDB |
| Laravel Model | `UserActivity` (app/Models/UserActivity.php) |
| Table Resolution | `UserActivity::forProgram($programId)` |

### Actual Tables

| Program | Table Name |
|---------|------------|
| 1 | `tbl_User1Activity` |
| 2 | `tbl_User2Activity` |
| 3 | `tbl_User3Activity` |
| 4 | `tbl_User4Activity` |
| 5 | `tbl_User5Activity` |
| 6 | `tbl_User6Activity` |
| 7 | `tbl_User7Activity` |
| 8 | `tbl_User8Activity` |
| 9 | `tbl_User9Activity` |
| 10 | `tbl_User10Activity` |
| 11 | `tbl_User11Activity` |
| 12 | `tbl_User12Activity` |
| 13 | `tbl_User13Activity` |
| 14 | `tbl_User14Activity` |
| 15 | `tbl_User15Activity` |
| 16 | `tbl_User16Activity` |
| 17 | `tbl_User17Activity` |

## Columns

| # | Column | Type | Nullable | Default | Key | Extra | Description |
|---|--------|------|----------|---------|-----|-------|-------------|
| 1 | `iUserActivityID` | `int unsigned` | NO | - | PRI | auto_increment | Integer: User Activity ID (likely FK) |
| 2 | `iUserID` | `int unsigned` | YES | NULL | MUL | - | Integer: User ID (likely FK) |
| 3 | `iFormID` | `int unsigned` | YES | NULL | MUL | - | Integer: Form ID (likely FK) |
| 4 | `vUserResponse` | `text` | YES | NULL | - | - | Varchar: User Response |
| 5 | `dDateCreated` | `datetime` | YES | `CURRENT_TIMESTAMP` | - | DEFAULT_GENERATED | Datetime: Date Created |
| 6 | `dDateUpdated` | `datetime` | YES | NULL | - | - | Datetime: Date Updated |
| 7 | `bCompleted` | `tinyint(1)` | YES | NULL | MUL | - | Boolean/Flag: Completed |
| 8 | `dDateCompleted` | `datetime` | YES | NULL | - | - | Datetime: Date Completed |

## Indexes

| Name | Columns | Unique | Type |
|------|---------|--------|------|
| `idx_tbl_UserActivity_bCompleted` | `bCompleted` | NO | BTREE |
| `idx_tbl_UserActivity_iFormID` | `iFormID` | NO | BTREE |
| `idx_tbl_UserActivity_iUserActivityID` | `iUserActivityID` | NO | BTREE |
| `idx_tbl_UserActivity_iUserID` | `iUserID` | NO | BTREE |
| `PRIMARY` | `iUserActivityID` | YES | BTREE |

## Foreign Keys

### Formal Foreign Keys

None defined.

### Implicit Relationships (from column naming)

| Column | Likely References |
|--------|------------------|
| `iUserID` | `tbl_Users.iUserID` |
| `iFormID` | `tbl_{X}Forms.iFormID (program-specific)` |

## Laravel Eloquent Relationships

| Method | Type | Related Model | Foreign Key |
|--------|------|--------------|-------------|
| `user()` | belongsTo | `User` | `iUserID` |
