hasOne(User::class, 'user_id', 'user_id'); } public function invitee(): HasOne { return $this->hasOne(User::class, 'user_id', 'invitee_user_id'); } /** * 详情 * @param array $where * @return static|array|null */ public static function detail(array $where) { return self::get($where); } }