This commit is contained in:
root 2019-11-29 01:16:15 +08:00
parent eb8f32379c
commit 8b06636572
3 changed files with 8 additions and 3 deletions

View File

@ -56,7 +56,9 @@ class UserController extends Controller
'is_admin',
'remind_expire',
'remind_traffic',
'expired_at'
'expired_at',
'balance',
'commission_balance'
])
->first();
$user['avatar_url'] = 'https://cdn.v2ex.com/gravatar/' . md5($user->email) . '?s=64&d=identicon';

View File

@ -105,6 +105,7 @@ CREATE TABLE `v2_user` (
`invite_user_id` int(11) DEFAULT NULL,
`email` varchar(64) NOT NULL,
`password` varchar(64) NOT NULL,
`balance` int(11) NOT NULL DEFAULT '0',
`commission_rate` int(11) DEFAULT NULL,
`commission_balance` int(11) NOT NULL DEFAULT '0',
`t` int(11) NOT NULL DEFAULT '0',
@ -132,4 +133,4 @@ CREATE TABLE `v2_user` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 2019-11-27 11:46:36
-- 2019-11-28 17:14:25

View File

@ -16,3 +16,5 @@ ADD `type` int(11) NOT NULL COMMENT '1新购2续费3升级' AFTER `plan_id`;
/* 2019-11-27 */
ALTER TABLE `v2_user`
ADD `commission_rate` int(11) NULL AFTER `password`;
ALTER TABLE `v2_user`
ADD `balance` int(11) NOT NULL DEFAULT '0' AFTER `password`;