subDays(rand(0, 60)); $due_date = $order_date->copy()->addDays(rand(7, 12)); $status = $due_date < today() ? OrderStatus::INVOICED->value : $this->faker->randomElement(OrderStatus::cases())->value; return [ 'created_at' => $order_date, 'updated_at' => Carbon::now(), 'customer_po' => $this->faker->randomNumber(6, true), 'order_type' => $this->faker->randomElement(OrderType::cases())->value, 'order_date' => $order_date, 'due_date' => $due_date, 'status' => $status, 'notes' => $this->faker->words(10, true), 'rush' => $this->faker->boolean(20), 'repeat' => $this->faker->boolean(), 'new_art' => $this->faker->boolean(), 'event' => $this->faker->boolean(), 'digitizing' => $this->faker->boolean(), 'garments' => $this->faker->boolean(), 'supplied_file' => $this->faker->boolean(), // 'order_attributes' => ['New Art', 'Garments', 'Rush'], ]; } }