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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
32 deletions
app/Models/User.php
app/Models/UserAddress.php
app/Models/User.php
View file @
176260cb
...
@@ -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
use
Notifiable
;
* @property $user_sn 客户编码
* @property $name 用户名
/**
* @property $email 邮箱
* The attributes that are mass assignable.
* @property $email_verified_at 邮箱校验时间
*
* @property $password 密码
* @var array
* @property $phone 手机号码
*/
* @property $remember_token 记住登陆token
protected
$fillable
=
[
* @property $account_properties 账号属性,1是个人,2是企业
'name'
,
'email'
,
'password'
,
* @property $status 状态,1是正常,-1是禁用
];
* @property $company_name 公司名称
* @property $first_name 名字
/**
* @property $sale_id 业务员
* The attributes that should be hidden for arrays.
* @property $sale_name 业务员名字
*
* @property $last_name 姓氏
* @var array
* @property $created_time 创建时间
* @property $update_time 更新时间
*/
*/
protected
$hidden
=
[
class
User
extends
Model
'password'
,
'remember_token'
,
{
];
use
HasDateTimeFormatter
;
protected
$table
=
'users'
;
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected
$casts
=
[
'email_verified_at'
=>
'datetime'
,
];
}
}
app/Models/UserAddress.php
View file @
176260cb
...
@@ -6,6 +6,22 @@ use Dcat\Admin\Traits\HasDateTimeFormatter;
...
@@ -6,6 +6,22 @@ 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
;
...
...
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