model types added for Static analisys

This commit is contained in:
Anatoliy Poloz
2023-12-29 11:44:24 +03:00
parent 8e97a8abd4
commit c7f40f5e4b
42 changed files with 1151 additions and 565 deletions

View File

@@ -14,6 +14,56 @@ use Laracasts\Presenter\PresentableTrait;
use Spatie\Sluggable\HasSlug;
use Spatie\Sluggable\SlugOptions;
/**
* App\Models\Plan
*
* @property int $id
* @property string $name name of plan
* @property string|null $image public path to image
* @property int $duration plan duration - 7, 14, 21 days
* @property string $state active/draft/archived
* @property array $type to lose weight, to gain weight, to improve your mood, to shape your eating behavior
* @property string $details plan details
* @property int $packets_count 1 on 3 packets of options in plan
* @property array $packet1_options
* @property array $packet2_options
* @property array $packet3_options
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property string $slug
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $author
* @property-read int|null $author_count
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PlanComment> $comments
* @property-read int|null $comments_count
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PlanLike> $likes
* @property-read int|null $likes_count
* @property-read \Illuminate\Database\Eloquent\Collection<int, \CyrildeWit\EloquentViewable\View> $views
* @property-read int|null $views_count
* @method static \Database\Factories\PlanFactory factory($count = null, $state = [])
* @method static Builder|Plan negativeComments()
* @method static Builder|Plan newModelQuery()
* @method static Builder|Plan newQuery()
* @method static Builder|Plan orderByUniqueViews(string $direction = 'desc', $period = null, ?string $collection = null, string $as = 'unique_views_count')
* @method static Builder|Plan orderByViews(string $direction = 'desc', ?\CyrildeWit\EloquentViewable\Support\Period $period = null, ?string $collection = null, bool $unique = false, string $as = 'views_count')
* @method static Builder|Plan positiveComments()
* @method static Builder|Plan query()
* @method static Builder|Plan whereCreatedAt($value)
* @method static Builder|Plan whereDetails($value)
* @method static Builder|Plan whereDuration($value)
* @method static Builder|Plan whereId($value)
* @method static Builder|Plan whereImage($value)
* @method static Builder|Plan whereName($value)
* @method static Builder|Plan wherePacket1Options($value)
* @method static Builder|Plan wherePacket2Options($value)
* @method static Builder|Plan wherePacket3Options($value)
* @method static Builder|Plan wherePacketsCount($value)
* @method static Builder|Plan whereSlug($value)
* @method static Builder|Plan whereState($value)
* @method static Builder|Plan whereType($value)
* @method static Builder|Plan whereUpdatedAt($value)
* @method static Builder|Plan withViewsCount(?\CyrildeWit\EloquentViewable\Support\Period $period = null, ?string $collection = null, bool $unique = false, string $as = 'views_count')
* @mixin \Eloquent
*/
class Plan extends Model implements Viewable
{
use HasFactory;