summaryrefslogtreecommitdiff
path: root/app/models/order.rb
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-04-11 20:28:11 -0600
committerHombreLaser <sebastian-440@live.com>2023-04-11 20:28:11 -0600
commitb9e6c425a6142b2b78311cfc7b51aa0de7481440 (patch)
tree9350e616a04a7ddbc148ed86ee925fb589dd7665 /app/models/order.rb
parentbb9554c298a5edc6c0ff90ec7497adff299891e0 (diff)
Añadidos modelos para órdenes
Diffstat (limited to 'app/models/order.rb')
-rw-r--r--app/models/order.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/order.rb b/app/models/order.rb
new file mode 100644
index 0000000..ae5a0d5
--- /dev/null
+++ b/app/models/order.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+# Order
+# public_id: string
+class Order < ApplicationRecord
+ belongs_to :user_account
+ has_one :payment
+ has_many :product_orders
+ has_many :products, through: :product_orders
+end