|
|
|
|
@ -1,8 +1,13 @@
|
|
|
|
|
class Cdao::Jurisprudence < Cdao::Base |
|
|
|
|
self.table_name = "jurisprudences" |
|
|
|
|
|
|
|
|
|
has_many :annotations, as: :document, dependent: :restrict_with_error |
|
|
|
|
|
|
|
|
|
has_many :doctrines, as: :document, dependent: :restrict_with_error |
|
|
|
|
|
|
|
|
|
has_many :annotation_documents, as: :document, dependent: :restrict_with_error |
|
|
|
|
has_many :annotations_as_cited, through: :annotation_documents, source: :annotation |
|
|
|
|
|
|
|
|
|
alias_attribute :doc_date, :docdate |
|
|
|
|
|
|
|
|
|
def subjects |
|
|
|
|
|