<?php

namespace App\Models\Dsar;

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

class DsarType extends Model {
    use SoftDeletes;

    protected $fillable = [
        'display_name',
        'description',
        'content',
        'email_content',
    ];

    protected $casts = [
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
        'deleted_at' => 'datetime',
    ];

    public function getPlainTextContentAttribute(): string {
        return strip_tags($this->content);
    }
}
