class CompanyNote < ApplicationRecord
  include Base::CompanyNote

  belongs_to :company, foreign_key: :CCID, inverse_of: :notes
  belongs_to :author, class_name: '::User', foreign_key: :AuthorID, inverse_of: :company_notes

  validates :datetime, :subject, presence: true
  validates :subject, length: { maximum: 32 }
end
