Current COVID-19 pandemic and previous SARS/MERS outbreaks have caused a series of major crises to global public health. We must integrate the large and exponentially growing amount of heterogeneous coronavirus data to better understand coronaviruses and associated disease mechanisms, in the interest of developing effective and safe vaccines and drugs. Ontology has emerged to play an important role in standard knowledge and data representation, integration, sharing, and analysis. We have initiated the development of the community-based Coronavirus Infectious Disease Ontology (CIDO). As an Open Biomedical Ontology (OBO) library ontology, CIDO is an open source and interoperable with other existing OBO ontologies. In this article, the general architecture and the design patterns of the CIDO are introduced, CIDO representation of coronaviruses, phenotypes, anti-coronavirus drugs and medical devices (e.g. ventilators) are illustrated, and an application of CIDO implemented to identify repurposable drug candidates for effective and safe COVID-19 treatment is presented.