Browse Source

Initial commit

Dmitry Yu Okunev 6 years ago
commit
264e88796b
2 changed files with 59 additions and 0 deletions
  1. 19 0
      authorship.go
  2. 40 0
      publication.go

+ 19 - 0
authorship.go

@@ -0,0 +1,19 @@
+package models;
+
+/*{
+	"article_id": *?,
+	"person": {
+		"staff_id": *?,
+		"termit_id": *?
+	}
+}*/
+type Person struct {
+	StaffId		int	`sql:"index"`;
+	TermitId	int	`sql:"index"`;	// EmpGUID
+};
+
+type Authorship struct {
+	ArticleId	int	`gorm:"index"`;
+	Person			`gorm:"embedded"`;
+};
+

+ 40 - 0
publication.go

@@ -0,0 +1,40 @@
+package models;
+
+import (
+	  "time";
+);
+
+/*{
+	"id": *?,
+	"external_id": *?,
+	"year": ????,
+	"journal": "*?",
+	"title": "*?",
+	"volume": "???",
+	"issue": "?-?",
+	"pages": "???-???",
+	"quartile": "",
+	"doi": "*?",
+	"link": "*?",
+	"npr_number": *?,
+	"employed_number": *?,
+	"started_at": "????-??-??T??:??:??.???+??:??"
+}*/
+type Publication struct {
+	Id		int	`gorm:"primary_key"`;
+	ExternalId	int	`sql:"index"`;
+	Year		int;
+	Journal		string;
+	Title		string;
+	Volume		string;
+	Issue		string;
+	Pages		string;
+	Quartile	string;
+	DOI		string;
+	Link		string;
+	NprNumber	int;
+	EmployedNumber	int;
+	StartedAt	time.Time;
+};
+
+