$model
$model : string
The name of the factory's corresponding model.
<?php
/**
* JingYao-backend
*
* @link https://gitee.com/wang-zhihui-release/jingyao-backend
* @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
*/
namespace Database\Factories;
use App\Models\ShortMessage;
use Illuminate\Database\Eloquent\Factories\Factory;
class ShortMessageFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = ShortMessage::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'code' => rand(0000, 9999),
'alive_time' => 300,
'send_time' => date('Y-m-d H:i:s', time()),
'status' => ShortMessage::STATUS['send_success'],
'phone' => $this->faker->phoneNumber,
];
}
}