feat: Reader beginning
This commit is contained in:
parent
e90c0a140e
commit
55945adc53
@@ -48,8 +48,13 @@ final class ChapterFactory extends ModelFactory
|
||||
{
|
||||
return [
|
||||
'manga' => MangaFactory::new(),
|
||||
'number' => self::faker()->randomNumber(2),
|
||||
'pages' => [],
|
||||
'number' => self::faker()->randomFloat(2, 0, 999),
|
||||
'volume' => self::faker()->optional()->numberBetween(1, 100),
|
||||
'title' => self::faker()->optional()->sentence(3),
|
||||
'localPath' => self::faker()->optional()->filePath(),
|
||||
'externalId' => self::faker()->optional()->uuid(),
|
||||
'cbzPath' => self::faker()->optional()->filePath(),
|
||||
'visible' => true,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -50,12 +50,20 @@ final class MangaFactory extends ModelFactory
|
||||
$title = self::faker()->words(rand(1, 3), true);
|
||||
|
||||
return [
|
||||
'slug' => $this->slugger->slug($title)->lower(),
|
||||
'title' => $title,
|
||||
'description' => self::faker()->text(),
|
||||
'genres' => self::faker()->words(rand(1, 5)),
|
||||
'publicationYear' => self::faker()->year(),
|
||||
'rating' => self::faker()->randomFloat(1, 0, 10),
|
||||
'slug' => $this->slugger->slug($title)->lower(),
|
||||
'imageUrl' => self::faker()->optional()->imageUrl(),
|
||||
'publicationYear' => self::faker()->optional()->year(),
|
||||
'description' => self::faker()->optional()->text(),
|
||||
'genres' => self::faker()->optional()->words(rand(1, 5)),
|
||||
'createdAt' => \DateTimeImmutable::createFromMutable(self::faker()->dateTime()),
|
||||
'rating' => self::faker()->optional()->randomFloat(1, 0, 10),
|
||||
'author' => self::faker()->optional()->name(),
|
||||
'externalId' => self::faker()->optional()->uuid(),
|
||||
'status' => self::faker()->optional()->randomElement(['ongoing', 'completed', 'hiatus']),
|
||||
'thumbnailUrl' => self::faker()->optional()->imageUrl(150, 150),
|
||||
'monitored' => self::faker()->boolean(),
|
||||
'AlternativeSlugs' => self::faker()->optional()->words(3),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -47,9 +47,12 @@ final class SourceFactory extends ModelFactory
|
||||
protected function getDefaults(): array
|
||||
{
|
||||
return [
|
||||
'baseUrl' => self::faker()->text(255),
|
||||
'createdAt' => \DateTimeImmutable::createFromMutable(self::faker()->dateTime()),
|
||||
'name' => self::faker()->optional()->company(),
|
||||
'description' => self::faker()->optional()->text(),
|
||||
'baseUrl' => self::faker()->url(),
|
||||
'scrappingParameters' => [],
|
||||
'isActive' => self::faker()->boolean(),
|
||||
'createdAt' => \DateTimeImmutable::createFromMutable(self::faker()->dateTime()),
|
||||
'updatedAt' => \DateTimeImmutable::createFromMutable(self::faker()->dateTime()),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user