<?php

use Faker\Generator as Faker;

$factory->define(App\Models\Friends\FriendModel::class, function (Faker $faker) {
    $uids = \App\Models\User\UserModel::get()->pluck('uid')->toArray();
    return [
        'last_at' => $faker->unixTime('now') - 7 * 86400 + rand(0, 7*86400),
        'last_msg' => $faker->randomElement(['通过开黑在一起', '相互心动', '通过了你的好友申请', '接受了你的好友申请']),
        'uid' => $faker->randomElement($uids),
        'friend_uid' => $faker->randomElement($uids),
        'is_hide' => $faker->randomElement([0, 0, 0, 0, 0, 0, 0, 0, 1]),
        'is_friend' => $faker->randomElement([1, 1, 1, 1, 1, 1, 1, 1, 0]),
        'star_at' => $faker->randomElement([0, $faker->unixTime('now')]),
        'unread_cnt' => $faker->randomNumber(),
        'each_like' => $faker->randomElement([0, 1]),
        'pair' => $faker->randomElement([0, 1]),
        'like_invite' => $faker->randomElement([0, 1]),
        'gteam' => $faker->randomElement([0, 1]),
        'goodnight' => $faker->randomElement([0, 1])
    ];
});
