Resolved #11 use external database to get terminal versions

*add a abstract model to connect external database
*TerminalVersion inherited from this model