52 lines
1.7 KiB
PHP
52 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* App\Models\Payment
|
|
*
|
|
* @property int $id
|
|
* @property int $project_id
|
|
* @property int $type
|
|
* @property int $status
|
|
* @property int $amount
|
|
* @property string $description
|
|
* @property \Illuminate\Support\Carbon|null $created_at
|
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Payment newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Payment newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Payment query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Payment whereAmount($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Payment whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Payment whereDescription($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Payment whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Payment whereProjectId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Payment whereStatus($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Payment whereType($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Payment whereUpdatedAt($value)
|
|
* @mixin \Eloquent
|
|
* @property-read \App\Models\Project|null $project
|
|
*/
|
|
class Payment extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
const TYPE_DEPOSIT = 0;
|
|
|
|
const TYPE_FINAL = 1;
|
|
|
|
const STATUS_UNPAID = 0;
|
|
|
|
const STATUS_PAID = 1;
|
|
|
|
protected $fillable = ['project_id', 'type', 'status', 'amount', 'description'];
|
|
|
|
public function project()
|
|
{
|
|
return $this->belongsTo(Project::class);
|
|
}
|
|
}
|