1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-14 22:22:39 +01:00

add episode db

This commit is contained in:
devfake 2016-11-28 08:40:46 +01:00
parent 72588937a3
commit 0bf58b12f6
3 changed files with 57 additions and 1 deletions

20
backend/app/Episode.php Normal file
View File

@ -0,0 +1,20 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Episode extends Model {
public $timestamps = false;
protected $fillable = [
'tmdb_id',
'name',
'season_number',
'episode_number',
'episode_tmdb_id',
'seen',
'season_tmdb_id',
];
}

View File

@ -19,7 +19,6 @@ class CreateItemsTable extends Migration
$table->string('original_title')->index();
$table->string('poster');
$table->string('media_type')->default('movie');
$table->longText('tv_data')->nullable();
$table->string('genre')->nullable();
$table->string('rating');
$table->integer('released');

View File

@ -0,0 +1,37 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEpisodesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('episodes', function (Blueprint $table) {
$table->increments('id');
$table->integer('tmdb_id');
$table->string('name');
$table->integer('season_number');
$table->integer('season_tmdb_id');
$table->integer('episode_number');
$table->integer('episode_tmdb_id');
$table->integer('seen')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('episodes');
}
}