package dto import ( "errors" pkgdto "github.com/Caknoooo/go-gin-clean-starter/pkg/dto" ) const ( MESSAGE_FAILED_CREATE_VENDOR = "failed create vendor" MESSAGE_SUCCESS_CREATE_VENDOR = "success create vendor" MESSAGE_FAILED_GET_VENDOR = "failed get vendor" MESSAGE_SUCCESS_GET_VENDOR = "success get vendor" MESSAGE_FAILED_UPDATE_VENDOR = "failed update vendor" MESSAGE_SUCCESS_UPDATE_VENDOR = "success update vendor" MESSAGE_FAILED_DELETE_VENDOR = "failed delete vendor" MESSAGE_SUCCESS_DELETE_VENDOR = "success delete vendor" MESSAGE_FAILED_GET_DATA_FROM_BODY = "failed get data from body" ) var ( ErrCreateVendor = errors.New("failed to create vendor") ErrGetVendorById = errors.New("failed to get vendor by id") ErrUpdateVendor = errors.New("failed to update vendor") ErrDeleteVendor = errors.New("failed to delete vendor") ) type VendorCreateRequest struct { // SearchKey string `json:"search_key"` Name string `json:"name" binding:"required"` Address string `json:"address"` ContactPerson string `json:"contact_person"` IsActive bool `json:"is_active"` ClientID string `json:"client_id" binding:"required"` } type VendorUpdateRequest struct { // SearchKey string `json:"search_key"` Name string `json:"name"` Address string `json:"address"` ContactPerson string `json:"contact_person"` IsActive bool `json:"is_active"` ClientID string `json:"client_id"` } type VendorResponse struct { ID string `json:"id"` SearchKey string `json:"search_key"` Name string `json:"name"` Address string `json:"address"` ContactPerson string `json:"contact_person"` IsActive bool `json:"is_active"` Client pkgdto.IdNameResponse `json:"client"` }