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