Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Repository creation depends on many models, so moving it to service layer is better.