Przeglądaj źródła

波次控制表结构

LD 5 lat temu
rodzic
commit
108711c238

+ 85 - 0
app/Http/Controllers/StationController.php

@@ -0,0 +1,85 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\Station;
+use Illuminate\Http\Request;
+
+class StationController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        //
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Station  $station
+     * @return \Illuminate\Http\Response
+     */
+    public function show(Station $station)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Station  $station
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Station $station)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Station  $station
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Station $station)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Station  $station
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Station $station)
+    {
+        //
+    }
+}

+ 85 - 0
app/Http/Controllers/StationMissionBatchController.php

@@ -0,0 +1,85 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\StationMissionBatch;
+use Illuminate\Http\Request;
+
+class StationMissionBatchController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        //
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\StationMissionBatch  $stationMissionBatch
+     * @return \Illuminate\Http\Response
+     */
+    public function show(StationMissionBatch $stationMissionBatch)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\StationMissionBatch  $stationMissionBatch
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(StationMissionBatch $stationMissionBatch)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\StationMissionBatch  $stationMissionBatch
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, StationMissionBatch $stationMissionBatch)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\StationMissionBatch  $stationMissionBatch
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(StationMissionBatch $stationMissionBatch)
+    {
+        //
+    }
+}

+ 85 - 0
app/Http/Controllers/StationMissionBatchTypeController.php

@@ -0,0 +1,85 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\StationMissionBatchType;
+use Illuminate\Http\Request;
+
+class StationMissionBatchTypeController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        //
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\StationMissionBatchType  $stationMissionBatchType
+     * @return \Illuminate\Http\Response
+     */
+    public function show(StationMissionBatchType $stationMissionBatchType)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\StationMissionBatchType  $stationMissionBatchType
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(StationMissionBatchType $stationMissionBatchType)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\StationMissionBatchType  $stationMissionBatchType
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, StationMissionBatchType $stationMissionBatchType)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\StationMissionBatchType  $stationMissionBatchType
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(StationMissionBatchType $stationMissionBatchType)
+    {
+        //
+    }
+}

+ 85 - 0
app/Http/Controllers/StationRuleBatchController.php

@@ -0,0 +1,85 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\StationRuleBatch;
+use Illuminate\Http\Request;
+
+class StationRuleBatchController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        //
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\StationRuleBatch  $stationRuleBatch
+     * @return \Illuminate\Http\Response
+     */
+    public function show(StationRuleBatch $stationRuleBatch)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\StationRuleBatch  $stationRuleBatch
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(StationRuleBatch $stationRuleBatch)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\StationRuleBatch  $stationRuleBatch
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, StationRuleBatch $stationRuleBatch)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\StationRuleBatch  $stationRuleBatch
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(StationRuleBatch $stationRuleBatch)
+    {
+        //
+    }
+}

+ 85 - 0
app/Http/Controllers/StationTypeController.php

@@ -0,0 +1,85 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\StationType;
+use Illuminate\Http\Request;
+
+class StationTypeController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        //
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\StationType  $stationType
+     * @return \Illuminate\Http\Response
+     */
+    public function show(StationType $stationType)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\StationType  $stationType
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(StationType $stationType)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\StationType  $stationType
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, StationType $stationType)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\StationType  $stationType
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(StationType $stationType)
+    {
+        //
+    }
+}

+ 10 - 0
app/Station.php

@@ -0,0 +1,10 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Station extends Model
+{
+    protected $fillable=['name', 'code', 'station_type_id','sequence'];
+}

+ 10 - 0
app/StationMissionBatch.php

@@ -0,0 +1,10 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class StationMissionBatch extends Model
+{
+    protected $fillable=['batch_id','station_id','station_mission_batch_type_id','status'];
+}

+ 10 - 0
app/StationMissionBatchType.php

@@ -0,0 +1,10 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class StationMissionBatchType extends Model
+{
+    //
+}

+ 10 - 0
app/StationRuleBatch.php

@@ -0,0 +1,10 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class StationRuleBatch extends Model
+{
+    protected $fillable=['name','station_type_id','batch_type','owner_id'];
+}

+ 10 - 0
app/StationType.php

@@ -0,0 +1,10 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class StationType extends Model
+{
+    protected $fillable=[];
+}

+ 12 - 0
database/factories/StationFactory.php

@@ -0,0 +1,12 @@
+<?php
+
+/** @var \Illuminate\Database\Eloquent\Factory $factory */
+
+use App\Station;
+use Faker\Generator as Faker;
+
+$factory->define(Station::class, function (Faker $faker) {
+    return [
+        //
+    ];
+});

+ 12 - 0
database/factories/StationMissionBatchFactory.php

@@ -0,0 +1,12 @@
+<?php
+
+/** @var \Illuminate\Database\Eloquent\Factory $factory */
+
+use App\StationMissionBatch;
+use Faker\Generator as Faker;
+
+$factory->define(StationMissionBatch::class, function (Faker $faker) {
+    return [
+        //
+    ];
+});

