Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add models for sessions and tracks #9126

Open
wants to merge 3 commits into
base: dev-v3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions event_topics/migrations/0002_eventsubtopic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.0 on 2024-03-13 19:20

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


class Migration(migrations.Migration):

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(max_length=200, null=True)),
('slug', models.CharField(max_length=200, null=True)),
('event_topic_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='event_topics.eventtopic')),
],
),
]
8 changes: 8 additions & 0 deletions event_topics/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ class EventTopic(models.Model):

def __str__(self):
return self.name

class EventSubTopic(models.Model):
name = models.CharField(max_length=200, null=True)
slug = models.CharField(max_length=200, null=True)
event_topic_id = models.ForeignKey(EventTopic, on_delete=models.CASCADE, null=True)

def __str__(self):
return self.name
Empty file added events/__init__.py
Empty file.
11 changes: 11 additions & 0 deletions events/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from django.contrib import admin
from .models import Event, EventType, DiscountCode, Group, Sessions, Microlocations, SessionTypes, Tracks

admin.site.register(Event)
admin.site.register(EventType)
admin.site.register(DiscountCode)
admin.site.register(Group)
admin.site.register(Sessions)
admin.site.register(Microlocations)
admin.site.register(SessionTypes)
admin.site.register(Tracks)
6 changes: 6 additions & 0 deletions events/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class EventsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'events'
164 changes: 164 additions & 0 deletions events/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# Generated by Django 5.0 on 2024-03-13 19:20

