Andrea Fazzi 6 жил өмнө
parent
commit
25ed2837f5
1 өөрчлөгдсөн 5 нэмэгдсэн , 0 устгасан
  1. 5 0
      orm/teacher.go

+ 5 - 0
orm/teacher.go

@@ -1,6 +1,7 @@
 package orm
 
 import (
+	"fmt"
 	"net/http"
 
 	"github.com/jinzhu/gorm"
@@ -242,3 +243,7 @@ func (t Teacher) IsCoordinatorInClass(className string) bool {
 	return false
 
 }
+
+func (t *Teacher) CompleteName() string {
+	return fmt.Sprintf("%s %s", t.Name, t.Surname)
+}