venue_management/app/models/venue_management_memorabili...

20 lines
442 B
Ruby

class VenueManagementMemorabilia
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Enum
field :event_date, type: Date, default: Time.now
field :details, localize: true
def case_no
inviting = self.venue_management_inviting
if !inviting.nil?
inviting.case_no
else
nil
end
end
belongs_to :venue_management_inviting
belongs_to :venue_management_main
include VenueLinkFile
end