Merge branch 'dev' into custom_fields
This commit is contained in:
@@ -15,7 +15,7 @@ class ActionLog extends Model
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'type_id',
|
'type_id',
|
||||||
'user_id',
|
'user_id',
|
||||||
'item_id'
|
'parameters'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ class ActionLogType extends Model
|
|||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name'
|
'name',
|
||||||
|
'value'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|||||||
@@ -15,15 +15,15 @@ class Content extends Model
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'user_id',
|
'user_id',
|
||||||
'module_handler',
|
'module_handler',
|
||||||
|
'published_from',
|
||||||
|
'published_to',
|
||||||
'title_photo',
|
'title_photo',
|
||||||
'title',
|
'title',
|
||||||
'url',
|
'url',
|
||||||
'meta_keywords',
|
'meta_keywords',
|
||||||
'meta_description',
|
'meta_description',
|
||||||
'module_settings',
|
|
||||||
'content',
|
'content',
|
||||||
'published_from',
|
'module_settings',
|
||||||
'published_to',
|
|
||||||
'status'
|
'status'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -5,16 +5,17 @@ namespace App\Models;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Migration
|
* Class ContentHasCustomField
|
||||||
*/
|
*/
|
||||||
class Migration extends Model
|
class ContentHasCustomField extends Model
|
||||||
{
|
{
|
||||||
|
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'migration',
|
'contents_id',
|
||||||
'batch'
|
'custom_field_id',
|
||||||
|
'value'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
@@ -13,8 +13,8 @@ class CustomField extends Model
|
|||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'handler',
|
|
||||||
'name',
|
'name',
|
||||||
|
'type_id',
|
||||||
'description',
|
'description',
|
||||||
'default_value',
|
'default_value',
|
||||||
'regexp',
|
'regexp',
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class CustomFieldType extends Model
|
|||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name',
|
'name',
|
||||||
'custom_field_id'
|
'handler'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ class ModuleHasCustomField extends Model
|
|||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'module_handler',
|
'module_handler',
|
||||||
'custom_field_id',
|
'custom_field_id'
|
||||||
'value'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class PasswordReset
|
|
||||||
*/
|
|
||||||
class PasswordReset extends Model
|
|
||||||
{
|
|
||||||
|
|
||||||
public $timestamps = true;
|
|
||||||
|
|
||||||
protected $fillable = [
|
|
||||||
'email',
|
|
||||||
'token'
|
|
||||||
];
|
|
||||||
|
|
||||||
protected $guarded = [];
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
+9
-9
@@ -1,5 +1,5 @@
|
|||||||
-- MySQL Script generated by MySQL Workbench
|
-- MySQL Script generated by MySQL Workbench
|
||||||
-- Út 26. leden 2016, 21:33:51 CET
|
-- Út 26. leden 2016, 21:53:01 CET
|
||||||
-- Model: New Model Version: 1.0
|
-- Model: New Model Version: 1.0
|
||||||
-- MySQL Workbench Forward Engineering
|
-- MySQL Workbench Forward Engineering
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ ENGINE = InnoDB;
|
|||||||
-- Table `files`
|
-- Table `files`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `files` (
|
CREATE TABLE IF NOT EXISTS `files` (
|
||||||
`id` INT NOT NULL,
|
`id` INT NOT NULL AUTO_INCREMENT,
|
||||||
`user_id` INT NOT NULL COMMENT 'User, who uploaded this file',
|
`user_id` INT NOT NULL COMMENT 'User, who uploaded this file',
|
||||||
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`filename` VARCHAR(128) NOT NULL,
|
`filename` VARCHAR(128) NOT NULL,
|
||||||
@@ -66,7 +66,7 @@ COMMENT = 'Table containing files which were uploaded into system.';
|
|||||||
-- Table `contents`
|
-- Table `contents`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `contents` (
|
CREATE TABLE IF NOT EXISTS `contents` (
|
||||||
`id` INT NOT NULL,
|
`id` INT NOT NULL AUTO_INCREMENT,
|
||||||
`user_id` INT NOT NULL,
|
`user_id` INT NOT NULL,
|
||||||
`module_handler` VARCHAR(255) NOT NULL,
|
`module_handler` VARCHAR(255) NOT NULL,
|
||||||
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
@@ -111,7 +111,7 @@ COMMENT = 'Table with all content pages.';
|
|||||||
-- Table `content_history`
|
-- Table `content_history`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `content_history` (
|
CREATE TABLE IF NOT EXISTS `content_history` (
|
||||||
`id` INT NOT NULL,
|
`id` INT NOT NULL AUTO_INCREMENT,
|
||||||
`user_id` INT NOT NULL,
|
`user_id` INT NOT NULL,
|
||||||
`content_id` INT NOT NULL,
|
`content_id` INT NOT NULL,
|
||||||
`changed_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`changed_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
@@ -154,7 +154,7 @@ COMMENT = 'Widget type table contains information about all installed widgets. T
|
|||||||
-- Table `widgets`
|
-- Table `widgets`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `widgets` (
|
CREATE TABLE IF NOT EXISTS `widgets` (
|
||||||
`id` INT NOT NULL,
|
`id` INT NOT NULL AUTO_INCREMENT,
|
||||||
`widget_type_handler` VARCHAR(255) NOT NULL,
|
`widget_type_handler` VARCHAR(255) NOT NULL,
|
||||||
`user_id` INT NOT NULL COMMENT 'User ID who created this widget',
|
`user_id` INT NOT NULL COMMENT 'User ID who created this widget',
|
||||||
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
@@ -223,7 +223,7 @@ ENGINE = InnoDB;
|
|||||||
-- Table `custom_field_types`
|
-- Table `custom_field_types`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `custom_field_types` (
|
CREATE TABLE IF NOT EXISTS `custom_field_types` (
|
||||||
`id` INT NOT NULL,
|
`id` INT NOT NULL AUTO_INCREMENT,
|
||||||
`name` VARCHAR(64) NOT NULL COMMENT 'Name of custom field. Given as a translation string (e.g. as dir/section.translation)',
|
`name` VARCHAR(64) NOT NULL COMMENT 'Name of custom field. Given as a translation string (e.g. as dir/section.translation)',
|
||||||
`handler` VARCHAR(255) NOT NULL COMMENT 'Class for handling this type of custom field',
|
`handler` VARCHAR(255) NOT NULL COMMENT 'Class for handling this type of custom field',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
@@ -237,7 +237,7 @@ COMMENT = 'List of all custom field types.';
|
|||||||
-- Table `custom_fields`
|
-- Table `custom_fields`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `custom_fields` (
|
CREATE TABLE IF NOT EXISTS `custom_fields` (
|
||||||
`id` INT NOT NULL,
|
`id` INT NOT NULL AUTO_INCREMENT,
|
||||||
`name` VARCHAR(128) NOT NULL,
|
`name` VARCHAR(128) NOT NULL,
|
||||||
`type_id` INT NOT NULL COMMENT 'Foreign key to custom_field_types table',
|
`type_id` INT NOT NULL COMMENT 'Foreign key to custom_field_types table',
|
||||||
`description` MEDIUMTEXT NULL DEFAULT NULL COMMENT 'Description used for detailed information about meaning of given custom field',
|
`description` MEDIUMTEXT NULL DEFAULT NULL COMMENT 'Description used for detailed information about meaning of given custom field',
|
||||||
@@ -307,7 +307,7 @@ COMMENT = 'Table used for assigning different custom fields to different modules
|
|||||||
-- Table `action_log_types`
|
-- Table `action_log_types`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `action_log_types` (
|
CREATE TABLE IF NOT EXISTS `action_log_types` (
|
||||||
`id` INT NOT NULL,
|
`id` INT NOT NULL AUTO_INCREMENT,
|
||||||
`name` VARCHAR(128) NOT NULL,
|
`name` VARCHAR(128) NOT NULL,
|
||||||
`value` VARCHAR(128) NOT NULL COMMENT 'Log content - represented as translation string.',
|
`value` VARCHAR(128) NOT NULL COMMENT 'Log content - represented as translation string.',
|
||||||
PRIMARY KEY (`id`))
|
PRIMARY KEY (`id`))
|
||||||
@@ -319,7 +319,7 @@ COMMENT = 'List of all types which can be logged.';
|
|||||||
-- Table `action_log`
|
-- Table `action_log`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `action_log` (
|
CREATE TABLE IF NOT EXISTS `action_log` (
|
||||||
`id` INT NOT NULL,
|
`id` INT NOT NULL AUTO_INCREMENT,
|
||||||
`type_id` INT NOT NULL,
|
`type_id` INT NOT NULL,
|
||||||
`user_id` INT NOT NULL,
|
`user_id` INT NOT NULL,
|
||||||
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
|||||||
Reference in New Issue
Block a user