-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Item prices #1431
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
Open
anhthang
wants to merge
7
commits into
PokeAPI:master
Choose a base branch
from
anhthang:item-prices
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+202
−19
Open
Item prices #1431
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b15bc13
feat(data): add ItemPrice model and serializer for item pricing data
anhthang a9eab3f
add is_purchasable
anhthang b1ee9bc
feat(api): add ItemPrice resource and add item prices, remove item cost
anhthang 4423e08
remove cost from build, test and migration
anhthang 8a07eff
correct tm01, tm02
anhthang c2c17cf
fix: purchase_price and sell_price should be nullable
anhthang c7b9991
update openapi specs, fix Location.region and Region.main_generation …
anhthang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| item_id,version_group_id,is_purchasable,purchase_price,sell_price | ||
| 305,1,1,3000,1500 | ||
| 305,2,1,3000,1500 | ||
| 305,3,0,,1500 | ||
| 305,4,0,,1500 | ||
| 305,5,0,,1500 | ||
| 305,6,0,,1500 | ||
| 305,7,0,,1500 | ||
| 305,16,1,5000, | ||
| 305,20,1,40000, | ||
| 305,23,1,,1500 | ||
| 305,25,1,,400 | ||
| 305,28,1,3000,1500 | ||
| 305,29,1,3000,1500 | ||
| 306,1,1,2000,1000 | ||
| 306,2,1,2000,1000 | ||
| 306,3,1,2000,1000 | ||
| 306,4,1,2000,1000 | ||
| 306,5,0,,1500 | ||
| 306,6,0,,1500 | ||
| 306,7,0,,1500 | ||
| 306,8,0,,1500 | ||
| 306,9,0,,1500 | ||
| 306,10,0,,1500 | ||
| 306,12,0,,1500 | ||
| 306,13,0,,1500 | ||
| 306,23,1,,1500 | ||
| 306,25,1,,400 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
graphql/v1beta/metadata/databases/default/tables/public_pokemon_v2_itemprice.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| table: | ||
| name: pokemon_v2_itemprice | ||
| schema: public | ||
| object_relationships: | ||
| - name: pokemon_v2_item | ||
| using: | ||
| foreign_key_constraint_on: item_id | ||
| - name: pokemon_v2_versiongroup | ||
| using: | ||
| foreign_key_constraint_on: version_group_id | ||
| select_permissions: | ||
| - role: anon | ||
| permission: | ||
| columns: '*' | ||
| filter: {} | ||
| limit: 100000 | ||
| allow_aggregations: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
graphql/v1beta2/metadata/databases/default/tables/public_pokemon_v2_itemprice.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| table: | ||
| name: pokemon_v2_itemprice | ||
| schema: public | ||
| configuration: | ||
| column_config: {} | ||
| custom_column_names: {} | ||
| custom_name: itemprice | ||
| custom_root_fields: {} | ||
| object_relationships: | ||
| - name: item | ||
| using: | ||
| foreign_key_constraint_on: item_id | ||
| - name: versiongroup | ||
| using: | ||
| foreign_key_constraint_on: version_group_id | ||
| select_permissions: | ||
| - role: anon | ||
| permission: | ||
| columns: '*' | ||
| filter: {} | ||
| limit: 100000 | ||
| allow_aggregations: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Generated by Django 5.2.10 on 2026-03-07 00:00 | ||
|
|
||
| import django.db.models.deletion | ||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ("pokemon_v2", "0025_pokemonstatpast"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.CreateModel( | ||
| name="ItemPrice", | ||
| fields=[ | ||
| ( | ||
| "id", | ||
| models.AutoField( | ||
| auto_created=True, | ||
| primary_key=True, | ||
| serialize=False, | ||
| verbose_name="ID", | ||
| ), | ||
| ), | ||
| ("is_purchasable", models.BooleanField()), | ||
| ("purchase_price", models.IntegerField(blank=True, null=True)), | ||
| ("sell_price", models.IntegerField(blank=True, null=True)), | ||
| ( | ||
| "item", | ||
| models.ForeignKey( | ||
| blank=True, | ||
| null=True, | ||
| on_delete=django.db.models.deletion.CASCADE, | ||
| related_name="%(class)s", | ||
| to="pokemon_v2.item", | ||
| ), | ||
| ), | ||
| ( | ||
| "version_group", | ||
| models.ForeignKey( | ||
| blank=True, | ||
| null=True, | ||
| on_delete=django.db.models.deletion.CASCADE, | ||
| related_name="%(class)s", | ||
| to="pokemon_v2.versiongroup", | ||
| ), | ||
| ), | ||
| ], | ||
| options={ | ||
| "abstract": False, | ||
| }, | ||
| ), | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We shouldn't touch old migration files.