|
|
||
|---|---|---|
| database | ||
| lang | ||
| routes | ||
| src | ||
| .gitignore | ||
| README.md | ||
| composer.json | ||
README.md
Dcat Admin Extension
用户管理
安装
composer config repositories.peidikeji/dcat-admin-user git git@gitee.com:paddy_technology/dcat-admin-user.gitcomposer require peidikeji/dcat-admin-user:dev-developphp artisan vendor:publish --tag=dcat-admin-user-migrations
事件
- 用户注册成功:
Peidikeji\User\Events\UserRegister
数据表
用户表: users
| column | type | nullable | default | comment |
|---|---|---|---|---|
| id | bigint | not null | - | 主键 |
| username | varchar(191) | null | - | 用户名 |
| phone | varchar(191) | null | - | 手机号 |
| name | varchar(191) | null | - | 昵称 |
| avatar | varchar(191) | null | - | 头像 |
| balance | decimal(12, 2) | not null | 0 | 余额 |
| invite_code | varchar(191) | not null | - | 邀请码 |
| inviter_id | bigint | null | - | 邀请人 |
| inviter_path | varchart(191) | null | - | 所有的上级邀请人(-1-2-3-) |
| created_at | timestamp | null | - | 创建时间 |
| updated_at | timestamp | null | - | 更新时间 |
第三方登录信息: user_socialites
| column | type | nullable | default | comment |
|---|---|---|---|---|
| id | bigint | not null | - | 主键 |
| user_id | bigint | not null | - | 外键关联 users.id |
| type | varchar(191) | not null | - | 类型(SocialiteType) |
| openid | varchar(191) | not null | - | 第三方唯一凭证 |
| unionid | varchar(191) | null | - | 第三方唯一凭证 |
| data | json | null | - | 第三方数据 |
| created_at | timestamp | null | - | 创建时间 |
| updated_at | timestamp | null | - | 更新时间 |
用户余额变动记录: user_balance_logs
| column | type | nullable | default | comment |
|---|---|---|---|---|
| id | bigint | not null | - | 主键 |
| user_id | bigint | not null | - | 外键关联 users.id |
| cate | varchar(191) | not null | - | 类别 |
| description | varchar(191) | not null | - | 描述 |
| amount | decimal(12, 2) | not null | - | 变动数量(正数为增加, 负数为减少) |
| balance | decimal(12, 2) | not null | - | 变动后的余额 |
| remarks | varchart(191) | null | - | 备注 |
| source_type | varchart(191) | null | - | 来源(多态关联) |
| source_id | bigint | null | - | 来源(多态关联) |
| created_at | timestamp | null | - | 创建时间 |
| updated_at | timestamp | null | - | 更新时间 |