Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
176260cb
authored
Nov 07, 2022
by
宁成龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
完善用户,用户收货地址model
parent
d6554ecf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
33 deletions
app/Models/User.php
app/Models/UserAddress.php
app/Models/User.php
View file @
176260cb
...
...
@@ -2,38 +2,30 @@
namespace
App\Models
;
use
Illuminate\Contracts\Auth\MustVerifyEmail
;
use
Illuminate\Foundation\Auth\User
as
Authenticatable
;
use
Illuminate\Notifications\Notifiable
;
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Illuminate\Database\Eloquent\Model
;
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
;
/**
* 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'
,
];
use
HasDateTimeFormatter
;
protected
$table
=
'users'
;
}
app/Models/UserAddress.php
View file @
176260cb
...
...
@@ -6,9 +6,25 @@ use Dcat\Admin\Traits\HasDateTimeFormatter;
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
{
use
HasDateTimeFormatter
;
protected
$table
=
'user_addresses'
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment