Creating users_per_item migration

This commit is contained in:
Bruno F. Fontes 2018-09-10 21:30:00 -03:00
parent ba48e30a81
commit f7c00662d5
2 changed files with 38 additions and 5 deletions

View File

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

View File

@ -4,11 +4,11 @@ Cada usuário, identificado por e-mail, pode ter outros amigos
## DB
usuário(nome, email)
product[site/software](nome, admin)
productUsers(productID, userID)
item[licença](nome, productID, usedBy, usedSince)
waiting(userID, itemID, waitingSince)
[x] usuário(nome, email)
[x] product[site/software](nome, admin)
[ ] usersPerItem(productID, userID)
[x] item[licença](nome, productID, usedBy, usedSince)
[ ] waiting(userID, itemID, waitingSince)
## VIEWS