aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Rates.php
diff options
context:
space:
mode:
authorCalvin Morrison <calvin@fastmailteam.com>2022-08-02 14:36:09 -0400
committerCalvin Morrison <calvin@fastmailteam.com>2022-08-02 14:36:09 -0400
commitf2aff7518be55da0fd250e04a4bfc1bbbd5a3d0a (patch)
tree6d5a54ecaf98175aa9db2ebfbf3182c8f3ddf2b3 /app/Models/Rates.php
parent2466d29fe2319c1057cca7cf1e1977451088276e (diff)
data model, query and storage works, frontend display basic last report
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');
+ }
+}