mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
create/get upload request backend
This commit is contained in:
36
database/factories/UploadRequestFactory.php
Normal file
36
database/factories/UploadRequestFactory.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Domain\UploadRequest\Models\UploadRequest;
|
||||
|
||||
class UploadRequestFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = UploadRequest::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'id' => $this->faker->uuid,
|
||||
'user_id' => $this->faker->uuid,
|
||||
'folder_id' => $this->faker->uuid,
|
||||
'email' => $this->faker->email,
|
||||
'notes' => $this->faker->realText(80),
|
||||
'status' => $this->faker->randomElement(
|
||||
['active', 'filled', 'expired']
|
||||
),
|
||||
'created_at' => $this->faker->dateTimeBetween('-1 months'),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,8 @@ class CreateUserLimitationsTable extends Migration
|
||||
$table->uuid('user_id');
|
||||
$table->text('max_storage_amount');
|
||||
$table->text('max_team_members');
|
||||
$table->charset = 'utf8mb4';
|
||||
$table->collation = 'utf8mb4_unicode_ci';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUploadRequestsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('upload_requests', function (Blueprint $table) {
|
||||
$table->uuid('id');
|
||||
$table->uuid('user_id');
|
||||
$table->uuid('folder_id');
|
||||
$table->enum('status', ['active', 'filled', 'expired'])->default('active');
|
||||
$table->string('email');
|
||||
$table->longText('notes');
|
||||
$table->timestamps();
|
||||
$table->charset = 'utf8mb4';
|
||||
$table->collation = 'utf8mb4_unicode_ci';
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('upload_requests');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user