Browse Source

create user exprisences

visuddhinanda@gmail.com 3 năm trước cách đây
mục cha
commit
f8e0772894

+ 11 - 0
app/Models/UserExperience.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Model;
+
+class UserExperience extends Model
+{
+    use HasFactory;
+}

+ 39 - 0
database/migrations/2022_06_03_021251_create_user_experiences_table.php

@@ -0,0 +1,39 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateUserExperiencesTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('user_experiences', function (Blueprint $table) {
+            $table->id();
+            $table->uuid('user_id');
+            $table->date('date');//统计日期
+            $table->integer('user_exp');//总分
+            $table->integer('user_level');//等级 1-60
+            $table->integer('edit_exp');//编辑总时长 小时
+            $table->integer('wbw_count');//逐词译个数
+            $table->integer('wbw_edit_time');//逐词译编辑次数
+            $table->integer('trans_chart');//译文字符数
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('user_experiences');
+    }
+}