123456789101112131415 |
- <?php
- use Faker\Generator as Faker;
- $factory->define(\App\Models\Friends\FriendApplyModel::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),
- 'uid' => $faker->randomElement($uids),
- 'to_uid' => $faker->randomElement($uids),
- 'unread_cnt' => $faker->randomNumber(),
- 'state' => $faker->randomElement([0, 1])
- ];
- });
|