Add Balance Api

This commit is contained in:
aditya.siregar
2024-07-30 23:51:53 +07:00
parent b6f75082e9
commit b8e034d8d8
10 changed files with 127 additions and 287 deletions
@@ -14,6 +14,7 @@ type Context interface {
RequestedBy() int64
IsSuperAdmin() bool
IsAdmin() bool
IsPartnerAdmin() bool
IsCasheer() bool
GetPartnerID() *int64
GetSiteID() *int64
@@ -41,6 +42,10 @@ func (m *MyContextImpl) IsAdmin() bool {
return m.roleID == int(role.SuperAdmin) || m.roleID == int(role.Admin)
}
func (m *MyContextImpl) IsPartnerAdmin() bool {
return m.roleID == int(role.PartnerAdmin)
}
func (m *MyContextImpl) IsCasheer() bool {
return m.roleID == int(role.Casheer)
}