Skip to content

Commit

Permalink
🗃️ new entities related to #67, role, staff, RoleStaffRelation
Browse files Browse the repository at this point in the history
  • Loading branch information
Shion1305 committed Feb 25, 2024
1 parent a3f403d commit 919ad53
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion svc/pkg/infra/entity/relation/org_user.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package relation
package entity

const (
RelationRootName = "Relation"
Expand Down
8 changes: 8 additions & 0 deletions svc/pkg/infra/entity/relation/role_staff.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package entity

const RelationRoleStaffName = "RoleStaff"

type RoleStaffRelation struct {
RoleID string `json:"role_id"`
UserID string `json:"user_id"`
}
8 changes: 8 additions & 0 deletions svc/pkg/infra/entity/role/role.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package entity

const RoleTableName = "Roles"

type Role struct {
ID string `json:"-"`
Name string `json:"name"`
}
8 changes: 8 additions & 0 deletions svc/pkg/infra/entity/staff/staff.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package entity

const StaffTableName = "Staffs"

type Staff struct {
UserID string `json:"user_id"`
IsAdmin bool `json:"is_admin"`
}

0 comments on commit 919ad53

Please sign in to comment.