price-point-api/app/models/product.rb

18 lines
405 B
Ruby

# == Schema Information
#
# Table name: products
#
# id :bigint not null, primary key
# barcode :string
# name :string
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_products_on_barcode (barcode) UNIQUE
#
class Product < ApplicationRecord
has_one_attached :image
has_many :price_reports, dependent: :destroy
end