'decimal:2', 'created_at' => 'datetime', ]; // Relationships public function coupon(): BelongsTo { return $this->belongsTo(Coupon::class); } public function workspace(): BelongsTo { return $this->belongsTo(Workspace::class); } public function order(): BelongsTo { return $this->belongsTo(Order::class); } // Boot protected static function boot() { parent::boot(); static::creating(function ($usage) { $usage->created_at = now(); }); } }