foodsoft/app/models/stock_event.rb
Patrick Gansterer 785313ac23 Make StockEvent a base class for Delivery and StockTaking
This helps to share code between the two entities and allows easier
extensions in the future.
2020-09-05 13:52:18 +02:00

8 lines
173 B
Ruby

class StockEvent < ApplicationRecord
has_many :stock_changes, dependent: :destroy
has_many :stock_articles, through: :stock_changes
validates_presence_of :date
end