forked from ebhomengo/niki
				
			Merge branch 'masoodk_main' into iman_main
This commit is contained in:
		
						commit
						962182e12a
					
				| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
package entity
 | 
			
		||||
 | 
			
		||||
type ReqKindBox struct {
 | 
			
		||||
	ID             uint
 | 
			
		||||
	TypeId         uint
 | 
			
		||||
	CountRequested uint
 | 
			
		||||
	CountAccepted  uint
 | 
			
		||||
	NikokarId      uint
 | 
			
		||||
	Status         uint
 | 
			
		||||
	Description    string
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
package param
 | 
			
		||||
 | 
			
		||||
type ReqKindBoxDeleteRequest struct {
 | 
			
		||||
	reqKindBoxID uint
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type ReqKindBoxDeleteResponse struct {
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
package param
 | 
			
		||||
 | 
			
		||||
type ReqKindBoxGetAllRequest struct {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type ReqKindBoxGetAllResponse struct {
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
package param
 | 
			
		||||
 | 
			
		||||
type ReqKindBoxGetByIdRequest struct {
 | 
			
		||||
	reqKindBoxID uint
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type ReqKindBoxGetByIdResponse struct {
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,10 @@
 | 
			
		|||
package param
 | 
			
		||||
 | 
			
		||||
import "git.gocasts.ir/ebhomengo/niki/entity"
 | 
			
		||||
 | 
			
		||||
type ReqKindBoxStoreRequest struct {
 | 
			
		||||
	reqKindBox entity.ReqKindBox
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type ReqKindBoxStoreResponse struct {
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
package param
 | 
			
		||||
 | 
			
		||||
import "git.gocasts.ir/ebhomengo/niki/entity"
 | 
			
		||||
 | 
			
		||||
type ReqKindBoxUpdateRequest struct {
 | 
			
		||||
	reqKindBoxID uint
 | 
			
		||||
	reqKindBox   entity.ReqKindBox
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type ReqKindBoxUpdateResponse struct {
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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,
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue