From b9e6c425a6142b2b78311cfc7b51aa0de7481440 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 11 Apr 2023 20:28:11 -0600 Subject: Añadidos modelos para órdenes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/order.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 app/models/order.rb (limited to 'app/models/order.rb') 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 -- cgit v1.2.3