add json tags to privilege model. front contract needs
Some checks failed
Lint / Lint (push) Failing after 1m0s
Some checks failed
Lint / Lint (push) Failing after 1m0s
This commit is contained in:
parent
534339533f
commit
be6c32d14f
21
internal/2
Normal file
21
internal/2
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package models
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Privilege struct {
|
||||||
|
ID primitive.ObjectID `bson:"_id", json:"_id"`
|
||||||
|
Name string `bson:"name", json:"name"`
|
||||||
|
PrivilegeID string `bson:"privilegeId", json:"privilegeId"`
|
||||||
|
ServiceKey string `bson:"serviceKey", json:"serviceKey"`
|
||||||
|
Description string `bson:"description", json:"description"`
|
||||||
|
Type string `bson:"type", json:"type"`
|
||||||
|
Value string `bson:"value", json:"value"`
|
||||||
|
Price float64 `bson:"price", json:"price"`
|
||||||
|
CreatedAt time.Time `bson:"createdAt", json:"createdAt"`
|
||||||
|
UpdatedAt time.Time `bson:"updatedAt", json:"updatedAt"`
|
||||||
|
IsDeleted bool `bson:"isDeleted", json:"isDeleted"`
|
||||||
|
DeletedAt *time.Time `bson:"deletedAt", json:"deletedAt"`
|
||||||
|
}
|
@ -5,17 +5,19 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type Privilege struct {
|
type Privilege struct {
|
||||||
ID primitive.ObjectID `bson:"_id"`
|
ID primitive.ObjectID `bson:"_id" json:"_id"`
|
||||||
Name string `bson:"name"`
|
Name string `bson:"name" json:"name"`
|
||||||
PrivilegeID string `bson:"privilegeId"`
|
PrivilegeID string `bson:"privilegeId" json:"privilegeId"`
|
||||||
ServiceKey string `bson:"serviceKey"`
|
ServiceKey string `bson:"serviceKey" json:"serviceKey"`
|
||||||
Description string `bson:"description"`
|
Description string `bson:"description" json:"description"`
|
||||||
Type string `bson:"type"`
|
Type string `bson:"type" json:"type"`
|
||||||
Value string `bson:"value"`
|
Value string `bson:"value" json:"value"`
|
||||||
Price float64 `bson:"price"`
|
Price float64 `bson:"price" json:"price"`
|
||||||
CreatedAt time.Time `bson:"createdAt"`
|
CreatedAt time.Time `bson:"createdAt" json:"createdAt"`
|
||||||
UpdatedAt time.Time `bson:"updatedAt"`
|
UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"`
|
||||||
IsDeleted bool `bson:"isDeleted"`
|
IsDeleted bool `bson:"isDeleted" json:"isDeleted"`
|
||||||
DeletedAt *time.Time `bson:"deletedAt"`
|
DeletedAt *time.Time `bson:"deletedAt" json:"deletedAt"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
main
Executable file
BIN
main
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user