summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-03-13 20:03:06 -0600
committerHombreLaser <sebastian-440@live.com>2023-03-13 20:03:06 -0600
commit88584b5500873b7578410e0826fbd185544b19cb (patch)
tree84e87a4b0c43b7eba79edcdf67a0c962c8e0d071 /app/models
parent5c899df07753a31543f8dad725a26ccddc44dfe2 (diff)
Añade modelo Product
Diffstat (limited to 'app/models')
-rw-r--r--app/models/product.rb17
1 files changed, 17 insertions, 0 deletions
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