ProjectFactory.php 811 Bytes
Newer Older
1
2
3
4
5
<?php

use Faker\Generator as Faker;

$factory->define(\App\Project::class, function (Faker $faker) {
6
    $state = $faker->randomElement(['OPENED', 'IDEA', 'FUNDING-REQUIRED', 'WORK-IN-PROGRESS', 'COMPLETED']);
7
    $status = $faker->randomElement(['opened', 'closed', 'locked', 'merged']);
8
    return [
9
        'title' => $faker->sentence(),
10
        'payment_id' => $faker->sha256,
11
        'target_amount' => $faker->randomFloat(2, 0, 2000),
12
        'state' => $state,
13
        'merge_request_id' => $faker->randomNumber(6),
14
15
16
17
        'gitlab_username' => $faker->userName,
        'gitlab_url' => $faker->url,
        'gitlab_state' => $status,
        'gitlab_created_at' => $faker->dateTimeThisYear,
18
19
        'created_at' => $faker->dateTimeThisYear,
        'updated_at' => $faker->dateTimeThisYear,
20
21
    ];
});