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:
parent
72588937a3
commit
0bf58b12f6
20
backend/app/Episode.php
Normal file
20
backend/app/Episode.php
Normal 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',
|
||||
];
|
||||
}
|
@ -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');
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user