-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PLA-2033] Changes for v2.0.0 on marketplace #66
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
@@ -7,7 +7,7 @@ | |||
use Enjin\Platform\Marketplace\Enums\ListingState; | |||
use Enjin\Platform\Marketplace\Enums\ListingType; | |||
use Enjin\Platform\Marketplace\Events\Substrate\Marketplace\ListingCreated as ListingCreatedEvent; | |||
use Enjin\Platform\Marketplace\Models\MarketplaceListing; | |||
use Enjin\Platform\Marketplace\Models\Laravel\MarketplaceListing; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Enjin\Platform\Marketplace\Models\Laravel\MarketplaceListing; | |
use Enjin\Platform\Marketplace\Models\MarketplaceListing; |
Can we use the Model Resolver version here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work, will give a type error. Would have to use just Model but that takes type hint away
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine, we use Model elsewhere for this reason too so should try to keep it consistent 👍🏻
Co-authored-by: Simon Evans <v16Studios@users.noreply.github.com>
PR Type
Enhancement, Tests
Description
OFFER
in theListingType
enum and updated related logic.CreateListingMutation
to uselistingData
instead ofauctionData
, supporting multiple listing types.ListingDataInputType
andOfferParamsInputType
to handle diverse listing data.offer_expiration
andcounter_offer_count
for offers.Changes walkthrough 📝
13 files
MarketplaceListingFactory.php
Update factory for new listing types and fields
database/factories/MarketplaceListingFactory.php
start_block
andend_block
toauction_start_block
andauction_end_block
.offer_expiration
andcounter_offer_count
.2024_10_11_143012_new_listing_type_to_marketplace_listings_table.php
Add migration for new listing types and fields
database/migrations/2024_10_11_143012_new_listing_type_to_marketplace_listings_table.php
offer_expiration
andcounter_offer_count
columns.ListingType.php
Add OFFER case to ListingType enum
src/Enums/ListingType.php
OFFER
to theListingType
enum.CreateListingMutation.php
Refactor CreateListingMutation for multiple listing types
src/GraphQL/Mutations/CreateListingMutation.php
auctionData
withlistingData
to support multiple listingtypes.
ListingDataInputType.php
Add ListingDataInputType for diverse listing inputs
src/GraphQL/Types/Input/ListingDataInputType.php
ListingDataInputType
for handling various listing datainputs.
type
,auctionParams
, andofferParams
.OfferParamsInputType.php
Introduce OfferParamsInputType for offer parameters
src/GraphQL/Types/Input/OfferParamsInputType.php
OfferParamsInputType
to handle offer-specific parameters.expiration
field for offers.OfferDataType.php
Add OfferDataType for GraphQL offer representation
src/GraphQL/Types/OfferDataType.php
OfferDataType
to represent offer data in GraphQL.type
andexpiration
.OfferStateType.php
Add OfferStateType for managing offer states
src/GraphQL/Types/OfferStateType.php
OfferStateType
for managing offer states in GraphQL.counterOfferCount
field.ListingDataUnion.php
Extend ListingDataUnion with OfferData
src/GraphQL/Unions/ListingDataUnion.php
OfferData
to theListingDataUnion
.ListingStateUnion.php
Extend ListingStateUnion with OfferState
src/GraphQL/Unions/ListingStateUnion.php
OfferState
to theListingStateUnion
.MarketplaceServiceProvider.php
Register migration for new listing types
src/MarketplaceServiceProvider.php
ListingDataParams.php
Add ListingDataParams for encapsulating listing data
src/Models/Substrate/ListingDataParams.php
ListingDataParams
to encapsulate listing data parameters.OfferDataParams.php
Add OfferDataParams for offer-specific data
src/Models/Substrate/OfferDataParams.php
OfferDataParams
for handling offer-specific data.2 files
CreateListingTest.php
Update CreateListing tests for new listing types
tests/Feature/GraphQL/Mutations/CreateListingTest.php
listingData
instead ofauctionData
.CreateListing.graphql
Update CreateListing mutation to use listingData
tests/Feature/GraphQL/Resources/CreateListing.graphql
auctionData
withlistingData
in the mutation.