haozi 6 лет назад
Родитель
Сommit
f19b7d30a0

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

@@ -0,0 +1,85 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\LaborReport;
+use Illuminate\Http\Request;
+
+class LaborReportController 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\LaborReport  $laborReport
+     * @return \Illuminate\Http\Response
+     */
+    public function show(LaborReport $laborReport)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\LaborReport  $laborReport
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(LaborReport $laborReport)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\LaborReport  $laborReport
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, LaborReport $laborReport)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\LaborReport  $laborReport
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(LaborReport $laborReport)
+    {
+        //
+    }
+}

+ 12 - 0
app/LaborReport.php

@@ -0,0 +1,12 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class LaborReport extends Model
+{
+    protected $fillable=[
+        'id','enter_number','user_workgroup_id','user_id','name','mobile_phone','identity_number','labor_company','check_in_at','verify_at','check_out_at','online_duration','working_duration'
+    ];
+}

+ 43 - 0
database/migrations/2020_05_22_114410_create_labor_reports_table.php

@@ -0,0 +1,43 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateLaborReportsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('labor_reports', function (Blueprint $table) {
+            $table->bigIncrements('id');
+            $table->string('enter_number')->index()->comment('进厂编号');
+            $table->bigInteger('user_workgroup_id')->index()->comment('外键用户组');
+            $table->bigInteger('user_id')->unique()->index()->comment('外键用户');
+            $table->string('name')->index()->comment('临时工名称');
+            $table->string('mobile_phone')->nullable()->index()->comment('手机号');
+            $table->string('identity_number')->nullable()->index()->comment('身份证号');
+            $table->string('labor_company')->nullable()->comment('劳务所');
+            $table->timestamp('check_in_at')->nullable()->comment('打卡时间');
+            $table->timestamp('verify_at')->nullable()->comment('审核时间');
+            $table->timestamp('check_out_at')->nullable()->comment('退场时间');
+            $table->decimal('online_duration')->nullable()->comment('在线时长(小时数)');
+            $table->decimal('working_duration')->nullable()->comment('工作时长(小时数)');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('labor_reports');
+    }
+}

BIN
public/images/QRCodeIMG/5.png