29 lines
749 B
PHP
29 lines
749 B
PHP
<?php
|
|
|
|
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
|
|
|
use App\Enums\DepartaimantCollectionType;
|
|
use App\Models\DepartaimantsCollection;
|
|
|
|
$factory->define(DepartaimantsCollection::class, function () {
|
|
$bigNumber = function () {
|
|
// prevent the first number from being 0
|
|
$output = rand(1, 9);
|
|
|
|
for ($i = 0; $i < 18; $i++) {
|
|
$output .= rand(0, 9);
|
|
}
|
|
|
|
return $output;
|
|
};
|
|
return [
|
|
'type' => array_rand([
|
|
DepartaimantCollectionType::current()->value,
|
|
DepartaimantCollectionType::vintage()->value
|
|
]),
|
|
'col1' => $bigNumber(),
|
|
'col2' => $bigNumber(),
|
|
'col3' => $bigNumber(),
|
|
'col4' => rand(0, 160),
|
|
];
|
|
});
|