Skip to content

Commit b8c9802

Browse files
authored
Merge pull request #16 from landofcoder/update-queries
Update queries
2 parents e911bd9 + 60e5494 commit b8c9802

36 files changed

+2350
-385
lines changed

Api/Data/MessageInterface.php

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
<?php
2+
/**
3+
* Copyright © All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Lof\MarketplaceGraphQl\Api\Data;
9+
10+
interface MessageInterface extends \Magento\Framework\Api\ExtensibleDataInterface
11+
{
12+
13+
const STATUS = 'status';
14+
const OWNER_ID = 'owner_id';
15+
const SENDER_ID = 'sender_id';
16+
const SELLER_SEND = 'seller_send';
17+
const DESCRIPTION = 'description';
18+
const SUBJECT = 'subject';
19+
const RECEIVER_ID = 'receiver_id';
20+
const CREATED_AT = 'created_at';
21+
const MESSAGE_ID = 'message_id';
22+
const SENDER_NAME = 'sender_name';
23+
const SENDER_EMAIL = 'sender_email';
24+
const IS_READ = 'is_read';
25+
26+
/**
27+
* Get message_id
28+
* @return int|null
29+
*/
30+
public function getMessageId();
31+
32+
/**
33+
* Set message_id
34+
* @param int $messageId
35+
* @return \Lof\MarketplaceGraphQl\Message\Api\Data\MessageInterface
36+
*/
37+
public function setMessageId($messageId);
38+
39+
/**
40+
* Get description
41+
* @return string|null
42+
*/
43+
public function getDescription();
44+
45+
/**
46+
* Set description
47+
* @param string $description
48+
* @return \Lof\MarketplaceGraphQl\Message\Api\Data\MessageInterface
49+
*/
50+
public function setDescription($description);
51+
52+
/**
53+
* Get subject
54+
* @return string|null
55+
*/
56+
public function getSubject();
57+
58+
/**
59+
* Set subject
60+
* @param string $subject
61+
* @return \Lof\MarketplaceGraphQl\Message\Api\Data\MessageInterface
62+
*/
63+
public function setSubject($subject);
64+
65+
/**
66+
* Get sender_email
67+
* @return string|null
68+
*/
69+
public function getSenderEmail();
70+
71+
/**
72+
* Set sender_email
73+
* @param string $senderEmail
74+
* @return \Lof\MarketplaceGraphQl\Message\Api\Data\MessageInterface
75+
*/
76+
public function setSenderEmail($senderEmail);
77+
78+
/**
79+
* Get sender_name
80+
* @return string|null
81+
*/
82+
public function getSenderName();
83+
84+
/**
85+
* Set sender_name
86+
* @param string $senderName
87+
* @return \Lof\MarketplaceGraphQl\Message\Api\Data\MessageInterface
88+
*/
89+
public function setSenderName($senderName);
90+
91+
/**
92+
* Get created_at
93+
* @return string|null
94+
*/
95+
public function getCreatedAt();
96+
97+
/**
98+
* Set created_at
99+
* @param string $createdAt
100+
* @return \Lof\MarketplaceGraphQl\Message\Api\Data\MessageInterface
101+
*/
102+
public function setCreatedAt($createdAt);
103+
104+
/**
105+
* Get status
106+
* @return int|null
107+
*/
108+
public function getStatus();
109+
110+
/**
111+
* Set status
112+
* @param int $status
113+
* @return \Lof\MarketplaceGraphQl\Message\Api\Data\MessageInterface
114+
*/
115+
public function setStatus($status);
116+
117+
/**
118+
* Get is_read
119+
* @return int|null
120+
*/
121+
public function getIsRead();
122+
123+
/**
124+
* Set is_read
125+
* @param int $isRead
126+
* @return \Lof\MarketplaceGraphQl\Message\Api\Data\MessageInterface
127+
*/
128+
public function setIsRead($isRead);
129+
130+
/**
131+
* Get sender_id
132+
* @return string|null
133+
*/
134+
public function getSenderId();
135+
136+
/**
137+
* Set sender_id
138+
* @param string $senderId
139+
* @return \Lof\MarketplaceGraphQl\Message\Api\Data\MessageInterface
140+
*/
141+
public function setSenderId($senderId);
142+
143+
/**
144+
* Get owner_id
145+
* @return int|null
146+
*/
147+
public function getOwnerId();
148+
149+
/**
150+
* Set owner_id
151+
* @param int $ownerId
152+
* @return \Lof\MarketplaceGraphQl\Message\Api\Data\MessageInterface
153+
*/
154+
public function setOwnerId($ownerId);
155+
156+
/**
157+
* Get receiver_id
158+
* @return int|null
159+
*/
160+
public function getReceiverId();
161+
162+
/**
163+
* Set receiver_id
164+
* @param int $receiverId
165+
* @return \Lof\MarketplaceGraphQl\Message\Api\Data\MessageInterface
166+
*/
167+
public function setReceiverId($receiverId);
168+
169+
/**
170+
* Get seller_send
171+
* @return int|null
172+
*/
173+
public function getSellerSend();
174+
175+
/**
176+
* Set seller_send
177+
* @param int $sellerSend
178+
* @return \Lof\MarketplaceGraphQl\Message\Api\Data\MessageInterface
179+
*/
180+
public function setSellerSend($sellerSend);
181+
182+
/**
183+
* Retrieve existing extension attributes object or create a new one.
184+
* @return \Lof\MarketplaceGraphQl\Api\Data\MessageExtensionInterface|\Magento\Framework\Api\ExtensionAttributesInterface|null
185+
*/
186+
public function getExtensionAttributes();
187+
188+
/**
189+
* Set an extension attributes object.
190+
* @param \Lof\MarketplaceGraphQl\Api\Data\MessageExtensionInterface $extensionAttributes
191+
* @return $this
192+
*/
193+
public function setExtensionAttributes(
194+
\Lof\MarketplaceGraphQl\Api\Data\MessageExtensionInterface $extensionAttributes
195+
);
196+
}
197+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
/**
3+
* Landofcoder
4+
*
5+
* NOTICE OF LICENSE
6+
*
7+
* This source file is subject to the Landofcoder.com license that is
8+
* available through the world-wide-web at this URL:
9+
* https://landofcoder.com/terms
10+
*
11+
* DISCLAIMER
12+
*
13+
* Do not edit or add to this file if you wish to upgrade this extension to newer
14+
* version in the future.
15+
*
16+
* @category Landofcoder
17+
* @package Lof_MarketplaceGraphQl
18+
* @copyright Copyright (c) 2021 Landofcoder (https://www.landofcoder.com/)
19+
* @license https://landofcoder.com/terms
20+
*/
21+
22+
namespace Lof\MarketplaceGraphQl\Api\Data;
23+
24+
interface MessageSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface
25+
{
26+
/**
27+
* Get seller message list.
28+
* @return \Lof\MarketplaceGraphQl\Api\Data\MessageInterface[]
29+
*/
30+
public function getItems();
31+
32+
/**
33+
* Set seller message list.
34+
* @param \Lof\MarketplaceGraphQl\Api\Data\MessageInterface[] $items
35+
* @return $this
36+
*/
37+
public function setItems(array $items);
38+
}

Api/MessageRepositoryInterface.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
/**
3+
* Copyright © Landofcoder All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Lof\MarketplaceGraphQl\Api;
9+
10+
use Magento\Framework\Api\SearchCriteriaInterface;
11+
12+
/**
13+
* Interface MessageRepositoryInterface
14+
*/
15+
interface MessageRepositoryInterface
16+
{
17+
/**
18+
* @param int $sellerId
19+
* @param SearchCriteriaInterface $searchCriteria
20+
* @return \Lof\MarketplaceGraphQl\Api\Data\MessageSearchResultsInterface
21+
*/
22+
public function getListSellerMessages(
23+
int $sellerId,
24+
\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
25+
);
26+
27+
/**
28+
* @param int $customerId
29+
* @param SearchCriteriaInterface $searchCriteria
30+
* @return \Lof\MarketplaceGraphQl\Api\Data\MessageSearchResultsInterface
31+
*/
32+
public function getListMessages(
33+
int $customerId,
34+
\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
35+
);
36+
}

0 commit comments

Comments
 (0)