add postgres script
refactor WinWorkDao