ProjectFactory.php 997 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
12
13
        'address' => $faker->sha256,
        'address_uri' => "monero:{$faker->sha256}",
        'qr_code' => $faker->file(),
14
        'target_amount' => $faker->randomFloat(2, 0, 2000),
15
        'raised_amount' => $faker->randomFloat(2, 0, 2000),
16
        'state' => $state,
17
        'merge_request_id' => $faker->randomNumber(6),
18
19
20
21
        'gitlab_username' => $faker->userName,
        'gitlab_url' => $faker->url,
        'gitlab_state' => $status,
        'gitlab_created_at' => $faker->dateTimeThisYear,
22
23
        'created_at' => $faker->dateTimeThisYear,
        'updated_at' => $faker->dateTimeThisYear,
24
25
    ];
});