Skip to content

Commit

Permalink
리뷰 기능 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Gomnonix committed Aug 20, 2024
1 parent 5bc2066 commit c5051b1
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions customk/reviews/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Generated by Django 5.1 on 2024-08-20 06:24

import django.core.validators
import django.db.models.deletion
from decimal import Decimal
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
('classes', '0003_classdate_person'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.CreateModel(
name='Review',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('review', models.TextField()),
('rating', models.DecimalField(decimal_places=1, max_digits=2, validators=[django.core.validators.MinValueValidator(Decimal('0.5')), django.core.validators.MaxValueValidator(Decimal('5.0'))])),
('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='classes.class')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='ReviewImage',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('image_url', models.URLField(blank=True, null=True)),
('review', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='reviews.review')),
],
),
]

0 comments on commit c5051b1

Please sign in to comment.