Files
xk-api-old-laravel/app/Models/YiiModels/User.php
2025-01-11 14:16:20 +08:00

56 lines
1.8 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Models\YiiModels;
use App\Models\Cart;
use App\Models\Extend\SoftDeletesInt;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* App\Models\YiiModels\User
*
* @property int $id
* @property string $openid
* @property string $session_key
* @property string $unionid
* @property string $mobile 手机号
* @property string $password 密码
* @property string $nickname 昵称
* @property int $gender 性别值为1时是男性值为2时是女性值为0时是未知
* @property string $country 国家
* @property string $province 省份
* @property string $city 城市
* @property string $avatarurl 头像
* @property string $token
* @property string $idcard 身份证号
* @property int $sex 性别0默认1男2女
* @property int|null $age 年龄
* @property int $status 身份状态 0待激活待完善1待审核2已认证3已拒绝
* @property \Illuminate\Support\Carbon $created_at
* @property \Illuminate\Support\Carbon $updated_at
* @property int $is_delete 是否删除0否
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Cart[] $carts 购物车
* @property-read int|null $carts_count
* @property-read string $created_at_format 创建时间的格式化
* @property-read string $updated_at_format 更新时间的格式化
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\YiiModels\User newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\YiiModels\User newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\YiiModels\User query()
* @mixin \Eloquent
*/
class User extends YiiBaseAuthModel
{
use SoftDeletesInt;
const GUARD = 'member';
/**
* @comment 购物车
* @return HasMany
*/
public function carts(): HasMany
{
return $this->hasMany(Cart::class, 'user_id');
}
}