# Sub Dictionary: `tbl_ExpiredVouchers`

## Table Info

| Property | Value |
|----------|-------|
| Table | `tbl_ExpiredVouchers` |
| Database | quitsure |
| Connection | `mysql` |
| Engine | InnoDB |
| Type | TABLE |
| Category | Coupon/Voucher |
| Laravel Model | `ExpiredVoucher` (app/Models/ExpiredVoucher.php) |

## Columns

| # | Column | Type | Nullable | Default | Key | Extra | Description |
|---|--------|------|----------|---------|-----|-------|-------------|
| 1 | `iVoucherID` | `int unsigned` | NO | - | PRI | auto_increment | Integer: Voucher ID (likely FK) |
| 2 | `iVoucherType` | `int unsigned` | YES | NULL | MUL | - | Integer: Voucher Type |
| 3 | `iUserID` | `int unsigned` | YES | NULL | MUL | - | Integer: User ID (likely FK) |
| 4 | `vRecipientEmail` | `varchar(100)` | YES | NULL | - | - | Varchar: Recipient Email |
| 5 | `vBuyerEmail` | `varchar(100)` | YES | NULL | - | - | Varchar: Buyer Email |
| 6 | `dValidTill` | `datetime` | NO | - | - | - | Datetime: Valid Till |
| 7 | `iLength` | `int unsigned` | NO | `1` | - | - | Integer: Length |
| 8 | `dDateCreated` | `datetime` | NO | `CURRENT_TIMESTAMP` | - | DEFAULT_GENERATED | Datetime: Date Created |
| 9 | `bUsed` | `tinyint(1)` | NO | `0` | MUL | - | Boolean/Flag: Used |
| 10 | `dDateUsed` | `datetime` | YES | NULL | - | - | Datetime: Date Used |
| 11 | `bExpired` | `tinyint(1)` | NO | `0` | MUL | - | Boolean/Flag: Expired |
| 12 | `vBuyerName` | `varchar(500)` | YES | NULL | - | - | Varchar: Buyer Name |
| 13 | `vRecipientName` | `varchar(500)` | YES | NULL | - | - | Varchar: Recipient Name |
| 14 | `iProgramID` | `int unsigned` | NO | `1` | - | - | Integer: Program ID (likely FK) |
| 15 | `iPartnerId` | `int unsigned` | YES | NULL | - | - | Integer: Partner Id (likely FK) |
| 16 | `iDiscount` | `int` | YES | NULL | - | - | Integer: Discount |

## Indexes

| Name | Columns | Unique | Type |
|------|---------|--------|------|
| `idx_tbl_Vouchers_bExpired` | `bExpired` | NO | BTREE |
| `idx_tbl_Vouchers_bUsed` | `bUsed` | NO | BTREE |
| `idx_tbl_Vouchers_iUserID` | `iUserID` | NO | BTREE |
| `idx_tbl_Vouchers_iVoucherType` | `iVoucherType` | NO | BTREE |
| `PRIMARY` | `iVoucherID` | YES | BTREE |

## Foreign Keys

### Formal Foreign Keys

None defined.

### Implicit Relationships (from column naming)

| Column | Likely References |
|--------|------------------|
| `iVoucherID` | `tbl_Vouchers.iVoucherID` |
| `iVoucherType` | `tbl_VoucherType.iVoucherType` |
| `iUserID` | `tbl_Users.iUserID` |
| `iProgramID` | `tbl_Programs.iProgramID` |
| `iPartnerId` | `tbl_Partners.iPartnerId` |

## Laravel Eloquent Relationships

| Method | Type | Related Model | Foreign Key |
|--------|------|--------------|-------------|
| `voucherType()` | belongsTo | `VoucherType` | `iVoucherType` |
| `partner()` | belongsTo | `Partner` | `iPartnerId` |
