25 lines
597 B
Ruby
25 lines
597 B
Ruby
class AskQuestion
|
|
include Mongoid::Document
|
|
include ActiveModel::Validations
|
|
include ActiveModel::Conversion
|
|
extend ActiveModel::Naming
|
|
|
|
include OrbitCategory::Categorizable
|
|
include OrbitModel::Approval
|
|
include Mongoid::Document
|
|
include Mongoid::Timestamps
|
|
|
|
field :name, type: String
|
|
field :identity, type: String
|
|
field :email, type: String
|
|
field :phone, type: String
|
|
field :tax, type: String
|
|
field :title, type: String
|
|
field :content, type: String
|
|
|
|
validates_presence_of :name, :identity, :email, :title, :content
|
|
|
|
has_one :ask_reply, dependent: :destroy
|
|
|
|
end
|