# Status Column Datatypes Report

This document lists the `status` column datatype for all requested tables.

## Table Status Column Datatypes

| Table Name | Status Column Datatype | Notes |
|------------|------------------------|-------|
| **client_users** | `status_enum` | PostgreSQL: `status public.status_enum NOT NULL` (ENUM with values: '0', '1') |
| **api_integrations** | Not explicitly defined in SQL dump | Model exists but no explicit datatype cast. Likely `string` or `integer` based on usage. |
| **business_units** | Not explicitly defined in SQL dump | Model exists but no explicit datatype cast. Likely `string` or `integer` based on usage. |
| **cities** | `bigint` | PostgreSQL: `status bigint NOT NULL` |
| **content_watched** | `varchar(50)` | MySQL: `status varchar(50) NOT NULL DEFAULT 'Y'` (Values: 'Y' or 'N') |
| **countries** | `boolean` | PostgreSQL: `status boolean NOT NULL` |
| **coupon** | `boolean` | PostgreSQL: `status boolean NOT NULL` |
| **customer_device** | `boolean` | PostgreSQL: `status boolean NOT NULL` |
| **customers** | `boolean` | PostgreSQL: `status boolean NOT NULL` (Note: Model casts as `string` - possible mismatch) |
| **dunning_campaigns** | Not explicitly defined in SQL dump | Model exists but no explicit datatype cast. Likely `string` or `integer` based on usage. |
| **email_sms_templates** | Not found in SQL dump | Model exists but `status` field not in fillable array. Table may not have status column. |
| **gateway_configuration** | `boolean` | PostgreSQL: `status boolean NOT NULL` |
| **loyalty_points** | `boolean` | Model casts: `'status' => 'boolean'` |
| **modules** | `integer` | Model casts: `'status' => 'integer'` (Values: 1 or 0) |
| **order_detail** | `character varying(255)` | PostgreSQL: `status character varying(255) NOT NULL` (Values: 'INITIATED', 'INPROCESS', 'COMPLETED', 'FAILED', 'REVERSED') |
| **payment_gateway_master** | `boolean` | PostgreSQL: `status boolean NOT NULL` |
| **payment_mode_saved** | `character varying(255)` | PostgreSQL: `status character varying(255) NOT NULL` (Values: 'ACTIVE', 'INACTIVE') |
| **role_mngt** | `bigint` | PostgreSQL: `status bigint NOT NULL` |
| **states** | `bigint` | PostgreSQL: `status bigint NOT NULL` |
| **support_tickets** | Not explicitly defined in SQL dump | Model exists but no explicit datatype cast. Likely `string` based on usage. |
| **tax_groups** | `boolean` | Model casts: `'status' => 'boolean'` |
| **tbl_customer_subscriptions** | `integer` | Model casts: `'status' => 'integer'` (Values: 2 = Success, 3 = Cancel, 7 = Expire) |
| **tbl_packages** | `integer` | Model casts: `'status' => 'integer'` (Values: 1 = Active, 0 = Inactive) |
| **ticket_categories** | Not explicitly defined in SQL dump | Model exists but no explicit datatype cast. Likely `string` or `integer` based on usage. |
| **user_wallet** | `character varying(255)` | PostgreSQL: `status character varying(255) NOT NULL` (Values: 'ACTIVE', 'INACTIVE', 'SUSPENDED') |
| **vouchers** | Not found | Table not found in SQL dump or models |
| **wallet_history** | `character varying(255)` | PostgreSQL: `status character varying(255) NOT NULL` (Values: 'ACTIVE', 'INACTIVE') |
| **wallet_offer** | `character varying(255)` | PostgreSQL: `status character varying(255) NOT NULL` (Values: 'ACTIVE', 'INACTIVE') |

## Summary by Datatype

### Boolean (`boolean`)
- countries
- coupon
- customer_device
- customers (Note: Model casts as string - possible mismatch)
- gateway_configuration
- loyalty_points
- payment_gateway_master
- tax_groups

### Integer/Bigint (`integer` or `bigint`)
- cities (`bigint`)
- modules (`integer`)
- role_mngt (`bigint`)
- states (`bigint`)
- tbl_customer_subscriptions (`integer`)
- tbl_packages (`integer`)

### String/Varchar (`character varying` or `varchar`)
- content_watched (`varchar(50)`)
- order_detail (`character varying(255)`)
- payment_mode_saved (`character varying(255)`)
- user_wallet (`character varying(255)`)
- wallet_history (`character varying(255)`)
- wallet_offer (`character varying(255)`)

### Enum (`status_enum`)
- client_users (`status_enum` with values '0', '1')

### Not Found or Undefined
- api_integrations
- business_units
- dunning_campaigns
- email_sms_templates (status column may not exist)
- support_tickets
- ticket_categories
- vouchers (table not found)

## Notes

1. **customers table**: The SQL dump shows `status boolean NOT NULL`, but the Model casts it as `'status' => 'string'`. This is a potential mismatch that should be investigated.

2. **content_watched**: Uses MySQL `varchar(50)` with values 'Y' or 'N', which is different from the PostgreSQL boolean pattern used in other tables.

3. **client_users table**: Uses a custom PostgreSQL ENUM type `status_enum` with string values '0' and '1', which is unusual.

4. **Tables not in SQL dump**: Some tables mentioned may not exist in the main database dump file. They might be in a different database or created through migrations that aren't present.

5. **Model vs Database mismatch**: Some models may cast status differently than the actual database column type. Always verify against the actual database schema.
