add address

This commit is contained in:
Edward Yang 2022-06-28 15:37:50 +08:00
parent fb1a2a16f1
commit c3178517ae
3 changed files with 68 additions and 0 deletions

21
beike/Models/Address.php Normal file
View File

@ -0,0 +1,21 @@
<?php
/**
* Address.php
*
* @copyright 2022 opencart.cn - All Rights Reserved
* @link http://www.guangdawangluo.com
* @author Edward Yang <yangjin@opencart.cn>
* @created 2022-06-28 15:22:18
* @modified 2022-06-28 15:22:18
*/
namespace Beike\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Address extends Model
{
use HasFactory;
}

View File

@ -0,0 +1,17 @@
<?php
/**
* AddressRepo.php
*
* @copyright 2022 opencart.cn - All Rights Reserved
* @link http://www.guangdawangluo.com
* @author Edward Yang <yangjin@opencart.cn>
* @created 2022-06-28 15:22:05
* @modified 2022-06-28 15:22:05
*/
namespace Beike\Repositories;
class AddressRepo
{
}

View File

@ -0,0 +1,30 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
class AddressFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'customer_id' => 0,
'name' => $this->faker->userName(),
'phone' => $this->faker->phoneNumber(),
'country_id' => 0,
'state_id' => 0,
'state' => '',
'city_id' => 0,
'city' => $this->faker->city(),
'zipcode' => $this->faker->postcode(),
'address_1' => $this->faker->streetSuffix(),
'address_2' => $this->faker->streetName(),
];
}
}