初始化

缺陷:主题配色需要优化整体的同风格
This commit is contained in:
2026-08-14 23:21:21 +08:00
parent 6e2769c528
commit bcf54c2727
152 changed files with 13521 additions and 141 deletions

View File

@@ -0,0 +1,41 @@
<?php
namespace App\Models\business;
use App\BaseApp\BaseBusinessModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* 小程序用户cc_wx_user
*
* is_p 代理商 / pid 上级代理商 / price_number 价格倍率 / show_price 价格是否可见 /
* template_code 经销商专属装修模板(空=跟随品牌默认)。
* session_key 是微信会话密钥,只能留在服务端,任何接口都不要把它输出出去。
*/
class WxUserModel extends BaseBusinessModel
{
protected $table = 'wx_user';
protected $guarded = [];
protected $hidden = ['session_key'];
public function enterprise(): BelongsTo
{
return $this->belongsTo(EnterpriseModel::class, 'enterprise_id', 'id');
}
/**
* 该代理商名下的下级用户
*/
public function children(): HasMany
{
return $this->hasMany(self::class, 'pid', 'id');
}
public function parent(): BelongsTo
{
return $this->belongsTo(self::class, 'pid', 'id');
}
}