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

added models: discount_codes, event_sub_types, event_types, events, groups, microlocation, session_types, sessions, tickets, tracks, video_streams #9118

Closed
wants to merge 5 commits into from
Closed
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
Empty file added custom_sessions/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions custom_sessions/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions custom_sessions/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class CustomSessionsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'custom_sessions'
59 changes: 59 additions & 0 deletions custom_sessions/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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)),
],
),
]
22 changes: 22 additions & 0 deletions custom_sessions/migrations/0002_initial.py
Original file line number Diff line number Diff line change
@@ -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'),
),
]
34 changes: 34 additions & 0 deletions custom_sessions/migrations/0003_initial.py
Original file line number Diff line number Diff line change
@@ -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'),
),
]
Empty file.
48 changes: 48 additions & 0 deletions custom_sessions/models.py
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 3 additions & 0 deletions custom_sessions/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions custom_sessions/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
Empty file added discount_codes/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions discount_codes/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions discount_codes/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class DiscountCodesConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'discount_codes'
33 changes: 33 additions & 0 deletions discount_codes/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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)),
],
),
]
33 changes: 33 additions & 0 deletions discount_codes/migrations/0002_initial.py
Original file line number Diff line number Diff line change
@@ -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')},
),
]
Empty file.
22 changes: 22 additions & 0 deletions discount_codes/models.py
Original file line number Diff line number Diff line change
@@ -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'),)
3 changes: 3 additions & 0 deletions discount_codes/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions discount_codes/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
Empty file added event_sub_topics/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions event_sub_topics/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions event_sub_topics/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class EventSubTopicsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'event_sub_topics'
28 changes: 28 additions & 0 deletions event_sub_topics/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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')},
},
),
]
Empty file.
10 changes: 10 additions & 0 deletions event_sub_topics/models.py
Original file line number Diff line number Diff line change
@@ -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'),)
3 changes: 3 additions & 0 deletions event_sub_topics/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions event_sub_topics/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
Empty file added event_types/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions event_types/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions event_types/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class EventTypesConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'event_types'
23 changes: 23 additions & 0 deletions event_types/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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)),
],
),
]
Empty file.
Loading