- Timestamp:
- 10/31/21 21:28:46 (3 years ago)
- Branches:
- master
- Children:
- 4521f25
- Parents:
- a55bb54
- Location:
- database
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
database/factories/FolderFactory.php
ra55bb54 re78295c 27 27 public function definition() 28 28 { 29 //$inputArray = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95];30 //$deptId = Arr::random($inputArray);29 $inputArray = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95]; 30 $deptId = Arr::random($inputArray); 31 31 32 $deptId = $this->faker->numberBetween(1, 10);32 //$deptId = $this->faker->numberBetween(1, 10); 33 33 34 34 $deptCode = Department::find($deptId)->code; … … 46 46 'user_id' => 1, 47 47 'department_id' => $deptId, 48 ' is_important' => $this->faker->boolean,48 'version' => 1, 49 49 'created_at' => now() 50 50 ]; -
database/migrations/2021_10_06_103305_create_folders_table.php
ra55bb54 re78295c 16 16 Schema::create('folders', function (Blueprint $table) { 17 17 $table->bigIncrements('id')->startingValue(1); 18 $table->string("arch_id") ->unique();18 $table->string("arch_id"); 19 19 $table->string("name"); 20 20 $table->text("note")->nullable(); … … 23 23 $table->integer("user_id")->unsigned(); 24 24 $table->integer("department_id")->unsigned(); 25 $table-> boolean("is_important")->default(false);25 $table->integer("version")->default(1); 26 26 $table->timestamps(); 27 27 -
database/seeders/FoldersTableSeeder.php
ra55bb54 re78295c 17 17 public function run() 18 18 { 19 Folder::factory()->count( 900)->create();19 Folder::factory()->count(15)->create(); 20 20 $folders = Folder::all(); 21 21
Note:
See TracChangeset
for help on using the changeset viewer.