From d840631b1841bbb8b7cf8b1a62c4caedfa11e785 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Tue, 10 Jan 2023 20:54:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20=E5=85=B6=E4=BB=96=20ide?= =?UTF-8?q?=20helper=20=E7=94=9F=E6=88=90=E7=9A=84=20phpDocs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Admin.php | 20 -------- app/Models/Balance.php | 49 -------------------- app/Models/Host.php | 58 ------------------------ app/Models/Module.php | 37 --------------- app/Models/ModuleAllow.php | 2 +- app/Models/PersonalAccessToken.php | 48 -------------------- app/Models/Task.php | 45 ------------------ app/Models/User.php | 73 ------------------------------ app/Models/WorkOrder/Reply.php | 44 ------------------ app/Models/WorkOrder/WorkOrder.php | 52 --------------------- 10 files changed, 1 insertion(+), 427 deletions(-) diff --git a/app/Models/Admin.php b/app/Models/Admin.php index 8ee2f52..77dce42 100644 --- a/app/Models/Admin.php +++ b/app/Models/Admin.php @@ -8,26 +8,6 @@ use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Support\Carbon; -/** - * App\Models\Admin - * - * @property int $id - * @property string $email - * @property string $password - * @property string|null $remember_token - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @method static Builder|Admin newModelQuery() - * @method static Builder|Admin newQuery() - * @method static Builder|Admin query() - * @method static Builder|Admin whereCreatedAt($value) - * @method static Builder|Admin whereEmail($value) - * @method static Builder|Admin whereId($value) - * @method static Builder|Admin wherePassword($value) - * @method static Builder|Admin whereRememberToken($value) - * @method static Builder|Admin whereUpdatedAt($value) - * @mixin Eloquent - */ class Admin extends Authenticatable { use Cachable; diff --git a/app/Models/Balance.php b/app/Models/Balance.php index 07fa4d0..564be27 100644 --- a/app/Models/Balance.php +++ b/app/Models/Balance.php @@ -10,55 +10,6 @@ use Illuminate\Support\Carbon; use function auth; -/** - * App\Models\Balance - * - * @property int $id - * @property string|null $order_id - * @property string|null $trade_id - * @property string|null $payment - * @property string $amount - * @property string $remaining_amount - * @property string|null $paid_at - * @property int|null $user_id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property-read User|null $user - * @method static CachedBuilder|Balance all($columns = []) - * @method static CachedBuilder|Balance avg($column) - * @method static CachedBuilder|Balance cache(array $tags = []) - * @method static CachedBuilder|Balance cachedValue(array $arguments, string $cacheKey) - * @method static CachedBuilder|Balance count($columns = '*') - * @method static CachedBuilder|Balance disableCache() - * @method static CachedBuilder|Balance disableModelCaching() - * @method static CachedBuilder|Balance exists() - * @method static CachedBuilder|Balance flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Balance - * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) - * @method static CachedBuilder|Balance inRandomOrder($seed = '') - * @method static CachedBuilder|Balance insert(array $values) - * @method static CachedBuilder|Balance isCachable() - * @method static CachedBuilder|Balance max($column) - * @method static CachedBuilder|Balance min($column) - * @method static CachedBuilder|Balance newModelQuery() - * @method static CachedBuilder|Balance newQuery() - * @method static CachedBuilder|Balance query() - * @method static CachedBuilder|Balance sum($column) - * @method static CachedBuilder|Balance thisUser() - * @method static CachedBuilder|Balance truncate() - * @method static CachedBuilder|Balance whereAmount($value) - * @method static CachedBuilder|Balance whereCreatedAt($value) - * @method static CachedBuilder|Balance whereId($value) - * @method static CachedBuilder|Balance whereOrderId($value) - * @method static CachedBuilder|Balance wherePaidAt($value) - * @method static CachedBuilder|Balance wherePayment($value) - * @method static CachedBuilder|Balance whereRemainingAmount($value) - * @method static CachedBuilder|Balance whereTradeId($value) - * @method static CachedBuilder|Balance whereUpdatedAt($value) - * @method static CachedBuilder|Balance whereUserId($value) - * @method static CachedBuilder|Balance withCacheCooldownSeconds(?int $seconds = null) - * @mixin Eloquent - */ class Balance extends Model { use Cachable; diff --git a/app/Models/Host.php b/app/Models/Host.php index e55f71e..ff9397d 100644 --- a/app/Models/Host.php +++ b/app/Models/Host.php @@ -13,64 +13,6 @@ use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Cache; -/** - * App\Models\Host - * - * @property int $id - * @property string $name - * @property string $module_id - * @property int $user_id - * @property float $price - * @property float|null $managed_price - * @property mixed|null $configuration - * @property string $status - * @property int|null $hour - * @property Carbon|null $suspended_at - * @property string|null $deleted_at - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property-read Module $module - * @property-read User $user - * @property-read Collection|WorkOrder[] $workOrders - * @property-read int|null $work_orders_count - * @method static CachedBuilder|Host active() - * @method static CachedBuilder|Host all($columns = []) - * @method static CachedBuilder|Host avg($column) - * @method static CachedBuilder|Host cache(array $tags = []) - * @method static CachedBuilder|Host cachedValue(array $arguments, string $cacheKey) - * @method static CachedBuilder|Host count($columns = '*') - * @method static CachedBuilder|Host disableCache() - * @method static CachedBuilder|Host disableModelCaching() - * @method static CachedBuilder|Host exists() - * @method static CachedBuilder|Host flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Host - * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) - * @method static CachedBuilder|Host inRandomOrder($seed = '') - * @method static CachedBuilder|Host insert(array $values) - * @method static CachedBuilder|Host isCachable() - * @method static CachedBuilder|Host max($column) - * @method static CachedBuilder|Host min($column) - * @method static CachedBuilder|Host newModelQuery() - * @method static CachedBuilder|Host newQuery() - * @method static CachedBuilder|Host query() - * @method static CachedBuilder|Host sum($column) - * @method static CachedBuilder|Host thisUser($module = null) - * @method static CachedBuilder|Host truncate() - * @method static CachedBuilder|Host whereConfiguration($value) - * @method static CachedBuilder|Host whereCreatedAt($value) - * @method static CachedBuilder|Host whereDeletedAt($value) - * @method static CachedBuilder|Host whereHour($value) - * @method static CachedBuilder|Host whereId($value) - * @method static CachedBuilder|Host whereManagedPrice($value) - * @method static CachedBuilder|Host whereModuleId($value) - * @method static CachedBuilder|Host whereName($value) - * @method static CachedBuilder|Host wherePrice($value) - * @method static CachedBuilder|Host whereStatus($value) - * @method static CachedBuilder|Host whereSuspendedAt($value) - * @method static CachedBuilder|Host whereUpdatedAt($value) - * @method static CachedBuilder|Host whereUserId($value) - * @method static CachedBuilder|Host withCacheCooldownSeconds(?int $seconds = null) - */ class Host extends Model { use Cachable; diff --git a/app/Models/Module.php b/app/Models/Module.php index a5ea63e..660e58a 100644 --- a/app/Models/Module.php +++ b/app/Models/Module.php @@ -15,43 +15,6 @@ use Illuminate\Support\Str; use JetBrains\PhpStorm\ArrayShape; -/** - * App\Models\Module - * - * @property string $id - * @property string $name - * @property string|null $api_token - * @property string|null $url - * @property string|null $wecom_key 企业微信机器人 key - * @method static CachedBuilder|Module all($columns = []) - * @method static CachedBuilder|Module avg($column) - * @method static CachedBuilder|Module cache(array $tags = []) - * @method static CachedBuilder|Module cachedValue(array $arguments, string $cacheKey) - * @method static CachedBuilder|Module count($columns = '*') - * @method static CachedBuilder|Module disableCache() - * @method static CachedBuilder|Module disableModelCaching() - * @method static CachedBuilder|Module exists() - * @method static CachedBuilder|Module flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Module - * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) - * @method static CachedBuilder|Module inRandomOrder($seed = '') - * @method static CachedBuilder|Module insert(array $values) - * @method static CachedBuilder|Module isCachable() - * @method static CachedBuilder|Module max($column) - * @method static CachedBuilder|Module min($column) - * @method static CachedBuilder|Module newModelQuery() - * @method static CachedBuilder|Module newQuery() - * @method static CachedBuilder|Module query() - * @method static CachedBuilder|Module sum($column) - * @method static CachedBuilder|Module truncate() - * @method static CachedBuilder|Module whereApiToken($value) - * @method static CachedBuilder|Module whereId($value) - * @method static CachedBuilder|Module whereName($value) - * @method static CachedBuilder|Module whereUrl($value) - * @method static CachedBuilder|Module whereWecomKey($value) - * @method static CachedBuilder|Module withCacheCooldownSeconds(?int $seconds = null) - * @mixin Eloquent - */ class Module extends Authenticatable { use Cachable; diff --git a/app/Models/ModuleAllow.php b/app/Models/ModuleAllow.php index db4d599..9e8b461 100644 --- a/app/Models/ModuleAllow.php +++ b/app/Models/ModuleAllow.php @@ -8,7 +8,7 @@ class ModuleAllow extends Model { - use HasFactory; + // use HasFactory; protected $fillable = [ 'module_id', diff --git a/app/Models/PersonalAccessToken.php b/app/Models/PersonalAccessToken.php index a619879..b154e82 100644 --- a/app/Models/PersonalAccessToken.php +++ b/app/Models/PersonalAccessToken.php @@ -9,54 +9,6 @@ use Illuminate\Support\Carbon; use Laravel\Sanctum\PersonalAccessToken as SanctumPersonalAccessToken; -/** - * App\Models\PersonalAccessToken - * - * @property int $id - * @property string $tokenable_type - * @property int $tokenable_id - * @property string $name - * @property string $token - * @property array|null $abilities - * @property Carbon|null $last_used_at - * @property Carbon|null $expires_at - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property-read Model|Eloquent $tokenable - * @method static CachedBuilder|PersonalAccessToken all($columns = []) - * @method static CachedBuilder|PersonalAccessToken avg($column) - * @method static CachedBuilder|PersonalAccessToken cache(array $tags = []) - * @method static CachedBuilder|PersonalAccessToken cachedValue(array $arguments, string $cacheKey) - * @method static CachedBuilder|PersonalAccessToken count($columns = '*') - * @method static CachedBuilder|PersonalAccessToken disableCache() - * @method static CachedBuilder|PersonalAccessToken disableModelCaching() - * @method static CachedBuilder|PersonalAccessToken exists() - * @method static CachedBuilder|PersonalAccessToken flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|PersonalAccessToken - * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) - * @method static CachedBuilder|PersonalAccessToken inRandomOrder($seed = '') - * @method static CachedBuilder|PersonalAccessToken insert(array $values) - * @method static CachedBuilder|PersonalAccessToken isCachable() - * @method static CachedBuilder|PersonalAccessToken max($column) - * @method static CachedBuilder|PersonalAccessToken min($column) - * @method static CachedBuilder|PersonalAccessToken newModelQuery() - * @method static CachedBuilder|PersonalAccessToken newQuery() - * @method static CachedBuilder|PersonalAccessToken query() - * @method static CachedBuilder|PersonalAccessToken sum($column) - * @method static CachedBuilder|PersonalAccessToken truncate() - * @method static CachedBuilder|PersonalAccessToken whereAbilities($value) - * @method static CachedBuilder|PersonalAccessToken whereCreatedAt($value) - * @method static CachedBuilder|PersonalAccessToken whereExpiresAt($value) - * @method static CachedBuilder|PersonalAccessToken whereId($value) - * @method static CachedBuilder|PersonalAccessToken whereLastUsedAt($value) - * @method static CachedBuilder|PersonalAccessToken whereName($value) - * @method static CachedBuilder|PersonalAccessToken whereToken($value) - * @method static CachedBuilder|PersonalAccessToken whereTokenableId($value) - * @method static CachedBuilder|PersonalAccessToken whereTokenableType($value) - * @method static CachedBuilder|PersonalAccessToken whereUpdatedAt($value) - * @method static CachedBuilder|PersonalAccessToken withCacheCooldownSeconds(?int $seconds = null) - * @mixin Eloquent - */ class PersonalAccessToken extends SanctumPersonalAccessToken { use Cachable; diff --git a/app/Models/Task.php b/app/Models/Task.php index e306eac..0fa0a62 100644 --- a/app/Models/Task.php +++ b/app/Models/Task.php @@ -14,51 +14,6 @@ use function auth; use function broadcast; -/** - * App\Models\Task - * - * @property string $id - * @property string $title - * @property int $progress - * @property string $status - * @property int $user_id - * @property int $host_id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property-read Host $host - * @method static CachedBuilder|Task all($columns = []) - * @method static CachedBuilder|Task avg($column) - * @method static CachedBuilder|Task cache(array $tags = []) - * @method static CachedBuilder|Task cachedValue(array $arguments, string $cacheKey) - * @method static CachedBuilder|Task count($columns = '*') - * @method static CachedBuilder|Task disableCache() - * @method static CachedBuilder|Task disableModelCaching() - * @method static CachedBuilder|Task exists() - * @method static CachedBuilder|Task flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Task - * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) - * @method static CachedBuilder|Task inRandomOrder($seed = '') - * @method static CachedBuilder|Task insert(array $values) - * @method static CachedBuilder|Task isCachable() - * @method static CachedBuilder|Task max($column) - * @method static CachedBuilder|Task min($column) - * @method static CachedBuilder|Task newModelQuery() - * @method static CachedBuilder|Task newQuery() - * @method static CachedBuilder|Task query() - * @method static CachedBuilder|Task sum($column) - * @method static CachedBuilder|Task truncate() - * @method static CachedBuilder|Task user() - * @method static CachedBuilder|Task whereCreatedAt($value) - * @method static CachedBuilder|Task whereHostId($value) - * @method static CachedBuilder|Task whereId($value) - * @method static CachedBuilder|Task whereProgress($value) - * @method static CachedBuilder|Task whereStatus($value) - * @method static CachedBuilder|Task whereTitle($value) - * @method static CachedBuilder|Task whereUpdatedAt($value) - * @method static CachedBuilder|Task whereUserId($value) - * @method static CachedBuilder|Task withCacheCooldownSeconds(?int $seconds = null) - * @mixin Eloquent - */ class Task extends Model { public $incrementing = false; diff --git a/app/Models/User.php b/app/Models/User.php index 1346b66..215cc05 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -18,79 +18,6 @@ use Illuminate\Support\Carbon; use Laravel\Sanctum\HasApiTokens; -/** - * App\Models\User - * - * @property int - * $id - * @property string - * $name - * @property string - * $email - * @property Carbon|null - * $email_verified_at - * @property string|null - * $password - * @property float - * $balance - * @property Carbon|null - * $banned_at 封禁时间 - * @property string|null - * $banned_reason - * @property string|null - * $remember_token - * @property Carbon|null - * $created_at - * @property Carbon|null - * $updated_at - * @property-read Collection|Host[] - * $hosts - * @property-read int|null - * $hosts_count - * @property-read DatabaseNotificationCollection|DatabaseNotification[] - * $notifications - * @property-read int|null - * $notifications_count - * @property-read Collection|PersonalAccessToken[] - * $tokens - * @property-read int|null - * $tokens_count - * @method static CachedBuilder|User all($columns = []) - * @method static CachedBuilder|User avg($column) - * @method static CachedBuilder|User cache(array $tags = []) - * @method static CachedBuilder|User cachedValue(array $arguments, string $cacheKey) - * @method static CachedBuilder|User count($columns = '*') - * @method static CachedBuilder|User disableCache() - * @method static CachedBuilder|User disableModelCaching() - * @method static CachedBuilder|User exists() - * @method static UserFactory factory(...$parameters) - * @method static CachedBuilder|User flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|User - * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) - * @method static CachedBuilder|User inRandomOrder($seed = '') - * @method static CachedBuilder|User insert(array $values) - * @method static CachedBuilder|User isCachable() - * @method static CachedBuilder|User max($column) - * @method static CachedBuilder|User min($column) - * @method static CachedBuilder|User newModelQuery() - * @method static CachedBuilder|User newQuery() - * @method static CachedBuilder|User query() - * @method static CachedBuilder|User sum($column) - * @method static CachedBuilder|User truncate() - * @method static CachedBuilder|User whereBalance($value) - * @method static CachedBuilder|User whereBannedAt($value) - * @method static CachedBuilder|User whereBannedReason($value) - * @method static CachedBuilder|User whereCreatedAt($value) - * @method static CachedBuilder|User whereEmail($value) - * @method static CachedBuilder|User whereEmailVerifiedAt($value) - * @method static CachedBuilder|User whereId($value) - * @method static CachedBuilder|User whereName($value) - * @method static CachedBuilder|User wherePassword($value) - * @method static CachedBuilder|User whereRememberToken($value) - * @method static CachedBuilder|User whereUpdatedAt($value) - * @method static CachedBuilder|User withCacheCooldownSeconds(?int $seconds = null) - * @mixin Eloquent - */ class User extends Authenticatable { use HasApiTokens, HasFactory, Notifiable, Cachable; diff --git a/app/Models/WorkOrder/Reply.php b/app/Models/WorkOrder/Reply.php index dcd5aca..63852d8 100644 --- a/app/Models/WorkOrder/Reply.php +++ b/app/Models/WorkOrder/Reply.php @@ -13,50 +13,6 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Support\Carbon; -/** - * App\Models\WorkOrder\Reply - * - * @property int $id - * @property string $content - * @property int $work_order_id - * @property int|null $user_id - * @property int $is_pending - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property-read User|null $user - * @property-read WorkOrder $workOrder - * @method static CachedBuilder|Reply all($columns = []) - * @method static CachedBuilder|Reply avg($column) - * @method static CachedBuilder|Reply cache(array $tags = []) - * @method static CachedBuilder|Reply cachedValue(array $arguments, string $cacheKey) - * @method static CachedBuilder|Reply count($columns = '*') - * @method static CachedBuilder|Reply disableCache() - * @method static CachedBuilder|Reply disableModelCaching() - * @method static CachedBuilder|Reply exists() - * @method static CachedBuilder|Reply flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Reply - * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) - * @method static CachedBuilder|Reply inRandomOrder($seed = '') - * @method static CachedBuilder|Reply insert(array $values) - * @method static CachedBuilder|Reply isCachable() - * @method static CachedBuilder|Reply max($column) - * @method static CachedBuilder|Reply min($column) - * @method static CachedBuilder|Reply newModelQuery() - * @method static CachedBuilder|Reply newQuery() - * @method static CachedBuilder|Reply query() - * @method static CachedBuilder|Reply sum($column) - * @method static CachedBuilder|Reply truncate() - * @method static CachedBuilder|Reply whereContent($value) - * @method static CachedBuilder|Reply whereCreatedAt($value) - * @method static CachedBuilder|Reply whereId($value) - * @method static CachedBuilder|Reply whereIsPending($value) - * @method static CachedBuilder|Reply whereUpdatedAt($value) - * @method static CachedBuilder|Reply whereUserId($value) - * @method static CachedBuilder|Reply whereWorkOrderId($value) - * @method static CachedBuilder|Reply withCacheCooldownSeconds(?int $seconds = null) - * @method static CachedBuilder|Reply workOrderId($work_order_id) - * @mixin Eloquent - */ class Reply extends Model { use Cachable; diff --git a/app/Models/WorkOrder/WorkOrder.php b/app/Models/WorkOrder/WorkOrder.php index 8f9b641..249101f 100644 --- a/app/Models/WorkOrder/WorkOrder.php +++ b/app/Models/WorkOrder/WorkOrder.php @@ -19,58 +19,6 @@ use Illuminate\Support\Carbon; use Illuminate\Support\Str; -/** - * App\Models\WorkOrder\WorkOrder - * - * @property int $id - * @property string $title - * @property string $content - * @property int $user_id - * @property string $module_id - * @property int|null $host_id - * @property string $status - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property-read Host|null $host - * @property-read Module $module - * @property-read Collection|Reply[] $replies - * @property-read int|null $replies_count - * @property-read User $user - * @method static CachedBuilder|WorkOrder all($columns = []) - * @method static CachedBuilder|WorkOrder avg($column) - * @method static CachedBuilder|WorkOrder cache(array $tags = []) - * @method static CachedBuilder|WorkOrder cachedValue(array $arguments, string $cacheKey) - * @method static CachedBuilder|WorkOrder count($columns = '*') - * @method static CachedBuilder|WorkOrder disableCache() - * @method static CachedBuilder|WorkOrder disableModelCaching() - * @method static CachedBuilder|WorkOrder exists() - * @method static CachedBuilder|WorkOrder flushCache(array $tags = []) - * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|WorkOrder - * getModelCacheCooldown(\Illuminate\Database\Eloquent\Model $instance) - * @method static CachedBuilder|WorkOrder inRandomOrder($seed = '') - * @method static CachedBuilder|WorkOrder insert(array $values) - * @method static CachedBuilder|WorkOrder isCachable() - * @method static CachedBuilder|WorkOrder max($column) - * @method static CachedBuilder|WorkOrder min($column) - * @method static CachedBuilder|WorkOrder newModelQuery() - * @method static CachedBuilder|WorkOrder newQuery() - * @method static CachedBuilder|WorkOrder query() - * @method static CachedBuilder|WorkOrder sum($column) - * @method static CachedBuilder|WorkOrder thisModule() - * @method static CachedBuilder|WorkOrder thisUser() - * @method static CachedBuilder|WorkOrder truncate() - * @method static CachedBuilder|WorkOrder whereContent($value) - * @method static CachedBuilder|WorkOrder whereCreatedAt($value) - * @method static CachedBuilder|WorkOrder whereHostId($value) - * @method static CachedBuilder|WorkOrder whereId($value) - * @method static CachedBuilder|WorkOrder whereModuleId($value) - * @method static CachedBuilder|WorkOrder whereStatus($value) - * @method static CachedBuilder|WorkOrder whereTitle($value) - * @method static CachedBuilder|WorkOrder whereUpdatedAt($value) - * @method static CachedBuilder|WorkOrder whereUserId($value) - * @method static CachedBuilder|WorkOrder withCacheCooldownSeconds(?int $seconds = null) - * @mixin Eloquent - */ class WorkOrder extends Model { use Cachable, Notifiable;