class Host include Mongoid::Document include Mongoid::Timestamps field :uuid, type: String field :hostname, type: String field :ip, type: String field :installip, type: String field :status, type: String field :mac, type: String field :discover, type: Mongoid::Boolean field :installed, type: Mongoid::Boolean field :toinstall, type: Mongoid::Boolean field :interface, type: String field :lastbootgenerated, type: String , default: '' field :lastinstallgenerated, type: String , default: '' field :lastpostinstallgenerated, type: String, default: '' belongs_to :installtemplate , class_name: "Installtemplate", inverse_of: :hostreferences belongs_to :site , class_name: "Site", inverse_of: :sitereferences belongs_to :rootaccount , class_name: "Account", inverse_of: :rootref belongs_to :mainaccount , class_name: "Account", inverse_of: :accountref end