Files
UNIT3D-Community-Edition/app/Models/TorrentTip.php
HDVinnie 51fa8ec46b update: laravel
- Laravel 11 introduces a new default application structure with fewer default files. Namely, new Laravel applications contain fewer service providers, middleware, and configuration files.

However, it is not recommend that Laravel 10 applications upgrading to Laravel 11 attempt to migrate their application structure, as Laravel 11 has been carefully tuned to also support the Laravel 10 application structure.
2024-04-23 16:06:37 -04:00

70 lines
1.8 KiB
PHP

<?php
/**
* NOTICE OF LICENSE.
*
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
* The details is bundled with this project in the file LICENSE.txt.
*
* @project UNIT3D Community Edition
*
* @author Roardom <roardom@protonmail.com>
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\Gift.
*
* @property int $id
* @property ?int $sender_id
* @property ?int $recipient_id
* @property ?int $torrent_id
* @property string $bon
* @property \Illuminate\Support\Carbon $created_at
*/
class TorrentTip extends Model
{
protected $guarded = [];
public $timestamps = false;
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'created_at' => 'datetime',
];
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo<User, self>
*/
public function sender(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(User::class);
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo<User, self>
*/
public function recipient(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(User::class);
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo<Torrent, self>
*/
public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Torrent::class);
}
}