otvorenesudy/otvorenesudy-api

View on GitHub
app/models/judge/property/list.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# == Schema Information
#
# Table name: judge_property_lists
#
#  id                            :integer          not null, primary key
#  judge_property_declaration_id :integer          not null
#  judge_property_category_id    :integer          not null
#  created_at                    :datetime         not null
#  updated_at                    :datetime         not null
#
class Judge::Property::List < ActiveRecord::Base
  include OpenCourts::Model

  belongs_to :declaration, class_name: 'Judge::Property::Declaration', foreign_key: :judge_property_declaration_id
  belongs_to :category, class_name: 'Judge::Property::Category', foreign_key: :judge_property_category_id

  has_many :items, class_name: 'Judge::Property', dependent: :destroy
end