import django.contrib.postgres.fields.citext
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
('event_topics', '0002_eventsubtopic'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

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=200, null=True)),
('slug', models.CharField(max_length=200, null=True)),
('deleted_at', models.DateTimeField(null=True)),
],
),
migrations.CreateModel(
name='DiscountCode',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('code', django.contrib.postgres.fields.citext.CITextField(max_length=200, null=True)),
('value', models.FloatField(null=True)),
('type', models.CharField(max_length=200, null=True)),
('is_active', models.BooleanField(null=True)),
('tickets_number', models.IntegerField(null=True)),
('min_quantity', models.IntegerField(null=True)),
('max_quantity', models.IntegerField(null=True)),
('valid_from', models.DateTimeField(null=True)),
('valid_till', models.DateTimeField(null=True)),
('created_at', models.DateTimeField(null=True)),
('used_for', models.CharField(max_length=200, null=True)),
('discount_url', models.CharField(max_length=200, null=True)),
('deleted_at', models.DateTimeField(null=True)),
('marketer_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Event',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('identifier', models.CharField(max_length=8)),
('name', models.CharField(max_length=255)),
('external_event_url', models.URLField(blank=True, null=True)),
('logo_url', models.URLField(blank=True, null=True)),
('starts_at', models.DateTimeField()),
('ends_at', models.DateTimeField()),
('timezone', models.CharField(default='UTC', max_length=50)),
('online', models.BooleanField(default=False)),
('latitude', models.FloatField(blank=True, null=True)),
('longitude', models.FloatField(blank=True, null=True)),
('location_name', models.CharField(blank=True, max_length=255, null=True)),
('searchable_location_name', models.CharField(blank=True, max_length=255, null=True)),
('public_stream_link', models.CharField(blank=True, max_length=255, null=True)),
('stream_loop', models.BooleanField(default=False)),
('stream_autoplay', models.BooleanField(default=False)),
('is_featured', models.BooleanField(default=False)),
('is_promoted', models.BooleanField(default=False)),
('is_demoted', models.BooleanField(default=False)),
('is_chat_enabled', models.BooleanField(default=False)),
('is_videoroom_enabled', models.BooleanField(default=False)),
('is_document_enabled', models.BooleanField(default=False)),
('document_links', models.JSONField(blank=True, null=True)),
('chat_room_id', models.CharField(blank=True, max_length=255, null=True)),
('description', models.TextField(blank=True, null=True)),
('after_order_message', models.TextField(blank=True, null=True)),
('original_image_url', models.URLField(blank=True, null=True)),
('thumbnail_image_url', models.URLField(blank=True, null=True)),
('large_image_url', models.URLField(blank=True, null=True)),
('show_remaining_tickets', models.BooleanField(default=False)),
('icon_image_url', models.URLField(blank=True, null=True)),
('owner_name', models.CharField(blank=True, max_length=255, null=True)),
('is_map_shown', models.BooleanField(default=False)),
('is_oneclick_signup_enabled', models.BooleanField(default=False)),
('has_owner_info', models.BooleanField(default=False)),
('owner_description', models.CharField(blank=True, max_length=255, null=True)),
('is_sessions_speakers_enabled', models.BooleanField(default=False)),
('is_cfs_enabled', models.BooleanField(default=False)),
('privacy', models.CharField(default='public', max_length=10)),
('state', models.CharField(default='draft', max_length=10)),
('is_announced', models.BooleanField(default=False)),
('ticket_url', models.CharField(blank=True, max_length=255, null=True)),
('code_of_conduct', models.CharField(blank=True, max_length=255, null=True)),
('schedule_published_on', models.DateTimeField(blank=True, null=True)),
('is_ticketing_enabled', models.BooleanField(default=False)),
('is_donation_enabled', models.BooleanField(default=False)),
('is_ticket_form_enabled', models.BooleanField(default=True)),
('is_badges_enabled', models.BooleanField(default=False)),
('payment_country', models.CharField(blank=True, max_length=100, null=True)),
('payment_currency', models.CharField(blank=True, max_length=100, null=True)),
('paypal_email', models.CharField(blank=True, max_length=255, null=True)),
('is_tax_enabled', models.BooleanField(default=False)),
('is_billing_info_mandatory', models.BooleanField(default=False)),
('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_by_invoice', models.BooleanField(default=False)),
('can_pay_by_onsite', models.BooleanField(default=False)),
('can_pay_by_omise', models.BooleanField(default=False)),
('can_pay_by_alipay', models.BooleanField(default=False)),
('can_pay_by_paytm', models.BooleanField(default=False)),
('cheque_details', models.CharField(blank=True, max_length=255, null=True)),
('bank_details', models.CharField(blank=True, max_length=255, null=True)),
('onsite_details', models.CharField(blank=True, max_length=255, null=True)),
('invoice_details', models.CharField(blank=True, max_length=255, null=True)),
('created_at', models.DateTimeField(null=True)),
('pentabarf_url', models.CharField(blank=True, max_length=255, null=True)),
('ical_url', models.CharField(blank=True, max_length=255, null=True)),
('xcal_url', models.CharField(blank=True, max_length=255, null=True)),
('is_sponsors_enabled', models.BooleanField(default=False)),
('refund_policy', models.CharField(blank=True, max_length=255, null=True)),
('is_stripe_linked', models.BooleanField(default=False)),
('completed_order_sales', models.IntegerField(default=0)),
('placed_order_sales', models.IntegerField(default=0)),
('pending_order_sales', models.IntegerField(default=0)),
('completed_order_tickets', models.IntegerField(default=0)),
('placed_order_tickets', models.IntegerField(default=0)),
('pending_order_tickets', models.IntegerField(default=0)),
('discount_code_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.discountcode')),
('event_sub_topic_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='event_topics.eventsubtopic')),
('event_topic_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='event_topics.eventtopic')),
('event_type_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.eventtype')),
],
),
migrations.AddField(
model_name='discountcode',
name='event_id',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='events.event'),
),
migrations.CreateModel(
name='Group',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200, null=True)),
('created_at', models.DateTimeField(null=True)),
('modified_at', models.DateTimeField(null=True)),
('social_links', models.JSONField(null=True)),
('about', models.TextField(null=True)),
('banner_url', models.CharField(max_length=200, null=True)),
('logo_url', models.CharField(max_length=200, null=True)),
('deleted_at', models.DateTimeField(null=True)),
('follower_count', models.IntegerField(default=0)),
('thumbnail_image_url', models.URLField(blank=True, null=True)),
('is_promoted', models.BooleanField(default=False)),
('user_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.AddField(
model_name='event',
name='group_id',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='events.group'),
),
]
18 changes: 18 additions & 0 deletions events/migrations/0002_alter_discountcode_code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0 on 2024-03-13 19:32

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('events', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='discountcode',
name='code',
field=models.TextField(max_length=200, null=True),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Generated by Django 5.0 on 2024-03-14 20:22

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


class Migration(migrations.Migration):

dependencies = [
('events', '0002_alter_discountcode_code'),
]

operations = [
migrations.CreateModel(
name='Sessions',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=2147483647)),
('subtitle', models.CharField(max_length=2147483647, null=True)),
('short_abstract', models.TextField(null=True)),
('long_abstract', models.TextField(null=True)),
('comments', models.TextField(null=True)),
('starts_at', models.DateTimeField(null=True)),
('ends_at', models.DateTimeField(null=True)),
('language', models.CharField(max_length=2147483647, null=True)),
('slides_url', models.CharField(max_length=2147483647, null=True)),
('video_url', models.CharField(max_length=2147483647, null=True)),
('audio_url', models.CharField(max_length=2147483647, null=True)),
('signup_url', models.CharField(max_length=2147483647, null=True)),
('state', models.CharField(max_length=2147483647, null=True)),
('created_at', models.DateTimeField(null=True)),
('deleted_at', models.DateTimeField(null=True)),
('submitted_at', models.DateTimeField(null=True)),
('submission_modifier', models.CharField(max_length=2147483647, null=True)),
('is_mail_sent', models.BooleanField(null=True)),
('level', models.CharField(max_length=2147483647, null=True)),
('last_modified_at', models.DateTimeField(null=True)),
('send_email', models.BooleanField(null=True)),
('is_locked', models.BooleanField(default=False)),
('complex_field_values', models.JSONField(null=True)),
('average_rating', models.FloatField(default=0.0, null=True)),
('rating_count', models.IntegerField(default=0)),
('facebook', models.CharField(max_length=2147483647, null=True)),
('github', models.CharField(max_length=2147483647, null=True)),
('gitlab', models.CharField(max_length=2147483647, null=True)),
('instagram', models.CharField(max_length=2147483647, null=True)),
('linkedin', models.CharField(max_length=2147483647, null=True)),
('twitter', models.CharField(max_length=2147483647, null=True)),
('website', models.CharField(max_length=2147483647, null=True)),
('favourite_count', models.IntegerField(default=0)),
('mastodon', models.CharField(max_length=2147483647, null=True)),
('slides', models.JSONField(max_length=2147483647, null=True)),
],
),
migrations.CreateModel(
name='SessionTypes',
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)),
('length', models.CharField(blank=True, max_length=2147483647, null=True)),
('deleted_at', models.DateTimeField(blank=True, null=True)),
('position', models.IntegerField(blank=True, null=True)),
],
),
migrations.CreateModel(
name='Tracks',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200, null=True)),
('description', models.TextField(null=True)),
('color', models.CharField(max_length=200, null=True)),
('deleted_at', models.DateTimeField(null=True)),
('position', models.IntegerField(null=True)),
],
),
migrations.CreateModel(
name='Microlocations',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=2147483647, null=True)),
('latitude', models.FloatField(null=True)),
('longitude', models.FloatField(null=True)),
('floor', models.IntegerField(null=True)),
('room', models.CharField(max_length=2147483647, null=True)),
('deleted_at', models.DateTimeField(null=True)),
('position', models.IntegerField(null=True)),
('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_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='events.event')),
],
),
]
Loading