-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0003_promocomment.py
More file actions
60 lines (55 loc) · 1.79 KB
/
0003_promocomment.py
File metadata and controls
60 lines (55 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Generated by Django 5.2 on 2025-06-04 14:26
import django.db.models.deletion
import django.utils.timezone
import uuid
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("business", "0003_promo_like_count"),
("user", "0002_promolike"),
]
operations = [
migrations.CreateModel(
name="PromoComment",
fields=[
(
"id",
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
verbose_name="UUID",
),
),
("text", models.TextField(max_length=1000)),
(
"created_at",
models.DateTimeField(
default=django.utils.timezone.now, editable=False
),
),
("updated_at", models.DateTimeField(auto_now=True)),
(
"author",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="comments",
to=settings.AUTH_USER_MODEL,
),
),
(
"promo",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="comments",
to="business.promo",
),
),
],
options={
"ordering": ["-created_at"],
},
),
]