Skip to content

Commit

Permalink
refactor: materials 앱 & accounts 앱 - 1:1 참조 모델 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
devnproyj22 committed Oct 10, 2024
1 parent b5b4532 commit df3b6c8
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
18 changes: 18 additions & 0 deletions accounts/migrations/0005_customuser_profile_image.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.1.1 on 2024-10-10 06:29

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('accounts', '0004_remove_customuser_date_joined_and_more'),
]

operations = [
migrations.AddField(
model_name='customuser',
name='profile_image',
field=models.ImageField(blank=True, default='profile_images/default.jpg', upload_to='profile_images/'),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Generated by Django 5.1.1 on 2024-10-10 06:29

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('courses', '0007_alter_course_category'),
('materials', '0002_image_video_delete_blacklistedtoken'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.AddField(
model_name='image',
name='image',
field=models.ImageField(blank=True, null=True, upload_to='images/'),
),
migrations.AddField(
model_name='image',
name='user',
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='image', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='image',
name='course',
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='image', to='courses.course'),
),
migrations.AlterField(
model_name='video',
name='topic',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='video', to='courses.topic'),
),
migrations.CreateModel(
name='VideoEventData',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('event_type', models.CharField(choices=[('pause', 'Paused'), ('ended', 'Ended'), ('leave', 'Left Page')], max_length=20, verbose_name='이벤트 유형')),
('duration', models.FloatField(verbose_name='비디오 전체 길이')),
('current_time', models.FloatField(verbose_name='현재 재생 위치')),
('timestamp', models.DateTimeField(auto_now_add=True, verbose_name='이벤트 발생 시간')),
('video', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='video_event_datas', to='materials.video', verbose_name='해당 비디오')),
],
),
]

0 comments on commit df3b6c8

Please sign in to comment.