V1 #1

Merged
trunglt251292 merged 13 commits from v1 into master 2022-05-31 03:35:14 +00:00
2 changed files with 28 additions and 1 deletions
Showing only changes of commit 4007238604 - Show all commits

1
go.mod
View File

@ -4,6 +4,7 @@ go 1.17
require (
github.com/Selly-Modules/natsio v0.0.0-20220419025827-e72bc82991bf
go.mongodb.org/mongo-driver v1.9.1
)
require (

View File

@ -2,8 +2,18 @@ package authentication
import (
"github.com/Selly-Modules/natsio"
"go.mongodb.org/mongo-driver/bson"
)
// CommonQuery ...
type CommonQuery struct {
Page int64 `json:"page"`
Limit int64 `json:"limit"`
Keyword string `json:"keyword"`
Sort bson.D `json:"sort"`
StaffID string `json:"staffID"`
}
// Log ...
type Log struct {
Reference string `json:"reference"`
@ -13,6 +23,23 @@ type Log struct {
Action string `json:"action"`
}
// LogsResponse ...
type LogsResponse struct {
ID string `json:"_id"`
Staff string `json:"staff"`
Payload PayloadCheckPermission `json:"payload"`
Action string `json:"action"`
CreatedAt string `json:"createdAt"`
}
// ListPageResponse ...
type ListPageResponse struct {
Data []interface{} `json:"data"`
Total int64 `json:"total"`
Page int64 `json:"page"`
Limit int64 `json:"limit"`
}
// Staff ...
type Staff struct {
Reference string `json:"reference"` // ObjectID
@ -41,7 +68,6 @@ type StaffCheckPermissionBody struct {
StaffID string `json:"staffId"`
Token string `json:"token"`
Permission []string `json:"permission"`
Action string `json:"action"`
Source string `json:"source"`
Code string `json:"code,omitempty"`
IsRoot string `json:"isRoot"`