From cdde6bcb33d0ba9774ba92f1f8fdfad7145fd370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Tue, 26 Jan 2016 21:38:20 +0100 Subject: [PATCH] FEATURE: regenerated models for updated database structure --- app/Models/ActionLog.php | 2 +- app/Models/ActionLogType.php | 3 ++- app/Models/Content.php | 6 ++--- ...igration.php => ContentHasCustomField.php} | 9 ++++---- app/Models/CustomField.php | 2 +- app/Models/CustomFieldType.php | 2 +- app/Models/ModuleHasCustomField.php | 3 +-- app/Models/PasswordReset.php | 23 ------------------- 8 files changed, 14 insertions(+), 36 deletions(-) rename app/Models/{Migration.php => ContentHasCustomField.php} (57%) delete mode 100644 app/Models/PasswordReset.php diff --git a/app/Models/ActionLog.php b/app/Models/ActionLog.php index 21207b10..8b95d4b6 100644 --- a/app/Models/ActionLog.php +++ b/app/Models/ActionLog.php @@ -15,7 +15,7 @@ class ActionLog extends Model protected $fillable = [ 'type_id', 'user_id', - 'item_id' + 'parameters' ]; protected $guarded = []; diff --git a/app/Models/ActionLogType.php b/app/Models/ActionLogType.php index ced02dc6..420e4d70 100644 --- a/app/Models/ActionLogType.php +++ b/app/Models/ActionLogType.php @@ -13,7 +13,8 @@ class ActionLogType extends Model public $timestamps = false; protected $fillable = [ - 'name' + 'name', + 'value' ]; protected $guarded = []; diff --git a/app/Models/Content.php b/app/Models/Content.php index 098b6983..908ed8e0 100644 --- a/app/Models/Content.php +++ b/app/Models/Content.php @@ -15,15 +15,15 @@ class Content extends Model protected $fillable = [ 'user_id', 'module_handler', + 'published_from', + 'published_to', 'title_photo', 'title', 'url', 'meta_keywords', 'meta_description', - 'module_settings', 'content', - 'published_from', - 'published_to', + 'module_settings', 'status' ]; diff --git a/app/Models/Migration.php b/app/Models/ContentHasCustomField.php similarity index 57% rename from app/Models/Migration.php rename to app/Models/ContentHasCustomField.php index 95af535b..faab0bce 100644 --- a/app/Models/Migration.php +++ b/app/Models/ContentHasCustomField.php @@ -5,16 +5,17 @@ namespace App\Models; use Illuminate\Database\Eloquent\Model; /** - * Class Migration + * Class ContentHasCustomField */ -class Migration extends Model +class ContentHasCustomField extends Model { public $timestamps = false; protected $fillable = [ - 'migration', - 'batch' + 'contents_id', + 'custom_field_id', + 'value' ]; protected $guarded = []; diff --git a/app/Models/CustomField.php b/app/Models/CustomField.php index 2ffefec7..4f0554cf 100644 --- a/app/Models/CustomField.php +++ b/app/Models/CustomField.php @@ -13,8 +13,8 @@ class CustomField extends Model public $timestamps = false; protected $fillable = [ - 'handler', 'name', + 'type_id', 'description', 'default_value', 'regexp', diff --git a/app/Models/CustomFieldType.php b/app/Models/CustomFieldType.php index d8d7a5f0..f50bc710 100644 --- a/app/Models/CustomFieldType.php +++ b/app/Models/CustomFieldType.php @@ -14,7 +14,7 @@ class CustomFieldType extends Model protected $fillable = [ 'name', - 'custom_field_id' + 'handler' ]; protected $guarded = []; diff --git a/app/Models/ModuleHasCustomField.php b/app/Models/ModuleHasCustomField.php index 02d6cc60..56b306a6 100644 --- a/app/Models/ModuleHasCustomField.php +++ b/app/Models/ModuleHasCustomField.php @@ -14,8 +14,7 @@ class ModuleHasCustomField extends Model protected $fillable = [ 'module_handler', - 'custom_field_id', - 'value' + 'custom_field_id' ]; protected $guarded = []; diff --git a/app/Models/PasswordReset.php b/app/Models/PasswordReset.php deleted file mode 100644 index 69daebc9..00000000 --- a/app/Models/PasswordReset.php +++ /dev/null @@ -1,23 +0,0 @@ -