diff --git a/custom_sessions/__init__.py b/custom_sessions/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/custom_sessions/admin.py b/custom_sessions/admin.py new file mode 100644 index 0000000000..8c38f3f3da --- /dev/null +++ b/custom_sessions/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/custom_sessions/apps.py b/custom_sessions/apps.py new file mode 100644 index 0000000000..8440816575 --- /dev/null +++ b/custom_sessions/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class CustomSessionsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'custom_sessions' diff --git a/custom_sessions/migrations/0001_initial.py b/custom_sessions/migrations/0001_initial.py new file mode 100644 index 0000000000..2c5c98c00b --- /dev/null +++ b/custom_sessions/migrations/0001_initial.py @@ -0,0 +1,59 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='CustomSession', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=2147483647)), + ('subtitle', models.CharField(blank=True, max_length=2147483647, null=True)), + ('short_abstract', models.TextField(blank=True, null=True)), + ('long_abstract', models.TextField(blank=True, null=True)), + ('comments', models.TextField(blank=True, null=True)), + ('starts_at', models.DateTimeField(blank=True, null=True)), + ('ends_at', models.DateTimeField(blank=True, null=True)), + ('language', models.CharField(blank=True, max_length=2147483647, null=True)), + ('slides_url', models.CharField(blank=True, max_length=2147483647, null=True)), + ('video_url', models.CharField(blank=True, max_length=2147483647, null=True)), + ('audio_url', models.CharField(blank=True, max_length=2147483647, null=True)), + ('signup_url', models.CharField(blank=True, max_length=2147483647, null=True)), + ('state', models.CharField(blank=True, db_index=True, max_length=2147483647, null=True)), + ('created_at', models.DateTimeField(blank=True, null=True)), + ('deleted_at', models.DateTimeField(blank=True, null=True)), + ('submitted_at', models.DateTimeField(blank=True, null=True)), + ('submission_modifier', models.CharField(blank=True, max_length=2147483647, null=True)), + ('is_mail_sent', models.BooleanField(blank=True, null=True)), + ('level', models.CharField(blank=True, max_length=2147483647, null=True)), + ('last_modified_at', models.DateTimeField(blank=True, null=True)), + ('send_email', models.BooleanField(blank=True, null=True)), + ('is_locked', models.BooleanField(default=False)), + ('complex_field_values', models.JSONField(blank=True, null=True)), + ('average_rating', models.FloatField(default=0)), + ('rating_count', models.IntegerField(default=0)), + ('facebook', models.CharField(blank=True, max_length=2147483647, null=True)), + ('github', models.CharField(blank=True, max_length=2147483647, null=True)), + ('gitlab', models.CharField(blank=True, max_length=2147483647, null=True)), + ('instagram', models.CharField(blank=True, max_length=2147483647, null=True)), + ('linkedin', models.CharField(blank=True, max_length=2147483647, null=True)), + ('twitter', models.CharField(blank=True, max_length=2147483647, null=True)), + ('website', models.CharField(blank=True, max_length=2147483647, null=True)), + ('favourite_count', models.IntegerField(default=0)), + ('mastodon', models.CharField(blank=True, max_length=2147483647, null=True)), + ('slides', models.JSONField(blank=True, null=True)), + ('creator', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/custom_sessions/migrations/0002_initial.py b/custom_sessions/migrations/0002_initial.py new file mode 100644 index 0000000000..7db35aed02 --- /dev/null +++ b/custom_sessions/migrations/0002_initial.py @@ -0,0 +1,22 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('custom_sessions', '0001_initial'), + ('events', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='customsession', + name='event', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='events.event'), + ), + ] diff --git a/custom_sessions/migrations/0003_initial.py b/custom_sessions/migrations/0003_initial.py new file mode 100644 index 0000000000..a366ba97d5 --- /dev/null +++ b/custom_sessions/migrations/0003_initial.py @@ -0,0 +1,34 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('custom_sessions', '0002_initial'), + ('microlocation', '0001_initial'), + ('session_types', '0001_initial'), + ('tracks', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='customsession', + name='microlocation', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='microlocation.microlocation'), + ), + migrations.AddField( + model_name='customsession', + name='session_type', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='session_types.sessiontype'), + ), + migrations.AddField( + model_name='customsession', + name='track', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='tracks.track'), + ), + ] diff --git a/custom_sessions/migrations/__init__.py b/custom_sessions/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/custom_sessions/models.py b/custom_sessions/models.py new file mode 100644 index 0000000000..5f7c72717e --- /dev/null +++ b/custom_sessions/models.py @@ -0,0 +1,48 @@ +from django.db import models +from events.models import Event +from microlocation.models import Microlocation +from session_types.models import SessionType +from tracks.models import Track +from users.models import CustomUser + +class CustomSession(models.Model): + title = models.CharField(max_length=2147483647) + subtitle = models.CharField(max_length=2147483647, null=True, blank=True) + short_abstract = models.TextField(null=True, blank=True) + long_abstract = models.TextField(null=True, blank=True) + comments = models.TextField(null=True, blank=True) + starts_at = models.DateTimeField(null=True, blank=True) + ends_at = models.DateTimeField(null=True, blank=True) + track = models.ForeignKey(Track, on_delete=models.CASCADE, null=True, blank=True) + language = models.CharField(max_length=2147483647, null=True, blank=True) + microlocation = models.ForeignKey(Microlocation, on_delete=models.CASCADE, null=True, blank=True) + session_type = models.ForeignKey(SessionType, on_delete=models.CASCADE, null=True, blank=True) + slides_url = models.CharField(max_length=2147483647, null=True, blank=True) + video_url = models.CharField(max_length=2147483647, null=True, blank=True) + audio_url = models.CharField(max_length=2147483647, null=True, blank=True) + signup_url = models.CharField(max_length=2147483647, null=True, blank=True) + event = models.ForeignKey(Event, on_delete=models.SET_NULL, null=True, blank=True, db_index=True) + state = models.CharField(max_length=2147483647, null=True, blank=True, db_index=True) + created_at = models.DateTimeField(null=True, blank=True) + deleted_at = models.DateTimeField(null=True, blank=True) + submitted_at = models.DateTimeField(null=True, blank=True) + submission_modifier = models.CharField(max_length=2147483647, null=True, blank=True) + is_mail_sent = models.BooleanField(null=True, blank=True) + level = models.CharField(max_length=2147483647, null=True, blank=True) + creator = models.ForeignKey(CustomUser, on_delete=models.CASCADE, null=True, blank=True) + last_modified_at = models.DateTimeField(null=True, blank=True) + send_email = models.BooleanField(null=True, blank=True) + is_locked = models.BooleanField(default=False) + complex_field_values = models.JSONField(null=True, blank=True) + average_rating = models.FloatField(default=0) + rating_count = models.IntegerField(default=0) + facebook = models.CharField(max_length=2147483647, null=True, blank=True) + github = models.CharField(max_length=2147483647, null=True, blank=True) + gitlab = models.CharField(max_length=2147483647, null=True, blank=True) + instagram = models.CharField(max_length=2147483647, null=True, blank=True) + linkedin = models.CharField(max_length=2147483647, null=True, blank=True) + twitter = models.CharField(max_length=2147483647, null=True, blank=True) + website = models.CharField(max_length=2147483647, null=True, blank=True) + favourite_count = models.IntegerField(default=0) + mastodon = models.CharField(max_length=2147483647, null=True, blank=True) + slides = models.JSONField(null=True, blank=True) \ No newline at end of file diff --git a/custom_sessions/tests.py b/custom_sessions/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/custom_sessions/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/custom_sessions/views.py b/custom_sessions/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/custom_sessions/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/discount_codes/__init__.py b/discount_codes/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/discount_codes/admin.py b/discount_codes/admin.py new file mode 100644 index 0000000000..8c38f3f3da --- /dev/null +++ b/discount_codes/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/discount_codes/apps.py b/discount_codes/apps.py new file mode 100644 index 0000000000..869efbb44c --- /dev/null +++ b/discount_codes/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class DiscountCodesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'discount_codes' diff --git a/discount_codes/migrations/0001_initial.py b/discount_codes/migrations/0001_initial.py new file mode 100644 index 0000000000..77bb558ddb --- /dev/null +++ b/discount_codes/migrations/0001_initial.py @@ -0,0 +1,33 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='DiscountCode', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('code', models.CharField(max_length=2147483647)), + ('value', models.FloatField()), + ('type', models.CharField(max_length=2147483647)), + ('is_active', models.BooleanField(blank=True, null=True)), + ('tickets_number', models.IntegerField(blank=True, null=True)), + ('min_quantity', models.IntegerField(blank=True, null=True)), + ('max_quantity', models.IntegerField(blank=True, null=True)), + ('valid_from', models.DateTimeField(blank=True, null=True)), + ('valid_till', models.DateTimeField(blank=True, null=True)), + ('created_at', models.DateTimeField(blank=True, null=True)), + ('used_for', models.CharField(max_length=2147483647)), + ('discount_url', models.CharField(blank=True, max_length=2147483647, null=True)), + ('deleted_at', models.DateTimeField(blank=True, null=True)), + ], + ), + ] diff --git a/discount_codes/migrations/0002_initial.py b/discount_codes/migrations/0002_initial.py new file mode 100644 index 0000000000..110465ae4b --- /dev/null +++ b/discount_codes/migrations/0002_initial.py @@ -0,0 +1,33 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('discount_codes', '0001_initial'), + ('events', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.AddField( + model_name='discountcode', + name='event', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='discount_codes', to='events.event'), + ), + migrations.AddField( + model_name='discountcode', + name='marketer', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterUniqueTogether( + name='discountcode', + unique_together={('event', 'code', 'deleted_at')}, + ), + ] diff --git a/discount_codes/migrations/__init__.py b/discount_codes/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/discount_codes/models.py b/discount_codes/models.py new file mode 100644 index 0000000000..ffd6a66112 --- /dev/null +++ b/discount_codes/models.py @@ -0,0 +1,22 @@ +from django.db import models +from users.models import CustomUser + +class DiscountCode(models.Model): + code = models.CharField(max_length=2147483647) + value = models.FloatField() + type = models.CharField(max_length=2147483647) + is_active = models.BooleanField(null=True, blank=True) + tickets_number = models.IntegerField(null=True, blank=True) + min_quantity = models.IntegerField(null=True, blank=True) + max_quantity = models.IntegerField(null=True, blank=True) + valid_from = models.DateTimeField(null=True, blank=True) + valid_till = models.DateTimeField(null=True, blank=True) + event = models.ForeignKey('events.Event', on_delete=models.CASCADE, null=True, blank=True, related_name='discount_codes') + created_at = models.DateTimeField(null=True, blank=True) + marketer = models.ForeignKey(CustomUser, on_delete=models.CASCADE, null=True, blank=True) + used_for = models.CharField(max_length=2147483647) + discount_url = models.CharField(max_length=2147483647, null=True, blank=True) + deleted_at = models.DateTimeField(null=True, blank=True) + + class Meta: + unique_together = (('event', 'code', 'deleted_at'),) \ No newline at end of file diff --git a/discount_codes/tests.py b/discount_codes/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/discount_codes/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/discount_codes/views.py b/discount_codes/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/discount_codes/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/event_sub_topics/__init__.py b/event_sub_topics/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/event_sub_topics/admin.py b/event_sub_topics/admin.py new file mode 100644 index 0000000000..8c38f3f3da --- /dev/null +++ b/event_sub_topics/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/event_sub_topics/apps.py b/event_sub_topics/apps.py new file mode 100644 index 0000000000..e0139a55fd --- /dev/null +++ b/event_sub_topics/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class EventSubTopicsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'event_sub_topics' diff --git a/event_sub_topics/migrations/0001_initial.py b/event_sub_topics/migrations/0001_initial.py new file mode 100644 index 0000000000..31ed03acf4 --- /dev/null +++ b/event_sub_topics/migrations/0001_initial.py @@ -0,0 +1,28 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('event_topics', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='EventSubTopic', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(blank=True, max_length=2147483647, null=True)), + ('slug', models.CharField(blank=True, max_length=2147483647, null=True)), + ('event_topic', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='event_topics.eventtopic')), + ], + options={ + 'unique_together': {('slug', 'event_topic')}, + }, + ), + ] diff --git a/event_sub_topics/migrations/__init__.py b/event_sub_topics/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/event_sub_topics/models.py b/event_sub_topics/models.py new file mode 100644 index 0000000000..db1b91f445 --- /dev/null +++ b/event_sub_topics/models.py @@ -0,0 +1,10 @@ +from django.db import models +from event_topics.models import EventTopic + +class EventSubTopic(models.Model): + name = models.CharField(max_length=2147483647, null=True, blank=True) + slug = models.CharField(max_length=2147483647, null=True, blank=True) + event_topic = models.ForeignKey(EventTopic, on_delete=models.CASCADE, null=True, blank=True) + + class Meta: + unique_together = (('slug', 'event_topic'),) \ No newline at end of file diff --git a/event_sub_topics/tests.py b/event_sub_topics/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/event_sub_topics/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/event_sub_topics/views.py b/event_sub_topics/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/event_sub_topics/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/event_types/__init__.py b/event_types/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/event_types/admin.py b/event_types/admin.py new file mode 100644 index 0000000000..8c38f3f3da --- /dev/null +++ b/event_types/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/event_types/apps.py b/event_types/apps.py new file mode 100644 index 0000000000..b52eea0219 --- /dev/null +++ b/event_types/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class EventTypesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'event_types' diff --git a/event_types/migrations/0001_initial.py b/event_types/migrations/0001_initial.py new file mode 100644 index 0000000000..49d7661c6f --- /dev/null +++ b/event_types/migrations/0001_initial.py @@ -0,0 +1,23 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='EventType', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=2147483647)), + ('slug', models.CharField(db_index=True, max_length=2147483647, unique=True)), + ('deleted_at', models.DateTimeField(blank=True, null=True)), + ], + ), + ] diff --git a/event_types/migrations/__init__.py b/event_types/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/event_types/models.py b/event_types/models.py new file mode 100644 index 0000000000..8d63a3254a --- /dev/null +++ b/event_types/models.py @@ -0,0 +1,7 @@ +from django.db import models + + +class EventType(models.Model): + name = models.CharField(max_length=2147483647) + slug = models.CharField(max_length=2147483647, db_index=True, unique=True) + deleted_at = models.DateTimeField(null=True, blank=True) \ No newline at end of file diff --git a/event_types/tests.py b/event_types/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/event_types/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/event_types/views.py b/event_types/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/event_types/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/events/__init__.py b/events/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/events/admin.py b/events/admin.py new file mode 100644 index 0000000000..8c38f3f3da --- /dev/null +++ b/events/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/events/apps.py b/events/apps.py new file mode 100644 index 0000000000..20f48f26be --- /dev/null +++ b/events/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class EventsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'events' diff --git a/events/migrations/0001_initial.py b/events/migrations/0001_initial.py new file mode 100644 index 0000000000..394e1f64e8 --- /dev/null +++ b/events/migrations/0001_initial.py @@ -0,0 +1,110 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('discount_codes', '0001_initial'), + ('event_sub_topics', '0001_initial'), + ('event_topics', '0001_initial'), + ('event_types', '0001_initial'), + ('groups', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Event', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('identifier', models.CharField(max_length=2147483647, null=True, unique=True)), + ('name', models.CharField(max_length=2147483647, null=True)), + ('external_event_url', models.CharField(max_length=2147483647, null=True)), + ('logo_url', models.CharField(max_length=2147483647, null=True)), + ('starts_at', models.DateTimeField(null=True)), + ('ends_at', models.DateTimeField(null=True)), + ('timezone', models.CharField(max_length=2147483647, null=True)), + ('latitude', models.FloatField(null=True)), + ('longitude', models.FloatField(null=True)), + ('location_name', models.CharField(max_length=2147483647, null=True)), + ('searchable_location_name', models.CharField(max_length=2147483647, null=True)), + ('description', models.TextField(null=True)), + ('original_image_url', models.CharField(max_length=2147483647, null=True)), + ('thumbnail_image_url', models.CharField(max_length=2147483647, null=True)), + ('large_image_url', models.CharField(max_length=2147483647, null=True)), + ('icon_image_url', models.CharField(max_length=2147483647, null=True)), + ('owner_name', models.CharField(max_length=2147483647, null=True)), + ('is_map_shown', models.BooleanField(default=True)), + ('owner_description', models.CharField(max_length=2147483647, null=True)), + ('is_sessions_speakers_enabled', models.BooleanField(default=True)), + ('privacy', models.CharField(max_length=2147483647, null=True)), + ('state', models.CharField(max_length=2147483647, null=True)), + ('ticket_url', models.CharField(max_length=2147483647, null=True)), + ('code_of_conduct', models.CharField(max_length=2147483647, null=True)), + ('schedule_published_on', models.DateTimeField(null=True)), + ('is_ticketing_enabled', models.BooleanField(default=True)), + ('deleted_at', models.DateTimeField(null=True)), + ('payment_country', models.CharField(max_length=2147483647, null=True)), + ('payment_currency', models.CharField(max_length=2147483647, null=True)), + ('paypal_email', models.CharField(max_length=2147483647, null=True)), + ('is_tax_enabled', models.BooleanField(default=True)), + ('can_pay_by_paypal', models.BooleanField(default=False)), + ('can_pay_by_stripe', models.BooleanField(default=False)), + ('can_pay_by_cheque', models.BooleanField(default=False)), + ('can_pay_by_bank', models.BooleanField(default=False)), + ('can_pay_onsite', models.BooleanField(default=False)), + ('cheque_details', models.CharField(max_length=2147483647, null=True)), + ('bank_details', models.CharField(max_length=2147483647, null=True)), + ('onsite_details', models.CharField(max_length=2147483647, null=True)), + ('created_at', models.DateTimeField(null=True)), + ('is_sponsors_enabled', models.BooleanField(default=False)), + ('ical_url', models.CharField(max_length=2147483647, null=True)), + ('pentabarf_url', models.CharField(max_length=2147483647, null=True)), + ('xcal_url', models.CharField(max_length=2147483647, null=True)), + ('has_owner_info', models.BooleanField(default=True)), + ('refund_policy', models.CharField(max_length=2147483647, null=True)), + ('is_stripe_linked', models.BooleanField(default=True)), + ('online', models.BooleanField(default=False)), + ('is_donation_enabled', models.BooleanField(default=True)), + ('is_featured', models.BooleanField(default=False)), + ('can_pay_by_omise', models.BooleanField(default=False)), + ('is_ticket_form_enabled', models.BooleanField(default=True)), + ('can_pay_by_alipay', models.BooleanField(default=False)), + ('show_remaining_tickets', models.BooleanField(default=False)), + ('is_billing_info_mandatory', models.BooleanField(default=False)), + ('can_pay_by_paytm', models.BooleanField(default=False)), + ('is_promoted', models.BooleanField(default=False)), + ('is_demoted', models.BooleanField(default=False)), + ('after_order_message', models.TextField(null=True)), + ('is_chat_enabled', models.BooleanField(default=False)), + ('chat_room_id', models.CharField(max_length=2147483647, null=True)), + ('document_links', models.JSONField(null=True)), + ('is_document_enabled', models.BooleanField(default=False)), + ('is_videoroom_enabled', models.BooleanField(default=False)), + ('is_oneclick_signup_enabled', models.BooleanField(default=True)), + ('is_cfs_enabled', models.BooleanField(default=False)), + ('is_announced', models.BooleanField(default=False)), + ('completed_order_sales', models.IntegerField(null=True)), + ('placed_order_sales', models.IntegerField(null=True)), + ('pending_order_sales', models.IntegerField(null=True)), + ('completed_order_tickets', models.IntegerField(null=True)), + ('placed_order_tickets', models.IntegerField(null=True)), + ('pending_order_tickets', models.IntegerField(null=True)), + ('can_pay_by_invoice', models.BooleanField(default=False)), + ('invoice_details', models.CharField(max_length=2147483647, null=True)), + ('public_stream_link', models.CharField(max_length=2147483647, null=True)), + ('stream_loop', models.BooleanField(default=True)), + ('stream_autoplay', models.BooleanField(default=True)), + ('is_badges_enabled', models.BooleanField(default=True)), + ('discount_code', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='events', to='discount_codes.discountcode')), + ('event_sub_topic', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='event_sub_topics.eventsubtopic')), + ('event_topic', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='event_topics.eventtopic')), + ('event_type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='event_types.eventtype')), + ('group', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='groups.group')), + ], + ), + ] diff --git a/events/migrations/__init__.py b/events/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/events/models.py b/events/models.py new file mode 100644 index 0000000000..8e163de8c9 --- /dev/null +++ b/events/models.py @@ -0,0 +1,92 @@ +from django.db import models +from event_sub_topics.models import EventSubTopic +from event_topics.models import EventTopic + +from event_types.models import EventType +from groups.models import Group + +class Event(models.Model): + identifier = models.CharField(max_length=2147483647, null=True, unique=True) + name = models.CharField(max_length=2147483647, null=True) + external_event_url = models.CharField(max_length=2147483647, null=True) + logo_url = models.CharField(max_length=2147483647, null=True) + starts_at = models.DateTimeField(null=True) + ends_at = models.DateTimeField(null=True) + timezone = models.CharField(max_length=2147483647, null=True) + latitude = models.FloatField(null=True) + longitude = models.FloatField(null=True) + location_name = models.CharField(max_length=2147483647, null=True) + searchable_location_name = models.CharField(max_length=2147483647, null=True) + description = models.TextField(null=True) + original_image_url = models.CharField(max_length=2147483647, null=True) + thumbnail_image_url = models.CharField(max_length=2147483647, null=True) + large_image_url = models.CharField(max_length=2147483647, null=True) + icon_image_url = models.CharField(max_length=2147483647, null=True) + owner_name = models.CharField(max_length=2147483647, null=True) + is_map_shown = models.BooleanField(default=True) + owner_description = models.CharField(max_length=2147483647, null=True) + is_sessions_speakers_enabled = models.BooleanField(default=True) + privacy = models.CharField(max_length=2147483647, null=True) + state = models.CharField(max_length=2147483647, null=True) + event_type = models.ForeignKey(EventType, on_delete=models.CASCADE, null=True) + event_topic = models.ForeignKey(EventTopic, on_delete=models.CASCADE, null=True) + event_sub_topic = models.ForeignKey(EventSubTopic, on_delete=models.CASCADE, null=True) + ticket_url = models.CharField(max_length=2147483647, null=True) + code_of_conduct = models.CharField(max_length=2147483647, null=True) + schedule_published_on = models.DateTimeField(null=True) + is_ticketing_enabled = models.BooleanField(default=True) + deleted_at = models.DateTimeField(null=True) + payment_country = models.CharField(max_length=2147483647, null=True) + payment_currency = models.CharField(max_length=2147483647, null=True) + paypal_email = models.CharField(max_length=2147483647, null=True) + is_tax_enabled = models.BooleanField(default=True) + can_pay_by_paypal = models.BooleanField(default=False) + can_pay_by_stripe = models.BooleanField(default=False) + can_pay_by_cheque = models.BooleanField(default=False) + can_pay_by_bank = models.BooleanField(default=False) + can_pay_onsite = models.BooleanField(default=False) + cheque_details = models.CharField(max_length=2147483647, null=True) + bank_details = models.CharField(max_length=2147483647, null=True) + onsite_details = models.CharField(max_length=2147483647, null=True) + created_at = models.DateTimeField(null=True) + is_sponsors_enabled = models.BooleanField(default=False) + ical_url = models.CharField(max_length=2147483647, null=True) + pentabarf_url = models.CharField(max_length=2147483647, null=True) + xcal_url = models.CharField(max_length=2147483647, null=True) + has_owner_info = models.BooleanField(default=True) + discount_code = models.ForeignKey('discount_codes.DiscountCode', on_delete=models.CASCADE, null=True, related_name='events') + refund_policy = models.CharField(max_length=2147483647, null=True) + is_stripe_linked = models.BooleanField(default=True) + online = models.BooleanField(default=False) + is_donation_enabled = models.BooleanField(default=True) + is_featured = models.BooleanField(default=False) + can_pay_by_omise = models.BooleanField(default=False) + is_ticket_form_enabled = models.BooleanField(default=True) + can_pay_by_alipay = models.BooleanField(default=False) + show_remaining_tickets = models.BooleanField(default=False) + is_billing_info_mandatory = models.BooleanField(default=False) + can_pay_by_paytm = models.BooleanField(default=False) + is_promoted = models.BooleanField(default=False) + is_demoted = models.BooleanField(default=False) + group = models.ForeignKey(Group, on_delete=models.SET_NULL, null=True) + after_order_message = models.TextField(null=True) + is_chat_enabled = models.BooleanField(default=False) + chat_room_id = models.CharField(max_length=2147483647, null=True) + document_links = models.JSONField(null=True) + is_document_enabled = models.BooleanField(default=False) + is_videoroom_enabled = models.BooleanField(default=False) + is_oneclick_signup_enabled = models.BooleanField(default=True) + is_cfs_enabled = models.BooleanField(default=False) + is_announced = models.BooleanField(default=False) + completed_order_sales = models.IntegerField(null=True) + placed_order_sales = models.IntegerField(null=True) + pending_order_sales = models.IntegerField(null=True) + completed_order_tickets = models.IntegerField(null=True) + placed_order_tickets = models.IntegerField(null=True) + pending_order_tickets = models.IntegerField(null=True) + can_pay_by_invoice = models.BooleanField(default=False) + invoice_details = models.CharField(max_length=2147483647, null=True) + public_stream_link = models.CharField(max_length=2147483647, null=True) + stream_loop = models.BooleanField(default=True) + stream_autoplay = models.BooleanField(default=True) + is_badges_enabled = models.BooleanField(default=True) diff --git a/events/tests.py b/events/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/events/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/events/views.py b/events/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/events/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/groups/__init__.py b/groups/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/groups/admin.py b/groups/admin.py new file mode 100644 index 0000000000..8c38f3f3da --- /dev/null +++ b/groups/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/groups/apps.py b/groups/apps.py new file mode 100644 index 0000000000..86b49bc693 --- /dev/null +++ b/groups/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class GroupsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'groups' diff --git a/groups/migrations/0001_initial.py b/groups/migrations/0001_initial.py new file mode 100644 index 0000000000..7a2048d258 --- /dev/null +++ b/groups/migrations/0001_initial.py @@ -0,0 +1,35 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Group', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=2147483647)), + ('created_at', models.DateTimeField(blank=True, null=True)), + ('modified_at', models.DateTimeField(blank=True, null=True)), + ('social_links', models.JSONField(blank=True, null=True)), + ('about', models.TextField(blank=True, null=True)), + ('banner_url', models.CharField(blank=True, max_length=2147483647, null=True)), + ('logo_url', models.CharField(blank=True, max_length=2147483647, null=True)), + ('follower_count', models.IntegerField(default=0)), + ('thumbnail_image_url', models.CharField(blank=True, max_length=2147483647, null=True)), + ('is_promoted', models.BooleanField(default=False)), + ('deleted_at', models.DateTimeField(blank=True, null=True)), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/groups/migrations/__init__.py b/groups/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/groups/models.py b/groups/models.py new file mode 100644 index 0000000000..80b1c3ffb8 --- /dev/null +++ b/groups/models.py @@ -0,0 +1,16 @@ +from django.db import models +from users.models import CustomUser + +class Group(models.Model): + name = models.CharField(max_length=2147483647) + user = models.ForeignKey(CustomUser, on_delete=models.CASCADE) + created_at = models.DateTimeField(null=True, blank=True) + modified_at = models.DateTimeField(null=True, blank=True) + social_links = models.JSONField(blank=True, null=True) + about = models.TextField(null=True, blank=True) + banner_url = models.CharField(max_length=2147483647, null=True, blank=True) + logo_url = models.CharField(max_length=2147483647, null=True, blank=True) + follower_count = models.IntegerField(default=0) + thumbnail_image_url = models.CharField(max_length=2147483647, null=True, blank=True) + is_promoted = models.BooleanField(default=False) + deleted_at = models.DateTimeField(null=True, blank=True) \ No newline at end of file diff --git a/groups/tests.py b/groups/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/groups/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/groups/views.py b/groups/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/groups/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/microlocation/__init__.py b/microlocation/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/microlocation/admin.py b/microlocation/admin.py new file mode 100644 index 0000000000..8c38f3f3da --- /dev/null +++ b/microlocation/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/microlocation/apps.py b/microlocation/apps.py new file mode 100644 index 0000000000..46e0515aeb --- /dev/null +++ b/microlocation/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class MicrolocationConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'microlocation' diff --git a/microlocation/migrations/0001_initial.py b/microlocation/migrations/0001_initial.py new file mode 100644 index 0000000000..f403f9d8d6 --- /dev/null +++ b/microlocation/migrations/0001_initial.py @@ -0,0 +1,34 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('events', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Microlocation', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=2147483647)), + ('latitude', models.FloatField(blank=True, null=True)), + ('longitude', models.FloatField(blank=True, null=True)), + ('floor', models.IntegerField(blank=True, null=True)), + ('room', models.CharField(blank=True, max_length=2147483647, null=True)), + ('deleted_at', models.DateTimeField(blank=True, null=True)), + ('position', models.IntegerField(default=0)), + ('hidden_in_scheduler', models.BooleanField(default=False)), + ('is_chat_enabled', models.BooleanField(blank=True, null=True)), + ('is_global_event_room', models.BooleanField(blank=True, null=True)), + ('chat_room_id', models.CharField(blank=True, max_length=2147483647, null=True)), + ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.event')), + ], + ), + ] diff --git a/microlocation/migrations/0002_initial.py b/microlocation/migrations/0002_initial.py new file mode 100644 index 0000000000..bd519cc6b6 --- /dev/null +++ b/microlocation/migrations/0002_initial.py @@ -0,0 +1,22 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('microlocation', '0001_initial'), + ('video_streams', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='microlocation', + name='video_stream', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='video_streams.videostream'), + ), + ] diff --git a/microlocation/migrations/__init__.py b/microlocation/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/microlocation/models.py b/microlocation/models.py new file mode 100644 index 0000000000..49a5447f6b --- /dev/null +++ b/microlocation/models.py @@ -0,0 +1,18 @@ +from django.db import models +from events.models import Event +from video_streams.models import VideoStream + +class Microlocation(models.Model): + name = models.CharField(max_length=2147483647) + latitude = models.FloatField(null=True, blank=True) + longitude = models.FloatField(null=True, blank=True) + floor = models.IntegerField(null=True, blank=True) + room = models.CharField(max_length=2147483647, null=True, blank=True) + event = models.ForeignKey(Event, on_delete=models.CASCADE, null=True, blank=True) + deleted_at = models.DateTimeField(null=True, blank=True) + video_stream = models.ForeignKey(VideoStream, on_delete=models.CASCADE, null=True, blank=True) + position = models.IntegerField(default=0) + hidden_in_scheduler = models.BooleanField(default=False) + is_chat_enabled = models.BooleanField(null=True, blank=True) + is_global_event_room = models.BooleanField(null=True, blank=True) + chat_room_id = models.CharField(max_length=2147483647, null=True, blank=True) \ No newline at end of file diff --git a/microlocation/tests.py b/microlocation/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/microlocation/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/microlocation/views.py b/microlocation/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/microlocation/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/open_event_api/settings.py b/open_event_api/settings.py index c164044073..b8dc9d3c63 100644 --- a/open_event_api/settings.py +++ b/open_event_api/settings.py @@ -54,6 +54,17 @@ "event_topics.apps.EventTopicsConfig", "notification_contents.apps.NotificationContentsConfig", "video_channels.apps.VideoChannelsConfig", + "discount_codes.apps.DiscountCodesConfig", + "event_sub_topics.apps.EventSubTopicsConfig", + "event_types.apps.EventTypesConfig", + "events.apps.EventsConfig", + "groups.apps.GroupsConfig", + "microlocation.apps.MicrolocationConfig", + "session_types.apps.SessionTypesConfig", + "custom_sessions.apps.CustomSessionsConfig", + "tickets.apps.TicketsConfig", + "tracks.apps.TracksConfig", + "video_streams.apps.VideoStreamsConfig", ] MIDDLEWARE = [ diff --git a/session_types/__init__.py b/session_types/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/session_types/admin.py b/session_types/admin.py new file mode 100644 index 0000000000..8c38f3f3da --- /dev/null +++ b/session_types/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/session_types/apps.py b/session_types/apps.py new file mode 100644 index 0000000000..967748fd78 --- /dev/null +++ b/session_types/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class SessionTypesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'session_types' diff --git a/session_types/migrations/0001_initial.py b/session_types/migrations/0001_initial.py new file mode 100644 index 0000000000..caaf18881a --- /dev/null +++ b/session_types/migrations/0001_initial.py @@ -0,0 +1,27 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('events', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='SessionType', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=2147483647)), + ('length', models.CharField(max_length=2147483647)), + ('deleted_at', models.DateTimeField(blank=True, null=True)), + ('position', models.IntegerField(blank=True, null=True)), + ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.event')), + ], + ), + ] diff --git a/session_types/migrations/__init__.py b/session_types/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/session_types/models.py b/session_types/models.py new file mode 100644 index 0000000000..abd8015423 --- /dev/null +++ b/session_types/models.py @@ -0,0 +1,9 @@ +from django.db import models +from events.models import Event + +class SessionType(models.Model): + name = models.CharField(max_length=2147483647) + length = models.CharField(max_length=2147483647) + event = models.ForeignKey(Event, on_delete=models.CASCADE, null=True, blank=True) + deleted_at = models.DateTimeField(null=True, blank=True) + position = models.IntegerField(null=True, blank=True) \ No newline at end of file diff --git a/session_types/tests.py b/session_types/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/session_types/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/session_types/views.py b/session_types/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/session_types/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/tickets/__init__.py b/tickets/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tickets/admin.py b/tickets/admin.py new file mode 100644 index 0000000000..8c38f3f3da --- /dev/null +++ b/tickets/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/tickets/apps.py b/tickets/apps.py new file mode 100644 index 0000000000..45a7d76d9d --- /dev/null +++ b/tickets/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class TicketsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'tickets' diff --git a/tickets/migrations/0001_initial.py b/tickets/migrations/0001_initial.py new file mode 100644 index 0000000000..df42b1dbde --- /dev/null +++ b/tickets/migrations/0001_initial.py @@ -0,0 +1,46 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('events', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Ticket', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=2147483647)), + ('description', models.TextField(blank=True, null=True)), + ('is_description_visible', models.BooleanField(blank=True, null=True)), + ('type', models.CharField(max_length=2147483647)), + ('quantity', models.IntegerField(blank=True, null=True)), + ('price', models.FloatField(blank=True, null=True)), + ('sales_starts_at', models.DateTimeField(blank=True, null=True)), + ('sales_ends_at', models.DateTimeField(blank=True, null=True)), + ('is_hidden', models.BooleanField(blank=True, null=True)), + ('min_order', models.IntegerField(blank=True, null=True)), + ('max_order', models.IntegerField(blank=True, null=True)), + ('is_fee_absorbed', models.BooleanField(blank=True, null=True)), + ('position', models.IntegerField(blank=True, null=True)), + ('deleted_at', models.DateTimeField(blank=True, null=True)), + ('auto_checkin_enabled', models.BooleanField(blank=True, null=True)), + ('is_checkin_restricted', models.BooleanField(blank=True, null=True)), + ('max_price', models.FloatField(blank=True, null=True)), + ('min_price', models.FloatField(default=0)), + ('form_id', models.CharField(blank=True, max_length=2147483647, null=True)), + ('badge_id', models.CharField(blank=True, max_length=2147483647, null=True)), + ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.event')), + ], + options={ + 'unique_together': {('name', 'event', 'deleted_at')}, + }, + ), + ] diff --git a/tickets/migrations/__init__.py b/tickets/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tickets/models.py b/tickets/models.py new file mode 100644 index 0000000000..46f724d5ef --- /dev/null +++ b/tickets/models.py @@ -0,0 +1,29 @@ +from django.db import models + +from events.models import Event + +class Ticket(models.Model): + name = models.CharField(max_length=2147483647) + description = models.TextField(null=True, blank=True) + is_description_visible = models.BooleanField(null=True, blank=True) + type = models.CharField(max_length=2147483647) + quantity = models.IntegerField(null=True, blank=True) + price = models.FloatField(null=True, blank=True) + sales_starts_at = models.DateTimeField(null=True, blank=True) + sales_ends_at = models.DateTimeField(null=True, blank=True) + is_hidden = models.BooleanField(null=True, blank=True) + min_order = models.IntegerField(null=True, blank=True) + max_order = models.IntegerField(null=True, blank=True) + event = models.ForeignKey(Event, on_delete=models.CASCADE, null=True, blank=True) + is_fee_absorbed = models.BooleanField(null=True, blank=True) + position = models.IntegerField(null=True, blank=True) + deleted_at = models.DateTimeField(null=True, blank=True) + auto_checkin_enabled = models.BooleanField(null=True, blank=True) + is_checkin_restricted = models.BooleanField(null=True, blank=True) + max_price = models.FloatField(null=True, blank=True) + min_price = models.FloatField(default=0) + form_id = models.CharField(max_length=2147483647, null=True, blank=True) + badge_id = models.CharField(max_length=2147483647, null=True, blank=True) + + class Meta: + unique_together = ('name', 'event', 'deleted_at') \ No newline at end of file diff --git a/tickets/tests.py b/tickets/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/tickets/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/tickets/views.py b/tickets/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/tickets/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/tracks/__init__.py b/tracks/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tracks/admin.py b/tracks/admin.py new file mode 100644 index 0000000000..8c38f3f3da --- /dev/null +++ b/tracks/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/tracks/apps.py b/tracks/apps.py new file mode 100644 index 0000000000..9bd37657af --- /dev/null +++ b/tracks/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class TracksConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'tracks' diff --git a/tracks/migrations/0001_initial.py b/tracks/migrations/0001_initial.py new file mode 100644 index 0000000000..254da74914 --- /dev/null +++ b/tracks/migrations/0001_initial.py @@ -0,0 +1,28 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('events', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Track', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=2147483647)), + ('description', models.TextField(blank=True, null=True)), + ('color', models.CharField(max_length=2147483647)), + ('deleted_at', models.DateTimeField(blank=True, null=True)), + ('position', models.IntegerField(blank=True, null=True)), + ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.event')), + ], + ), + ] diff --git a/tracks/migrations/__init__.py b/tracks/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tracks/models.py b/tracks/models.py new file mode 100644 index 0000000000..0a16a461dc --- /dev/null +++ b/tracks/models.py @@ -0,0 +1,10 @@ +from django.db import models +from events.models import Event + +class Track(models.Model): + name = models.CharField(max_length=2147483647) + description = models.TextField(null=True, blank=True) + color = models.CharField(max_length=2147483647) + event = models.ForeignKey(Event, on_delete=models.CASCADE, null=True, blank=True) + deleted_at = models.DateTimeField(null=True, blank=True) + position = models.IntegerField(null=True, blank=True) \ No newline at end of file diff --git a/tracks/tests.py b/tracks/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/tracks/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/tracks/views.py b/tracks/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/tracks/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/video_streams/__init__.py b/video_streams/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/video_streams/admin.py b/video_streams/admin.py new file mode 100644 index 0000000000..8c38f3f3da --- /dev/null +++ b/video_streams/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/video_streams/apps.py b/video_streams/apps.py new file mode 100644 index 0000000000..743cf18579 --- /dev/null +++ b/video_streams/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class VideoStreamsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'video_streams' diff --git a/video_streams/migrations/0001_initial.py b/video_streams/migrations/0001_initial.py new file mode 100644 index 0000000000..09505a4c0c --- /dev/null +++ b/video_streams/migrations/0001_initial.py @@ -0,0 +1,34 @@ +# Generated by Django 5.0 on 2023-12-23 08:33 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('events', '0001_initial'), + ('video_channels', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='VideoStream', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=2147483647)), + ('url', models.CharField(max_length=2147483647)), + ('password', models.CharField(blank=True, max_length=2147483647, null=True)), + ('additional_information', models.CharField(blank=True, max_length=2147483647, null=True)), + ('extra', models.JSONField(blank=True, null=True)), + ('bg_img_url', models.CharField(blank=True, max_length=2147483647, null=True)), + ('is_chat_enabled', models.BooleanField(blank=True, null=True)), + ('is_global_event_room', models.BooleanField(blank=True, null=True)), + ('chat_room_id', models.CharField(blank=True, max_length=2147483647, null=True)), + ('channel', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='video_channels.videochannel')), + ('event', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='events.event')), + ], + ), + ] diff --git a/video_streams/migrations/__init__.py b/video_streams/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/video_streams/models.py b/video_streams/models.py new file mode 100644 index 0000000000..8e3a1a4a10 --- /dev/null +++ b/video_streams/models.py @@ -0,0 +1,16 @@ +from django.db import models +from events.models import Event +from video_channels.models import VideoChannel + +class VideoStream(models.Model): + name = models.CharField(max_length=2147483647) + url = models.CharField(max_length=2147483647) + password = models.CharField(max_length=2147483647, null=True, blank=True) + additional_information = models.CharField(max_length=2147483647, null=True, blank=True) + event = models.OneToOneField('events.Event', on_delete=models.CASCADE) + channel = models.ForeignKey(VideoChannel, on_delete=models.SET_NULL, null=True, blank=True) + extra = models.JSONField(null=True, blank=True) + bg_img_url = models.CharField(max_length=2147483647, null=True, blank=True) + is_chat_enabled = models.BooleanField(null=True, blank=True) + is_global_event_room = models.BooleanField(null=True, blank=True) + chat_room_id = models.CharField(max_length=2147483647, null=True, blank=True) \ No newline at end of file diff --git a/video_streams/tests.py b/video_streams/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/video_streams/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/video_streams/views.py b/video_streams/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/video_streams/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.