ChargeUser.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /** @var \Illuminate\Database\Eloquent\Factory $factory */
  3. use Faker\Generator as Faker;
  4. $factory->define(App\Models\User\UserModel::class, function (Faker $faker) {
  5. return [
  6. 'red_flower' => $faker->randomFloat(2, 0, 10),
  7. 'headimgurl' => $faker->imageUrl(48, 48),
  8. 'nickname' => $faker->name(),
  9. 'sex' => $faker->randomElement([0, 1, 2]),
  10. 'sxo' => $faker->randomElement([0, 1, 2]),
  11. 'height' => $faker->numberBetween(150, 190),
  12. 'age' => $faker->dateTimeBetween('-25 years', '-18 years'),
  13. 'home' => $faker->randomElement(['浙江-杭州', '上海-上海', '江苏-苏州', '浙江-金华', '安徽-合肥']),
  14. 'education' => $faker->text(150),
  15. 'address' => $faker->randomElement(['浙江-杭州', '上海-上海', '江苏-苏州', '浙江-金华', '安徽-合肥']),
  16. 'qq' => $faker->randomNumber(9),
  17. 'weixin' => $faker->word,
  18. 'partner_id' => 0,
  19. 'expect' => $faker->text(130),
  20. 'introduce' => $faker->text(130),
  21. 'phone' => $faker->phoneNumber,
  22. 'school' => $faker->randomElement(['杭州电子科技大学', '浙江大学', '常熟理工学院', '苏州大学']),
  23. 'created_at' => $faker->unixTime("now"),
  24. 'login_at' => $faker->unixTime('now'),
  25. 'supvip_endat' => $faker->unixTime("+30 days"),
  26. 'tag_1' => implode(",", $faker->randomElements(["1", "16", "20"], rand(1, 3))),
  27. 'tag_2' => implode(',', $faker->randomElements(["51", "34", "25"], rand(1, 3))),
  28. 'tag_3' => implode(',', $faker->randomElements(["6", "39", "49"], rand(1, 3))),
  29. 'tag_4' => implode(',', $faker->randomElements(["11", "14", "13", "56"], rand(1, 3))),
  30. 'last_life' => $faker->text(8),
  31. 'why' => $faker->text(20),
  32. 'voice' => $faker->imageUrl(),
  33. 'photo_src' => $faker->imageUrl(),
  34. 'photo_1' => $faker->imageUrl(),
  35. 'photo_2' => $faker->imageUrl(),
  36. 'photo_3' => $faker->imageUrl(),
  37. 'photo_4' => $faker->imageUrl(),
  38. 'jigsaw_amount' => $faker->numberBetween(0, 5),
  39. 'work_state' => $faker->randomElement(['未知', '工作党', '高中党', '大学党']),
  40. 'claim_tag' => implode(",", $faker->randomElements(['求尬聊','求上分','求脱单'], rand(1, 3))),
  41. ];
  42. });