feat(domain): added request kind box domain

This commit is contained in:
Masood Keshvari 2023-12-17 19:01:14 +03:30
parent c6b6fbf32a
commit 6c623e6be6
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
}