There are three types of buildings:
Core Buildings (Shop > Core)
Resource Buildings (Shop > Resources)
Defense Buildings (Shop > Defenses)

Both Core Buildings and Resource Buildings are automatically repaired if being destroyed during a battle. However, the restoration process may take some time to complete. 

If any of the Defense Building is destroyed during a battle, its health will not be automatically restored. Players need to manually repair those buildings. 

Because defense buildings also give Honor Points during a battle, this design prevents players from raiding inactive players just for Honor Points.