authorship.go 279 B

1234567891011121314151617181920
  1. package models;
  2. /*{
  3. "article_id": *?,
  4. "person": {
  5. "staff_id": *?,
  6. "termit_id": *?
  7. }
  8. }*/
  9. type Person struct {
  10. StaffId int `sql:"index"`;
  11. TermitId int `sql:"index"`; // EmpGUID
  12. };
  13. type Authorship struct {
  14. ArticleId int `gorm:"index"`;
  15. Person `gorm:"embedded"`;
  16. };