<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class SavingsCustomer extends Model
{
    use SoftDeletes;

    protected $primaryKey = 'customer_id';

    protected $fillable = [
        'msisdn',
        'open_id',
        'auth_id',
        'union_id',
        'full_name',
        'cnic',
        'dob',
        'gender',
        'marital_status',
        'email',
        'address',
        'city',
        'province',
        'country',
        'postal_code',
        'is_active',
        'is_verified',
        'is_easypaisa_verified',
        'easypaisa_verified_at',
        'cnic_verified_at',
        'last_login_at',
        'device_token',
        'device_type',
        'app_version',
    ];

    protected $casts = [
        'dob'                    => 'date',
        'is_active'              => 'boolean',
        'is_verified'            => 'boolean',
        'is_easypaisa_verified'  => 'boolean',
        'easypaisa_verified_at'  => 'datetime',
        'cnic_verified_at'       => 'datetime',
        'last_login_at'          => 'datetime',
    ];

    protected $hidden = [
        'cnic',
        'device_token',
    ];
}