diff --git a/app/Models/Service.php b/app/Models/Service.php deleted file mode 100644 index a54e943e6..000000000 --- a/app/Models/Service.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace CachetHQ\Cachet\Models; - -use Illuminate\Database\Eloquent\Model; -use Watson\Validating\ValidatingTrait; - -/** - * @property int $id - * @property string $type - * @property int $active - * @property string $properties - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - */ -class Service extends Model -{ - use ValidatingTrait; - - /** - * The validation rules. - * - * @var string[] - */ - protected $rules = [ - 'type' => 'alpha_dash|required', - 'active' => 'required|in:0,1', - 'properties' => '', - ]; - - /** - * Returns a decoded properties object for the service. - * - * @param string $properties - * - * @return object - */ - public function getPropertiesAttribute($properties) - { - return json_decode($properties); - } - - /** - * Sets the properties attribute which auto encodes to a JSON string. - * - * @param mixed $properties - */ - public function setPropertiesAttribute($properties) - { - $this->attributes['properties'] = json_encode($properties); - } -} diff --git a/database/migrations/2015_01_05_202929_CreateServicesTable.php b/database/migrations/2015_01_05_202929_CreateServicesTable.php deleted file mode 100644 index 35a81c1c8..000000000 --- a/database/migrations/2015_01_05_202929_CreateServicesTable.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Illuminate\Database\Migrations\Migration; -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\Schema; - -class CreateServicesTable extends Migration -{ - /** - * Run the migrations. - */ - public function up() - { - Schema::create('services', function (Blueprint $table) { - $table->increments('id'); - $table->string('type'); - $table->boolean('active'); - $table->text('properties'); - $table->timestamps(); - - $table->index('active'); - }); - } - - /** - * Reverse the migrations. - */ - public function down() - { - Schema::drop('services'); - } -}