Pony.fm/database/factories/GenreFactory.php

77 lines
2.1 KiB
PHP
Raw Normal View History

2021-02-14 20:11:17 +01:00
<?php
/**
* Pony.fm - A community for pony fan music.
* Copyright (C) 2015-2017 Feld0.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use App\Models\User;
/**
* @property int $id
* @property int $user_id
* @property string $title
* @property string $slug
* @property string $description
* @property int $cover_id
* @property int $track_count
* @property int $view_count
* @property int $download_count
* @property int $favourite_count
* @property int $comment_count
* @property \Carbon\Carbon $created_at
* @property string $updated_at
* @property \Carbon\Carbon $deleted_at
*/
class GenreFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \App\Models\Genre::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'name' => $this->faker->word,
'slug' => $this->faker->slug,
];
}
}