Merge branch 'masoodk_main' into iman_main

This commit is contained in:
imirazimi 2023-12-18 20:52:48 +03:30
commit 962182e12a
12 changed files with 111 additions and 0 deletions

11
entity/reqkindbox.go Normal file
View File

@ -0,0 +1,11 @@
package entity
type ReqKindBox struct {
ID uint
TypeId uint
CountRequested uint
CountAccepted uint
NikokarId uint
Status uint
Description string
}

View File

@ -0,0 +1,8 @@
package param
type ReqKindBoxDeleteRequest struct {
reqKindBoxID uint
}
type ReqKindBoxDeleteResponse struct {
}

View File

@ -0,0 +1,7 @@
package param
type ReqKindBoxGetAllRequest struct {
}
type ReqKindBoxGetAllResponse struct {
}

View File

@ -0,0 +1,8 @@
package param
type ReqKindBoxGetByIdRequest struct {
reqKindBoxID uint
}
type ReqKindBoxGetByIdResponse struct {
}

10
param/reqkindbox_store.go Normal file
View File

@ -0,0 +1,10 @@
package param
import "git.gocasts.ir/ebhomengo/niki/entity"
type ReqKindBoxStoreRequest struct {
reqKindBox entity.ReqKindBox
}
type ReqKindBoxStoreResponse struct {
}

View File

@ -0,0 +1,11 @@
package param
import "git.gocasts.ir/ebhomengo/niki/entity"
type ReqKindBoxUpdateRequest struct {
reqKindBoxID uint
reqKindBox entity.ReqKindBox
}
type ReqKindBoxUpdateResponse struct {
}

View File

@ -0,0 +1,7 @@
package reqkindboxservice
import "git.gocasts.ir/ebhomengo/niki/param"
func (s Service) Delete(req param.ReqKindBoxDeleteRequest) (param.ReqKindBoxDeleteResponse, error) {
return param.ReqKindBoxDeleteResponse{}, nil
}

View File

@ -0,0 +1,7 @@
package reqkindboxservice
import "git.gocasts.ir/ebhomengo/niki/param"
func (s Service) GetAll(req param.ReqKindBoxGetAllRequest) (param.ReqKindBoxGetAllResponse, error) {
return param.ReqKindBoxGetAllResponse{}, nil
}

View File

@ -0,0 +1,7 @@
package reqkindboxservice
import "git.gocasts.ir/ebhomengo/niki/param"
func (s Service) GetById(req param.ReqKindBoxGetByIdRequest) (param.ReqKindBoxGetByIdResponse, error) {
return param.ReqKindBoxGetByIdResponse{}, nil
}

View File

@ -0,0 +1,21 @@
package reqkindboxservice
import "git.gocasts.ir/ebhomengo/niki/entity"
type Repository interface {
AddReqKindBox(reqKindBox entity.ReqKindBox) (entity.ReqKindBox, error)
EditReqKindBox(reqKindBoxID uint, reqKindBox entity.ReqKindBox) (entity.ReqKindBox, error)
DeleteReqKindBox(reqKindBoxID uint) error
GetAllReqKindBox() ([]entity.ReqKindBox, error)
GetReqKindBoxByID(reqKindBoxID uint) (entity.ReqKindBox, error)
}
type Service struct {
repo Repository
}
func New(repository Repository) Service {
return Service{
repo: repository,
}
}

View File

@ -0,0 +1,7 @@
package reqkindboxservice
import "git.gocasts.ir/ebhomengo/niki/param"
func (s Service) Store(req param.ReqKindBoxStoreRequest) (param.ReqKindBoxStoreResponse, error) {
return param.ReqKindBoxStoreResponse{}, nil
}

View File

@ -0,0 +1,7 @@
package reqkindboxservice
import "git.gocasts.ir/ebhomengo/niki/param"
func (s Service) Update(req param.ReqKindBoxUpdateRequest) (param.ReqKindBoxUpdateResponse, error) {
return param.ReqKindBoxUpdateResponse{}, nil
}