| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- /**
- * @property int $id
- * @property int $unit_id
- * @property int $financial_plan_account_id
- * @property int $user_id
- * @property string $transaction_type
- * @property int $from_account_id
- * @property int $to_account_id
- * @property string $description
- * @property string $amount
- * @property string $launch_date
- * @property bool $is_reconciled
- * @property string $origin
- * @property string|null $reference_table
- * @property int|null $reference_id
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property string|null $deleted_at
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch query()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereAmount($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereDeletedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereDescription($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereFinancialPlanAccountId($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereFromAccountId($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereIsReconciled($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereLaunchDate($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereOrigin($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereReferenceId($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereReferenceTable($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereToAccountId($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereTransactionType($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereUnitId($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereUpdatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|TreasuryLaunch whereUserId($value)
- * @mixin \Eloquent
- */
- class TreasuryLaunch extends Model
- {
- use HasFactory;
- protected $table = 'treasury_launches';
- protected $guarded = [
- 'id', // Add more fields that shouldn't be edited here
- ];
- protected $casts = [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'launch_date' => 'date:Y-m-d',
- 'amount' => 'decimal:2',
- 'is_reconciled' => 'boolean',
- ];
- // Relationships
- public function financialPlanAccount(): \Illuminate\Database\Eloquent\Relations\BelongsTo
- {
- return $this->belongsTo(FinancialPlanAccount::class, 'financial_plan_account_id');
- }
- // Business Logic Methods
- // Custom Finders
- // Query Scopes
- }
|