| 
					
				 | 
			
			
				@@ -2,7 +2,6 @@ package orm 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	"fmt" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	"log" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	"net/http" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	"github.com/jinzhu/gorm" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -13,9 +12,9 @@ type Student struct { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	gorm.Model 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	Credential 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	Handicap bool 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	DSA      bool 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	BES      bool 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	Handicap bool `schema:"Handicap" sql:"default: false"` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	DSA      bool `schema:"DSA" sql:"default: false"` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	BES      bool `schema:"BES" sql:"default: false"` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	TutorID uint `schema:"tutor_id"` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	ClassID uint `schema:"class_id"` 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -104,7 +103,6 @@ func GetStudentsAll(args map[string]string) (interface{}, error) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 func SaveStudent(student interface{}) (interface{}, error) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	log.Println("HAND", student.(*Student).Handicap) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	if err := DB().Omit("Class", "Tutor").Save(student).Error; err != nil { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return nil, err 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 |