Skip to content

Commit bcf77cd

Browse files
authored
Merge pull request #26 from pythonkr/feature/fixed-at
feat: Sponsor 모델에 확정일시 필드 및 ordering 추가
2 parents a2fdc84 + 3aebd7d commit bcf77cd

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Generated by Django 5.2 on 2025-07-30 09:17
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("sponsor", "0013_sponsor_logo_en_sponsor_logo_ko"),
9+
]
10+
11+
operations = [
12+
migrations.AlterModelOptions(
13+
name="sponsor",
14+
options={"ordering": ["name", "fixed_at"]},
15+
),
16+
migrations.AddField(
17+
model_name="historicalsponsor",
18+
name="fixed_at",
19+
field=models.DateTimeField(blank=True, null=True),
20+
),
21+
migrations.AddField(
22+
model_name="sponsor",
23+
name="fixed_at",
24+
field=models.DateTimeField(blank=True, null=True),
25+
),
26+
]

app/event/sponsor/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ class Sponsor(BaseAbstractModel):
1616

1717
tiers = models.ManyToManyField(to="SponsorTier", through="SponsorTierSponsorRelation")
1818
tags = models.ManyToManyField(to="SponsorTag", through="SponsorTagRelation")
19+
fixed_at = models.DateTimeField(null=True, blank=True)
1920

2021
class Meta:
21-
ordering = ["name"]
22+
ordering = ["name", "fixed_at"]
2223
constraints = [
2324
models.UniqueConstraint(
2425
fields=["event", "name"],

0 commit comments

Comments
 (0)