From 88584b5500873b7578410e0826fbd185544b19cb Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Mon, 13 Mar 2023 20:03:06 -0600 Subject: AƱade modelo Product MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/product.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/models/product.rb (limited to 'app/models') diff --git a/app/models/product.rb b/app/models/product.rb new file mode 100644 index 0000000..d12cd41 --- /dev/null +++ b/app/models/product.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +# Product +# public_id:string +# name:string +# unitary_price:float +# bulk_price:float +# picture:attachment +# available_quantity:integer +# categories:text +class Product < ApplicationRecord + belongs_to :company + + has_one_attached :picture + + serialize :categories, Array +end -- cgit v1.2.3