18 lines
396 B
Ruby
18 lines
396 B
Ruby
|
# encoding: utf-8
|
||
|
|
||
|
class Announcement
|
||
|
include Mongoid::Document
|
||
|
include Mongoid::Timestamps
|
||
|
|
||
|
field :category, :type => String
|
||
|
field :title, :type => String
|
||
|
field :subtitle, :type => String
|
||
|
field :text, :type => String
|
||
|
field :postdate , :type => Date
|
||
|
field :deadline , :type => Date
|
||
|
|
||
|
# embeds_many :comments
|
||
|
|
||
|
validates_presence_of :category, :title, :subtitle, :text
|
||
|
|
||
|
end
|