| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace App\Module\UrausSys\Database\Factories;
- use App\Module\UrausSys\Models\ReceiveAddress;
- use Illuminate\Database\Eloquent\Factories\Factory;
- class TestFactory extends Factory
- {
- /**
- * 指定模型类
- *
- * @var string
- */
- protected $model = ReceiveAddress::class;
- /**
- * 定义模型的默认状态
- *
- * @return array
- */
- public function definition(): array
- {
- return [
- 'name' => $this->faker->word,
- 'code' => $this->faker->unique()->word,
- 'description' => $this->faker->sentence,
- 'data' => [
- 'key' => $this->faker->word,
- 'value' => $this->faker->word
- ],
- 'status' => 1
- ];
- }
- }
|