-
Notifications
You must be signed in to change notification settings - Fork 11
후원사 구좌 및 혜택 관리 API 추가 #155
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
30c09b7
Feat: 후원 등급 관리를 위한 API 구현
jungmir 8e54abb
Feat: 후원 혜택 모델 추가
jungmir 7c00a0c
Feat: 후원 혜택 관리를 위한 API 구현
jungmir fa3ac91
refactor: get_serializer를 get_serializer_class로 변경
jungmir df60975
remove: 로컬 테스트용 설정 파일 제거
jungmir e9b08f7
refactor: get_serializer를 get_serializer_class로 변경
jungmir eeec32c
Feat: 등급 별 혜택 관리 API 구현
jungmir 812ba88
Merge branch 'devdev' into feature/sponsor
jungmir 2c34c87
Feat: 연도 필터 추가
jungmir 2f30a55
Fix: relation 테이블 query 오류 수정
jungmir 0f4719a
Fix: version 정보로 인해 중복 쿼리 되던 버그 수정
jungmir 45347c8
Fix: 후원사 목록 조회 시 등급 별로 조회 되도록 수정
jungmir 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,50 @@ | ||
| # Generated by Django 4.1.5 on 2024年07月28日 12:17 | ||
|
|
||
| from django.db import migrations, models | ||
| import django.db.models.deletion | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ("sponsor", "0005_patron"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.CreateModel( | ||
| name="SponsorBenefit", | ||
| fields=[ | ||
| ( | ||
| "id", | ||
| models.BigAutoField( | ||
| auto_created=True, | ||
| primary_key=True, | ||
| serialize=False, | ||
| verbose_name="ID", | ||
| ), | ||
| ), | ||
| ("name", models.CharField(help_text="혜택 이름", max_length=255)), | ||
| ("desc", models.TextField(blank=True, help_text="기타", null=True)), | ||
| ("offer", models.PositiveIntegerField(help_text="제공 하는 혜택 개수")), | ||
| ("unit", models.CharField(help_text="혜택 단위", max_length=10)), | ||
| ( | ||
| "is_countable", | ||
| models.BooleanField( | ||
| default=True, help_text="제공 하는 혜택이 셀 수 있는지 여부" | ||
| ), | ||
| ), | ||
| ( | ||
| "sponsor_level", | ||
| models.ForeignKey( | ||
| on_delete=django.db.models.deletion.CASCADE, | ||
| related_name="benefits", | ||
| to="sponsor.sponsorlevel", | ||
| ), | ||
| ), | ||
| ], | ||
| options={ | ||
| "verbose_name": "후원사 등급 별 혜택", | ||
| "verbose_name_plural": "후원사 등급 별 혜택 목록", | ||
| }, | ||
| ), | ||
| ] |
59 changes: 59 additions & 0 deletions
sponsor/migrations/0007_remove_sponsorbenefit_offer_and_more.py
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,59 @@ | ||
| # Generated by Django 4.1.5 on 2024年08月06日 12:41 | ||
|
|
||
| from django.db import migrations, models | ||
| import django.db.models.deletion | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ("sponsor", "0006_sponsorbenefit"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RemoveField( | ||
| model_name="sponsorbenefit", | ||
| name="offer", | ||
| ), | ||
| migrations.RemoveField( | ||
| model_name="sponsorbenefit", | ||
| name="sponsor_level", | ||
| ), | ||
| migrations.CreateModel( | ||
| name="BenefitByLevel", | ||
| fields=[ | ||
| ( | ||
| "id", | ||
| models.BigAutoField( | ||
| auto_created=True, | ||
| primary_key=True, | ||
| serialize=False, | ||
| verbose_name="ID", | ||
| ), | ||
| ), | ||
| ("offer", models.PositiveIntegerField(help_text="제공 하는 혜택 개수")), | ||
| ( | ||
| "benefit", | ||
| models.ForeignKey( | ||
| on_delete=django.db.models.deletion.CASCADE, | ||
| related_name="benefit_by_level", | ||
| to="sponsor.sponsorbenefit", | ||
| ), | ||
| ), | ||
| ( | ||
| "level", | ||
| models.ForeignKey( | ||
| on_delete=django.db.models.deletion.CASCADE, | ||
| related_name="benefit_by_level", | ||
| to="sponsor.sponsorlevel", | ||
| ), | ||
| ), | ||
| ], | ||
| ), | ||
| migrations.AddConstraint( | ||
| model_name="benefitbylevel", | ||
| constraint=models.UniqueConstraint( | ||
| fields=("benefit_id", "level_id"), name="IX_BENEFIT_BY_LEVEL_1" | ||
| ), | ||
| ), | ||
| ] |
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,13 @@ | ||
| # Generated by Django 4.1.5 on 2024年08月06日 13:06 | ||
|
|
||
| from django.db import migrations | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ("sponsor", "0006_sponsorlevel_year"), | ||
| ("sponsor", "0007_remove_sponsorbenefit_offer_and_more"), | ||
| ] | ||
|
|
||
| operations = [] |
27 changes: 27 additions & 0 deletions
sponsor/migrations/0009_sponsorbenefit_year_sponsorlevel_benefits.py
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,27 @@ | ||
| # Generated by Django 4.1.5 on 2024年08月06日 14:27 | ||
|
|
||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ("sponsor", "0008_merge_20240806_2206"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name="sponsorbenefit", | ||
| name="year", | ||
| field=models.IntegerField(default=2023), | ||
| ), | ||
| migrations.AddField( | ||
| model_name="sponsorlevel", | ||
| name="benefits", | ||
| field=models.ManyToManyField( | ||
| related_name="level", | ||
| through="sponsor.BenefitByLevel", | ||
| to="sponsor.sponsorbenefit", | ||
| ), | ||
| ), | ||
| ] |
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.