mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
it_accept_team_folder_invite
This commit is contained in:
32
database/factories/TeamFoldersInvitationFactory.php
Normal file
32
database/factories/TeamFoldersInvitationFactory.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Domain\Teams\Models\TeamFoldersInvitation;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class TeamFoldersInvitationFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = TeamFoldersInvitation::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'id' => $this->faker->uuid,
|
||||
'folder_id' => $this->faker->uuid,
|
||||
'email' => $this->faker->email,
|
||||
'permission' => $this->faker->randomElement(['can-edit', 'can-view', 'can-view-and-download']),
|
||||
'status' => $this->faker->randomElement(['pending', 'accepted', 'rejected']),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -17,8 +17,11 @@ class CreateTeamFoldersInvitationsTable extends Migration
|
||||
$table->uuid('id')->primary();
|
||||
$table->uuid('folder_id');
|
||||
$table->text('email');
|
||||
$table->enum('permission', ['can-edit', 'can-view', 'can-view-and-download']);
|
||||
$table->enum('status', ['pending', 'accepted', 'rejected'])->default('pending');
|
||||
$table->timestamps();
|
||||
$table->charset = 'utf8mb4';
|
||||
$table->collation = 'utf8mb4_unicode_ci';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTeamFolderMembersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('team_folder_members', function (Blueprint $table) {
|
||||
$table->uuid('folder_id');
|
||||
$table->uuid('member_id');
|
||||
$table->string('permission');
|
||||
$table->charset = 'utf8mb4';
|
||||
$table->collation = 'utf8mb4_unicode_ci';
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('team_folder_members');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user