| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('priv_roles', function (Blueprint $table) { |
||
| 17 | $table->increments('id'); |
||
| 18 | $table->string('name')->unique(); |
||
| 19 | $table->unsignedTinyInteger('level')->default(0); // Visitor,Employee,Manager,Director |
||
| 20 | $table->unsignedInteger('parent_id')->nullable(); |
||
| 21 | $table->text('childs')->nullable(); |
||
| 22 | $table->text('restrictions')->nullable(); |
||
| 23 | $table->timestamps(); |
||
| 24 | |||
| 25 | $table->foreign('parent_id')->references('id')->on('priv_roles')->onDelete('SET NULL'); |
||
| 26 | }); |
||
| 41 |