initial code for GORM and service.