diff --git a/app/Models/Activity.php b/app/Models/Activity.php index 08501e90..1178bb5e 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -48,6 +48,11 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Activity whereResourceId($value) * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Activity whereDeletedAt($value) * @mixin \Eloquent + * @method static bool|null forceDelete() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Activity onlyTrashed() + * @method static bool|null restore() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Activity withTrashed() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Activity withoutTrashed() */ class Activity extends Model { diff --git a/app/Models/Album.php b/app/Models/Album.php index 670e4c46..ba9241be 100644 --- a/app/Models/Album.php +++ b/app/Models/Album.php @@ -81,6 +81,11 @@ use Venturecraft\Revisionable\RevisionableTrait; * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Album whereUpdatedAt($value) * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Album whereDeletedAt($value) * @mixin \Eloquent + * @method static bool|null forceDelete() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Album onlyTrashed() + * @method static bool|null restore() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Album withTrashed() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Album withoutTrashed() */ class Album extends Model implements Searchable, Commentable, Favouritable { diff --git a/app/Models/Comment.php b/app/Models/Comment.php index b8561ef7..3e1c2508 100644 --- a/app/Models/Comment.php +++ b/app/Models/Comment.php @@ -60,6 +60,11 @@ use Poniverse\Ponyfm\Contracts\Commentable; * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Comment whereAlbumId($value) * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Comment wherePlaylistId($value) * @mixin \Eloquent + * @method static bool|null forceDelete() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Comment onlyTrashed() + * @method static bool|null restore() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Comment withTrashed() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Comment withoutTrashed() */ class Comment extends Model { diff --git a/app/Models/EmailSubscription.php b/app/Models/EmailSubscription.php index 6aff6bb3..6d4e3dff 100644 --- a/app/Models/EmailSubscription.php +++ b/app/Models/EmailSubscription.php @@ -42,6 +42,11 @@ use Poniverse\Ponyfm\Models\User; * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\EmailSubscription whereUpdatedAt($value) * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\EmailSubscription whereDeletedAt($value) * @mixin \Eloquent + * @method static bool|null forceDelete() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\EmailSubscription onlyTrashed() + * @method static bool|null restore() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\EmailSubscription withTrashed() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\EmailSubscription withoutTrashed() */ class EmailSubscription extends Model { diff --git a/app/Models/Genre.php b/app/Models/Genre.php index 09314a67..2491da0f 100644 --- a/app/Models/Genre.php +++ b/app/Models/Genre.php @@ -49,6 +49,11 @@ use Venturecraft\Revisionable\RevisionableTrait; * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Genre whereCreatedAt($value) * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Genre whereUpdatedAt($value) * @mixin \Eloquent + * @method static bool|null forceDelete() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Genre onlyTrashed() + * @method static bool|null restore() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Genre withTrashed() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Genre withoutTrashed() */ class Genre extends Model { diff --git a/app/Models/Playlist.php b/app/Models/Playlist.php index 7ca5d36c..0d9fed45 100644 --- a/app/Models/Playlist.php +++ b/app/Models/Playlist.php @@ -82,6 +82,11 @@ use Venturecraft\Revisionable\RevisionableTrait; * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Playlist whereUpdatedAt($value) * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Playlist whereDeletedAt($value) * @mixin \Eloquent + * @method static bool|null forceDelete() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Playlist onlyTrashed() + * @method static bool|null restore() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Playlist withTrashed() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Playlist withoutTrashed() */ class Playlist extends Model implements Searchable, Commentable, Favouritable { diff --git a/app/Models/Track.php b/app/Models/Track.php index fdbb6d2d..fa48452e 100644 --- a/app/Models/Track.php +++ b/app/Models/Track.php @@ -102,6 +102,49 @@ use Venturecraft\Revisionable\RevisionableTrait; * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Track mlpma() * @property-read \Illuminate\Database\Eloquent\Collection|\Poniverse\Ponyfm\Models\Activity[] $notifications * @property-read \Illuminate\Database\Eloquent\Collection|\Poniverse\Ponyfm\Models\Activity[] $activities + * @property int $current_version + * @property int|null $version_upload_status + * @property-read \Illuminate\Database\Eloquent\Collection|\Poniverse\Ponyfm\Models\TrackFile[] $trackFilesForAllVersions + * @method static bool|null forceDelete() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Track onlyTrashed() + * @method static bool|null restore() + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereAlbumId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereCommentCount($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereCoverId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereCurrentVersion($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereDeletedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereDescription($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereDownloadCount($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereDuration($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereFavouriteCount($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereGenreId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereHash($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereIsDownloadable($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereIsExplicit($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereIsLatest($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereIsListed($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereIsVocal($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereLicenseId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereLyrics($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereMetadata($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereOriginalTags($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track wherePlayCount($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track wherePublishedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereReleasedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereSlug($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereSource($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereTitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereTrackNumber($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereTrackTypeId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereVersionUploadStatus($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\Track whereViewCount($value) + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Track withTrashed() + * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\Track withoutTrashed() + * @mixin \Eloquent */ class Track extends Model implements Searchable, Commentable, Favouritable { @@ -703,7 +746,7 @@ class Track extends Model implements Searchable, Commentable, Favouritable public function trackFilesForVersion(int $version) { - return $this->hasMany(TrackFile::class)->where('track_files.version', $version); + return $this->trackFilesForAllVersions()->where('track_files.version', $version); } public function notifications() diff --git a/app/Models/User.php b/app/Models/User.php index bcf40461..25d90d06 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -99,6 +99,8 @@ use Venturecraft\Revisionable\RevisionableTrait; * @mixin \Eloquent * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\User wherePoniverseId($poniverseId) * @method static \Illuminate\Database\Query\Builder|\Poniverse\Ponyfm\Models\User whereLinkedToPoniverse() + * @property int $redirect_to + * @method static \Illuminate\Database\Eloquent\Builder|\Poniverse\Ponyfm\Models\User whereRedirectTo($value) */ class User extends Model implements AuthenticatableContract, CanResetPasswordContract, \Illuminate\Contracts\Auth\Access\Authorizable, Searchable, Commentable {