v4.1.9: Начальная производственная версия
- Полный backend на Hono + TypeScript - SQLite база данных с 38 записями - 3 пользователя: admin, aknaproff, kasutaja - Модальное окно reportModal (4 шага) - Docker конфигурация для Synology ARM - Все миграции (0001-0017) - Frontend: vanilla HTML/JS (original.html)
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use App\Traits\UsesUuid;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class FormData extends Model
|
||||
{
|
||||
use UsesUuid;
|
||||
|
||||
/**
|
||||
* The attributes that aren't mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'data' => 'array',
|
||||
];
|
||||
|
||||
public static function sources()
|
||||
{
|
||||
return ['app'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the form for the form data
|
||||
*/
|
||||
public function form()
|
||||
{
|
||||
return $this->belongsTo(\App\Form::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the submitted by for the form.
|
||||
*/
|
||||
public function submittedBy()
|
||||
{
|
||||
return $this->belongsTo(\App\User::class, 'submitted_by');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the form's comment
|
||||
*/
|
||||
public function comments()
|
||||
{
|
||||
return $this->hasMany(\App\FormDataComment::class, 'form_data_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user