<?php

    namespace App\Models;

    use App\Libs\Database\Eloquent\ContentTypeModel;
    use App\Models\GenericBackoffice\Traits\LanguageSupportTrait;

    class TrackerAction extends ContentTypeModel
    {
        use LanguageSupportTrait;

        protected $hidden = ['languages', "websites"];
        protected $with = ['languages', "websites"];

        protected $casts = [
            'percentage' => 'float',
            'type_gas' => 'boolean',
            'type_power' => 'boolean',
            'type_carbon' => 'boolean',
            'type_simplification' => 'boolean',
        ];

        public function trackerCategory()
        {
            return $this->belongsTo(TrackerCategory::class);
        }
    }
