1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-18 09:04:35 +01:00
invoiceninja/database/factories/CompanyFactory.php

59 lines
1.7 KiB
PHP
Raw Normal View History

<?php
2020-10-01 07:33:38 +02:00
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
2020-10-01 07:33:38 +02:00
*
* @license https://opensource.org/licenses/AAL
*/
namespace Database\Factories;
use App\DataMapper\CompanySettings;
2020-10-01 12:49:47 +02:00
use App\Models\Company;
use Illuminate\Database\Eloquent\Factories\Factory;
2020-10-01 12:49:47 +02:00
class CompanyFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Company::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
//'name' => $this->faker->name,
'company_key' => strtolower(\Illuminate\Support\Str::random(config('ninja.key_length'))),
'ip' => $this->faker->ipv4,
'db' => config('database.default'),
'settings' => CompanySettings::defaults(),
'is_large' => false,
2021-03-21 06:35:09 +01:00
'default_password_timeout' => 30*60000,
2020-10-07 01:16:57 +02:00
'enabled_modules' => config('ninja.enabled_modules'),
2020-10-01 12:49:47 +02:00
'custom_fields' => (object) [
//'invoice1' => 'Custom Date|date',
// 'invoice2' => '2|switch',
// 'invoice3' => '3|',
// 'invoice4' => '4',
// 'client1'=>'1',
// 'client2'=>'2',
// 'client3'=>'3|date',
// 'client4'=>'4|switch',
// 'company1'=>'1|date',
// 'company2'=>'2|switch',
// 'company3'=>'3',
// 'company4'=>'4',
],
];
}
}