initial commit

This commit is contained in:
2026-05-25 11:52:26 +05:30
commit 0d42ac84e1
53 changed files with 11222 additions and 0 deletions

27
routes/customerroutes.go Normal file
View File

@@ -0,0 +1,27 @@
package routes
import (
"nearle/facade"
"github.com/gofiber/fiber/v2"
)
func RegisterCustomerRoutes(api fiber.Router, f *facade.Facade) {
customer := api.Group("/v1/mob/customers")
customer.Get("/getbyid", f.CustomerController.GetCustomer)
customer.Put("/update", f.CustomerController.UpdateCustomer)
customer.Get("/getcustomerlocation", f.CustomerController.GetCustomerLocations)
customer.Post("/createlocations", f.CustomerController.CreateCustomerLocation)
customer.Post("/createcustomerrequest", f.CustomerController.CreateCustomerRequest)
customer.Get("/getcustomerrequests", f.CustomerController.GetCustomerRequests)
customer.Get("/gettenantcustomers", f.CustomerController.GetTenantCustomers)
customer.Get("/search", f.CustomerController.SearchCustomer)
customer.Post("/login", f.CustomerController.CustomerLogin)
customer.Post("/create", f.CustomerController.CreateCustomer)
customer = api.Group("/v1/web/customers")
customer.Get("/gettenantcustomers", f.CustomerController.GetTenantCustomers)
}

View File

@@ -0,0 +1,30 @@
package routes
import (
"nearle/facade"
"github.com/gofiber/fiber/v2"
)
func RegisterDeliveriesRoutes(api fiber.Router, f *facade.Facade) {
deliveries := api.Group("/v1/web/deliveries")
deliveries.Post("/createdeliveries", f.DeliveriesController.CreateDeliveries)
deliveries.Put("/updatedelivery", f.DeliveriesController.UpdateDelivery)
deliveries.Get("/deliverysummary", f.DeliveriesController.GetDeliverySummary)
deliveries.Get("/getdeliveryinsight", f.DeliveriesController.GetDeliveryInsight)
deliveries.Get("/getlocationsummary", f.DeliveriesController.GetLocationDeliverySummary)
deliveries.Get("/getreportsummary", f.DeliveriesController.GetReportSummary)
deliveries.Get("/getridersummary", f.DeliveriesController.GetRiderSummary)
deliveries.Get("/getdeliveries", f.DeliveriesController.GetDeliveries)
deliveries = api.Group("/v1/mob/deliveries")
deliveries.Get("/deliverysummary", f.DeliveriesController.GetDeliverySummary)
deliveries.Get("/getdeliveries", f.DeliveriesController.GetDeliveries)
deliveries.Get("/getdeliveryqueues", f.DeliveriesController.GetDeliveryQueues)
deliveries.Put("/updatedelivery", f.DeliveriesController.UpdateDelivery)
deliveries.Post("/createdeliveries", f.DeliveriesController.CreateDeliveries)
}

34
routes/orderroutes.go Normal file
View File

@@ -0,0 +1,34 @@
package routes
import (
"nearle/facade"
"github.com/gofiber/fiber/v2"
)
func RegisterOrderRoutes(api fiber.Router, f *facade.Facade) {
orders := api.Group("/v1/web/orders")
orders.Get("tenant/getorders", f.OrderController.GetOrders)
orders.Get("partner/getorders", f.OrderController.GetOrders)
orders.Get("customer/getorders", f.OrderController.GetOrders)
orders.Get("user/getorders", f.OrderController.GetOrders)
orders.Get("admin/getorders", f.OrderController.GetOrders)
orders.Get("/getorders", f.OrderController.GetOrders)
orders.Get("/getordersummary", f.OrderController.GetOrderSummary)
orders.Get("/getlocationsummary", f.OrderController.GetlocationOrderSummary)
orders.Get("/getorderinsight", f.OrderController.GetOrderInsights)
orders.Get("/getorderdetails", f.OrderController.GetOrderDetails)
orders.Put("/updateorder", f.OrderController.UpdateOrder)
orders.Post("/createorder", f.OrderController.CreateOrderv3)
orders = api.Group("/v1/mob/orders")
orders.Post("/createorder", f.OrderController.CreateOrderv3)
orders.Get("/getcustomerorders", f.OrderController.GetCustomerOrders)
orders.Get("tenant/getorders", f.OrderController.GetOrders)
orders.Put("/updateorder", f.OrderController.UpdateOrder)
orders.Get("/getorderdetails", f.OrderController.GetOrderDetails)
}

