-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: materials 앱 & accounts 앱 - 1:1 참조 모델 추가
- Loading branch information
1 parent
b5b4532
commit df3b6c8
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,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/'), | ||
), | ||
] |
48 changes: 48 additions & 0 deletions
48
materials/migrations/0003_image_image_image_user_alter_image_course_and_more.py
This file contains 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,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='해당 비디오')), | ||
], | ||
), | ||
] |