<?php

namespace App\Models\Office;

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

class ApprovalTemplate extends Model
{
    use BelongsToStore;

    protected $fillable = [
        'store_id', 'name', 'type', 'form_fields', 'flow_nodes', 'status', 'sort',
    ];

    protected function casts(): array
    {
        return [
            'type' => 'integer',
            'status' => 'integer',
            'sort' => 'integer',
            'form_fields' => 'array',
            'flow_nodes' => 'array',
        ];
    }
}
