Commit 176260cb by 宁成龙

完善用户,用户收货地址model

parent d6554ecf
Showing with 41 additions and 33 deletions
...@@ -2,38 +2,30 @@ ...@@ -2,38 +2,30 @@
namespace App\Models; namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail; use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable /**
* @property $id 主键ID
* @property $user_sn 客户编码
* @property $name 用户名
* @property $email 邮箱
* @property $email_verified_at 邮箱校验时间
* @property $password 密码
* @property $phone 手机号码
* @property $remember_token 记住登陆token
* @property $account_properties 账号属性,1是个人,2是企业
* @property $status 状态,1是正常,-1是禁用
* @property $company_name 公司名称
* @property $first_name 名字
* @property $sale_id 业务员
* @property $sale_name 业务员名字
* @property $last_name 姓氏
* @property $created_time 创建时间
* @property $update_time 更新时间
*/
class User extends Model
{ {
use Notifiable; use HasDateTimeFormatter;
protected $table = 'users';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
} }
...@@ -6,9 +6,25 @@ use Dcat\Admin\Traits\HasDateTimeFormatter; ...@@ -6,9 +6,25 @@ use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* @property $address_id 用户用户地址ID
* @property $user_id 会员ID
* @property $address_type 地址类型;0:个人,1:公司
* @property $consignee 收货人/收货公司
* @property $email 邮箱
* @property $zipcode 邮政编码
* @property $phone 手机/电话
* @property $country 国家
* @property $province 省份
* @property $city 城市
* @property $detail_address 详细地址
* @property $is_default 是否默认(1=是|0=否)
* @property $create_time 创建时间
* @property $update_time 修改时间
*/
class UserAddress extends Model class UserAddress extends Model
{ {
use HasDateTimeFormatter; use HasDateTimeFormatter;
protected $table = 'user_addresses'; protected $table = 'user_addresses';
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment