2009-01-08 16:33:27 +01:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: group_order_article_quantities
|
|
|
|
#
|
2009-02-02 16:35:43 +01:00
|
|
|
# id :integer not null, primary key
|
|
|
|
# group_order_article_id :integer default(0), not null
|
|
|
|
# quantity :integer default(0)
|
|
|
|
# tolerance :integer default(0)
|
2009-01-08 16:33:27 +01:00
|
|
|
# created_on :datetime not null
|
|
|
|
#
|
|
|
|
|
2009-01-06 11:49:19 +01:00
|
|
|
# stores the quantity, tolerance and timestamp of an GroupOrderArticle
|
|
|
|
# Considers every update of an article-order, so may rows for one group_order_article ar possible.
|
|
|
|
|
|
|
|
class GroupOrderArticleQuantity < ActiveRecord::Base
|
|
|
|
|
|
|
|
belongs_to :group_order_article
|
|
|
|
|
|
|
|
validates_presence_of :group_order_article_id
|
|
|
|
validates_inclusion_of :quantity, :in => 0..99
|
|
|
|
validates_inclusion_of :tolerance, :in => 0..99
|
|
|
|
|
|
|
|
end
|