<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */

use App\Plan;
use App\Subscription;
use Carbon\Carbon;
use Faker\Generator as Faker;

$factory->define(Subscription::class, function (Faker $faker) {
    return [
        "plan_id" => Plan::inRandomOrder()->first()->id,
        "stripe_id" => $faker->uuid,
        "stripe_status" => $faker->randomElement(["complete", "active", "incomplete", "past_due"]),
        "stripe_plan" => $faker->randomElement(["a", "b", "c"]),
        "quantity" => $faker->randomElement([1, 2, 3, 4, 5]),
        "end_date" => Carbon::today()->addMonths(10)
    ];
});
