# Sub Dictionary: `tbl_User{X}Days`

> 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_User1Days` (program 1)

## Table Info

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

### Actual Tables

| Program | Table Name |
|---------|------------|
| 1 | `tbl_User1Days` |
| 2 | `tbl_User2Days` |
| 3 | `tbl_User3Days` |
| 4 | `tbl_User4Days` |
| 5 | `tbl_User5Days` |
| 6 | `tbl_User6Days` |
| 7 | `tbl_User7Days` |
| 8 | `tbl_User8Days` |
| 9 | `tbl_User9Days` |
| 10 | `tbl_User10Days` |
| 11 | `tbl_User11Days` |
| 12 | `tbl_User12Days` |
| 13 | `tbl_User13Days` |
| 14 | `tbl_User14Days` |
| 15 | `tbl_User15Days` |
| 16 | `tbl_User16Days` |
| 17 | `tbl_User17Days` |

## Columns

| # | Column | Type | Nullable | Default | Key | Extra | Description |
|---|--------|------|----------|---------|-----|-------|-------------|
| 1 | `iUserDayID` | `int unsigned` | NO | - | PRI | auto_increment | Integer: User Day ID (likely FK) |
| 2 | `iUserID` | `int unsigned` | YES | NULL | MUL | - | Integer: User ID (likely FK) |
| 3 | `iDayID` | `int unsigned` | YES | NULL | MUL | - | Integer: Day ID (likely FK) |
| 4 | `bCompleted` | `tinyint(1)` | YES | `0` | MUL | - | Boolean/Flag: Completed |
| 5 | `dStartDate` | `datetime` | YES | NULL | MUL | - | Datetime: Start Date |
| 6 | `dCompletedDate` | `datetime` | YES | NULL | MUL | - | Datetime: Completed Date |
| 7 | `dDateCreated` | `datetime` | YES | `CURRENT_TIMESTAMP` | - | DEFAULT_GENERATED | Datetime: Date Created |
| 8 | `dDateUpdated` | `datetime` | YES | NULL | - | - | Datetime: Date Updated |
| 9 | `bUnlocked` | `tinyint` | NO | `0` | MUL | - | Boolean/Flag: Unlocked |
| 10 | `bChapterComplete` | `tinyint(1)` | NO | `0` | - | - | Boolean/Flag: Chapter Complete |
| 11 | `bNextDayCreated` | `tinyint` | NO | `0` | - | - | Boolean/Flag: Next Day Created |

## Indexes

| Name | Columns | Unique | Type |
|------|---------|--------|------|
| `idx_tbl_UserDays_bCompleted` | `bCompleted` | NO | BTREE |
| `idx_tbl_UserDays_bUnlocked` | `bUnlocked` | NO | BTREE |
| `idx_tbl_UserDays_dCompletedDate` | `dCompletedDate` | NO | BTREE |
| `idx_tbl_UserDays_dStartDate` | `dStartDate` | NO | BTREE |
| `idx_tbl_UserDays_iDayID` | `iDayID` | NO | BTREE |
| `idx_tbl_UserDays_iUserDayID` | `iUserDayID` | NO | BTREE |
| `idx_tbl_UserDays_iUserID` | `iUserID` | NO | BTREE |
| `PRIMARY` | `iUserDayID` | YES | BTREE |

## Foreign Keys

### Formal Foreign Keys

None defined.

### Implicit Relationships (from column naming)

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

## Laravel Eloquent Relationships

| Method | Type | Related Model | Foreign Key |
|--------|------|--------------|-------------|
| `day()` | belongsTo | `Day` | `iDayID` |