26
routes/partnerroutes.go Normal file
View File

@@ -0,0 +1,26 @@
package routes
import (
"nearle/facade"
"github.com/gofiber/fiber/v2"
)
func RegisterPartnerRoutes(api fiber.Router, f *facade.Facade) {
partner := api.Group("/v1/web/partners")
partner.Get("/getriders", f.PartnerController.GetActiveRiders)
partner.Get("/getpartners", f.PartnerController.GetPartners)
partner.Get("/getridershifts", f.PartnerController.GetRiderShifts)
partner.Get("/getlocations", f.PartnerController.GetLocationConfig)
partner.Get("/getriderlogs", f.PartnerController.GetRiderLogs)
partner = api.Group("/v1/mob/partners")
partner.Get("/getpartners", f.PartnerController.GetPartners)
partner.Get("/getriderlogs", f.PartnerController.GetRiderLogs)
partner.Get("/getriderinfo", f.PartnerController.GetRiderInfo)
partner.Get("/getriders", f.PartnerController.GetActiveRiders)
}

41
routes/productroutes.go Normal file
View File

@@ -0,0 +1,41 @@
package routes
import (
"nearle/facade"
"github.com/gofiber/fiber/v2"
)
func RegisterProductRoutes(api fiber.Router, f *facade.Facade) {
products := api.Group("/v1/web/products")
products.Get("/getproductsubcategories", f.ProductController.GetProductSubCategory)
products.Get("/getproductscount", f.ProductController.GetProductCount)
products.Get("/getproductcategories", f.ProductController.GetProductCategory)
products.Get("/getproductvariants", f.ProductController.GetProductVariants)
products.Get("/getcatalougeproducts", f.ProductController.GetCatalougeProducts)
products.Get("/getproductstocks", f.ProductController.GetProductStocks)
products.Post("/createproductstock", f.ProductController.CreateProductStock)
products.Post("/create", f.ProductController.CreateProduct)
products.Put("/update", f.ProductController.UpdateProduct)
products.Delete("/delete", f.ProductController.DeleteProduct)
products.Get("/getstockstatement", f.ProductController.GetStockStatement)
products.Get("/getlocationproducts", f.ProductController.GetLocationProducts)
products.Get("/getlocationproductsummary", f.ProductController.GetLocationProductSummary)
products.Get("/getallproducts", f.ProductController.GetAllProducts)
products.Put("/updateproductlocation", f.ProductController.UpdateProductLocation)
products.Post("/createproductlocation", f.ProductController.CreateProductLocation)
products.Post("/createproductvariant", f.ProductController.CreateProductVariant)
products = api.Group("/v1/mob/products")
products.Get("/getproductbyvariant", f.ProductController.GetProductByVariant)
products.Get("/getproductsubcategories", f.ProductController.GetProductSubCategory)
products.Get("/getallproducts", f.ProductController.GetAllProducts)
products.Get("/getproductsbysubcategory", f.ProductController.GetProductsBySubcategory)
products.Put("/update", f.ProductController.UpdateProduct)
products.Get("/getlocationproducts", f.ProductController.GetLocationProducts)
products.Put("/updateproductlocation", f.ProductController.UpdateProductLocation)
}

21
routes/routes.go Normal file
View File

@@ -0,0 +1,21 @@
package routes
import (
"nearle/facade"
"github.com/gofiber/fiber/v2"
)
func RegisterRoutes(app *fiber.App, f *facade.Facade) {
api := app.Group("/live/api")
RegisterUserRoutes(api, f)
RegisterProductRoutes(api, f)
RegisterOrderRoutes(api, f)
RegisterDeliveriesRoutes(api, f)
RegisterUtilsRoutes(api, f)
RegisterTenantRoutes(api, f)
RegisterPartnerRoutes(api, f)
RegisterCustomerRoutes(api, f)
}

38
routes/tenantroutes.go Normal file
View File

