You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
user_center/database/migrations/2021_01_21_080639_create_em...

46 lines
1.7 KiB

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEmployeeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('uc_employee_t', function (Blueprint $table) {
$table->id();
$table->string('username',10)->comment('员工工号');
$table->string('nickname',20)->comment('员工姓名');
$table->string('password', 255);
$table->integer('company_id')->default(0)->comment('公司ID');
$table->integer('group_id')->default(0)->comment('岗位ID');
$table->bigInteger('phone')->default(0)->comment('联系电话');
$table->integer('monthly_working_days')->default(0)->comment('月工作天数');
$table->date('entry_date')->nullable()->comment('入职日期');
$table->date('official_date')->nullable()->comment('转正日期');
$table->date('resign_date')->nullable()->comment('离职日期');
$table->decimal('probation_salary')->default(0)->comment('试用工资');
$table->decimal('official_salary')->default(0)->comment('转正工资');
$table->tinyInteger('is_outer')->default(0)->comment('外网登录');
$table->tinyInteger('status')->default(1)->comment('员工状态');
$table->string('rules','255')->default('')->comment('规则id: 多个规则 , 隔开');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('uc_employee_t');
}
}