diff --git a/src/Generators/FactoryGenerator.php b/src/Generators/FactoryGenerator.php index ea431b8..0214ef2 100644 --- a/src/Generators/FactoryGenerator.php +++ b/src/Generators/FactoryGenerator.php @@ -26,18 +26,32 @@ class FactoryGenerator extends EntityGenerator { /** - * Generate, and return the attribute. + * The primary key methods. * * @var string[] */ - private static $methods = ['getKey', 'pk']; + private static $methods; /** - * The factory properties. + * The primary key properties. * * @var string[] */ - private static $properties = ['id', '_id', 'Id']; + private static $properties; + + /** + * Create a new factory generator instance. + * + * @param string[]|null $methods The primary key methods. + * @param string[]|null $properties The primary key properties. + * + * @return void + */ + public function __construct(array $methods = null, array $properties = null) + { + $this->methods = $methods ?: ['getKey', 'pk']; + $this->properties = $properties ?: ['id', '_id', 'Id']; + } /** * Generate, and return the attribute.