<?php

namespace App\Models\Finance;

use App\Traits\BelongsToStore;
use Illuminate\Database\Eloquent\Model;

class PrepaidCard extends Model
{
    use BelongsToStore;

    protected $fillable = [
        'store_id', 'name', 'face_value', 'sell_price',
        'discount_rate', 'validity_days', 'status', 'sort',
    ];

    protected function casts(): array
    {
        return [
            'face_value' => 'decimal:2',
            'sell_price' => 'decimal:2',
            'discount_rate' => 'decimal:2',
            'validity_days' => 'integer',
            'status' => 'integer',
            'sort' => 'integer',
        ];
    }
}