@@ -0,0 +1,38 @@
package routes
import (
"nearle/facade"
"github.com/gofiber/fiber/v2"
)
func RegisterTenantRoutes(api fiber.Router, f *facade.Facade) {
tenant := api.Group("/v1/web/tenants")
tenant.Get("/search", f.TenantController.SearchTenant)
tenant.Get("/searchbykeyword", f.TenantController.GetTenantByKeyword)
tenant.Get("/getalltenants", f.TenantController.GetAllTenants)
tenant.Get("/gettenantlocations", f.TenantController.GetTenantLocations)
tenant.Post("/createtenantcustomer", f.TenantController.CreateTenantCustomer)
tenant.Put("/updatelocation", f.TenantController.UpdateLocation)
tenant.Post("/createlocation", f.TenantController.CreateLocation)
tenant.Post("/createtenantlocation", f.TenantController.CreateTenantLocation)
tenant.Put("/updatetenantlocation", f.TenantController.UpdateTenantLocation)
tenant = api.Group("/v1/mob/tenants")
tenant.Get("/gettenantslot", f.TenantController.GetTenantSlot)
tenant.Get("/searchbykeyword", f.TenantController.GetTenantByKeyword)
tenant.Post("/createtenantcustomer", f.TenantController.CreateTenantCustomer)
tenant.Get("/getcustomertenants", f.TenantController.GetCustomerTenants)
tenant.Get("/gettenantlocations", f.TenantController.GetTenantLocations)
tenant.Get("/gettenantpricing", f.TenantController.GetTenantPricing)
tenant.Put("/updatelocation", f.TenantController.UpdateLocation)
tenant.Post("/createlocation", f.TenantController.CreateLocation)
tenant.Get("/getstaffs", f.TenantController.GetStaffs)
tenant.Post("/createstaff", f.TenantController.CreateStaff)
tenant.Post("/createtenantuser", f.TenantController.CreateTenantUser)
tenant.Get("/gettenantinfo", f.TenantController.GetTenantInfo)
}

24
routes/userroutes.go Normal file
View File

@@ -0,0 +1,24 @@
package routes
import (
"nearle/facade"
"github.com/gofiber/fiber/v2"
)
func RegisterUserRoutes(api fiber.Router, f *facade.Facade) {
users := api.Group("/v1/web/users")
users.Get("/getallusers", f.UserController.GetAllUsers)
users.Get("/getusers", f.UserController.GetUserInfo)
users.Post("/applogin", f.UserController.AppLogin)
users.Post("/create", f.UserController.CreateUser)
users.Post("/tenant/weblogin", f.UserController.TenantWebLogin)
users.Put("/update", f.UserController.UpdateStaff)
users = api.Group("/v1/mob/users")
users.Post("/tenant/login", f.UserController.Login)
users.Get("/getusers", f.UserController.GetUserInfo)
users.Post("/create", f.UserController.CreateUser)
users.Put("/update", f.UserController.UpdateStaff)
}

29
routes/utilsroutes.go Normal file
View File

@@ -0,0 +1,29 @@
package routes
import (
"nearle/facade"
"github.com/gofiber/fiber/v2"
)
func RegisterUtilsRoutes(api fiber.Router, f *facade.Facade) {
utils := api.Group("/v1/web/utils")
utils.Get("/getapptypes", f.UtilsController.GetAppTypes)
// utils.Post("/notifyuser", f.UtilsController.NotifyUser)
utils.Get("/getsubcategories", f.UtilsController.GetSubcategories)
utils.Get("/getapplocations", f.UtilsController.GetApplocations)
utils.Get("/getappcategories", f.UtilsController.GetAppCategory)
utils = api.Group("/v1/mob/utils")
utils.Get("/getapplocationconfig", f.UtilsController.GetApplocationConfig)
// utils.Post("/notifyadmin", f.UtilsController.NotifyAdmin)
utils.Get("/getapplocations", f.UtilsController.GetApplocations)
utils.Get("/getapptypes", f.UtilsController.GetAppTypes)
utils.Get("/getappconfig", f.UtilsController.GetAppConfig)
utils.Get("/getsubcategories", f.UtilsController.GetSubcategories)
utils.Get("/getappcategories", f.UtilsController.GetAppCategory)
}