Browse Source

Merge branch 'add-api12-models' of iacherepanov/go-sd-models into master

1 changed files with 18 additions and 0 deletions
  1. 18 0
      api12/role.go

+ 18 - 0
api12/role.go

@@ -0,0 +1,18 @@
+//go:generate reform --gofmt=false .
+package api12Models
+
+import (
+	"github.com/xaionaro-go/extime"
+)
+
+//reform:permissions
+type Role struct {
+	Id          int          `reform:"id" json:"id" view:"readonly"`
+	CreatedAt   *extime.Date `reform:"doc" json:"doc" view:"readonly"`
+	PersonId    int          `reform:"subject_person_id" json:"subject_person_id" view:"readonly"`
+	ServiceName string       `reform:"service_name" json:"service_name" view:"readonly"`
+	RoleName    string       `reform:"permission_name" json:"permission_name" view:"readonly"`
+	Extra       string       `reform:"value" json:"value" view:"readonly"`
+}
+
+type Roles []Role