+ 12 - 0
database/factories/StationMissionBatchTypeFactory.php

@@ -0,0 +1,12 @@
+<?php
+
+/** @var \Illuminate\Database\Eloquent\Factory $factory */
+
+use App\StationMissionBatchType;
+use Faker\Generator as Faker;
+
+$factory->define(StationMissionBatchType::class, function (Faker $faker) {
+    return [
+        //
+    ];
+});

+ 12 - 0
database/factories/StationRuleBatchFactory.php

@@ -0,0 +1,12 @@
+<?php
+
+/** @var \Illuminate\Database\Eloquent\Factory $factory */
+
+use App\StationRuleBatch;
+use Faker\Generator as Faker;
+
+$factory->define(StationRuleBatch::class, function (Faker $faker) {
+    return [
+        //
+    ];
+});

+ 12 - 0
database/factories/StationTypeFactory.php

@@ -0,0 +1,12 @@
+<?php
+
+/** @var \Illuminate\Database\Eloquent\Factory $factory */
+
+use App\StationType;
+use Faker\Generator as Faker;
+
+$factory->define(StationType::class, function (Faker $faker) {
+    return [
+        //
+    ];
+});

+ 35 - 0
database/migrations/2020_11_30_140958_create_stations_table.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateStationsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('stations', function (Blueprint $table) {
+            $table->id();
+            $table->string('name')->index()->nullable();
+            $table->string('code')->index()->nullable()->comment('机器编码');
+            $table->integer('station_type_id')->index();
+            $table->integer('sequence')->index()->nullable();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('stations');
+    }
+}

+ 32 - 0
database/migrations/2020_11_30_141318_create_station_types_table.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateStationTypesTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('station_types', function (Blueprint $table) {
+            $table->id();
+            $table->string('name')->index();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('station_types');
+    }
+}

+ 35 - 0
database/migrations/2020_11_30_142346_create_station_rule_batches_table.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateStationRuleBatchesTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('station_rule_batches', function (Blueprint $table) {
+            $table->id();
+            $table->string('name')->index()->nullable();
+            $table->integer('station_type_id')->index()->nullable();
+            $table->string('batch_type')->index()->nullable();
+            $table->integer('owner_id')->index()->nullable();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('station_rule_batches');
+    }
+}

+ 35 - 0
database/migrations/2020_11_30_142430_create_station_mission_batches_table.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateStationMissionBatchesTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('station_mission_batches', function (Blueprint $table) {
+            $table->id();
+            $table->integer('batch_id')->index();
+            $table->integer('station_id')->index();
+            $table->integer('station_mission_batch_type_id')->index();
+            $table->enum('status',['待处理','挂起','处理中','完成','异常','取消'])->index();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('station_mission_batches');
+    }
+}

+ 31 - 0
database/migrations/2020_11_30_151800_create_station_mission_batch_types_table.php

@@ -0,0 +1,31 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateStationMissionBatchTypesTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('station_mission_batch_types', function (Blueprint $table) {
+            $table->id();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('station_mission_batch_types');
+    }
+}

+ 16 - 0
database/seeds/StationMissionBatchSeeder.php

@@ -0,0 +1,16 @@
+<?php
+
+use Illuminate\Database\Seeder;
+
+class StationMissionBatchSeeder extends Seeder
+{
+    /**
+     * Run the database seeds.
+     *
+     * @return void
+     */
+    public function run()
+    {
+        //
+    }
+}

+ 16 - 0
database/seeds/StationMissionBatchTypeSeeder.php

@@ -0,0 +1,16 @@
+<?php
+
+use Illuminate\Database\Seeder;
+
+class StationMissionBatchTypeSeeder extends Seeder
+{
+    /**
+     * Run the database seeds.
+     *
+     * @return void
+     */
+    public function run()
+    {
+        //
+    }
+}

+ 16 - 0
database/seeds/StationRuleBatchSeeder.php

@@ -0,0 +1,16 @@
+<?php
+
+use Illuminate\Database\Seeder;
+
+class StationRuleBatchSeeder extends Seeder
+{
+    /**
+     * Run the database seeds.
+     *
+     * @return void
+     */
+    public function run()
+    {
+        //
+    }
+}

+ 16 - 0
database/seeds/StationSeeder.php

@@ -0,0 +1,16 @@
+<?php
+
+use Illuminate\Database\Seeder;
+
+class StationSeeder extends Seeder
+{
+    /**
+     * Run the database seeds.
+     *
+     * @return void
+     */
+    public function run()
+    {
+        //
+    }
+}

+ 16 - 0
database/seeds/StationTypeSeeder.php

@@ -0,0 +1,16 @@
+<?php
+
+use Illuminate\Database\Seeder;
+
+class StationTypeSeeder extends Seeder
+{
+    /**
+     * Run the database seeds.
+     *
+     * @return void
+     */
+    public function run()
+    {
+        //
+    }
+}