aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Rates.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/Rates.php')
-rw-r--r--app/Models/Rates.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/Models/Rates.php b/app/Models/Rates.php
new file mode 100644
index 0000000..5cabf1e
--- /dev/null
+++ b/app/Models/Rates.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Rates extends Model
+{
+ protected $connection = 'sqlite';
+
+ protected $fillable = [
+ 'currency', 'relative', 'value'
+ ];
+
+ public function currency()
+ {
+ return $this->belongsTo(Currency::class, 'currency_id');
+ }
+ public function relative()
+ {
+ return $this->belongsTo(Currency::class, 'relative_id');
+ }
+}