How can I make functional doors?

How can I make functional doors?

The best way is to make a prefab from a door on one map and put it in your mod