| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace App;
- use Illuminate\Database\Eloquent\Model;
- use App\Traits\ModelLogChanging;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- use Illuminate\Database\Eloquent\Relations\HasMany;
- class OwnerFeeOperation extends Model
- {
- use ModelLogChanging;
- public $timestamps = false;
- protected $fillable = [
- "worked_at",
- "model_id",
- "source_number",
- "doc_number",
- "commodity_id",
- "total_fee",
- "tax_rate",
- "fee_description",
- "owner_id",
- ];
- public function details(): HasMany
- {
- return $this->hasMany(OwnerFeeOperationDetail::class);
- }
- public function model(): BelongsTo
- {
- return $this->belongsTo(OwnerPriceOperation::class, 'model_id', 'id');
- }
- public function commodity(): BelongsTo
- {
- return $this->belongsTo(Commodity::class);
- }
- }
|