mirror of
https://github.com/kjanat/livegraphs-django.git
synced 2026-01-16 20:12:08 +01:00
111 lines
4.2 KiB
Python
111 lines
4.2 KiB
Python
# Generated by Django 5.2.1 on 2025-05-16 21:25
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
initial = True
|
|
|
|
dependencies = [
|
|
("accounts", "0001_initial"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="DataSource",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("name", models.CharField(max_length=255)),
|
|
("description", models.TextField(blank=True)),
|
|
("file", models.FileField(upload_to="data_sources/")),
|
|
("uploaded_at", models.DateTimeField(auto_now_add=True)),
|
|
(
|
|
"company",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="data_sources",
|
|
to="accounts.company",
|
|
),
|
|
),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name="Dashboard",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("name", models.CharField(max_length=255)),
|
|
("description", models.TextField(blank=True)),
|
|
("created_at", models.DateTimeField(auto_now_add=True)),
|
|
("updated_at", models.DateTimeField(auto_now=True)),
|
|
(
|
|
"company",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="dashboards",
|
|
to="accounts.company",
|
|
),
|
|
),
|
|
(
|
|
"data_sources",
|
|
models.ManyToManyField(related_name="dashboards", to="dashboard.datasource"),
|
|
),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name="ChatSession",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("session_id", models.CharField(max_length=255)),
|
|
("start_time", models.DateTimeField(blank=True, null=True)),
|
|
("end_time", models.DateTimeField(blank=True, null=True)),
|
|
("ip_address", models.GenericIPAddressField(blank=True, null=True)),
|
|
("country", models.CharField(blank=True, max_length=100)),
|
|
("language", models.CharField(blank=True, max_length=50)),
|
|
("messages_sent", models.IntegerField(default=0)),
|
|
("sentiment", models.CharField(blank=True, max_length=50)),
|
|
("escalated", models.BooleanField(default=False)),
|
|
("forwarded_hr", models.BooleanField(default=False)),
|
|
("full_transcript", models.TextField(blank=True)),
|
|
("avg_response_time", models.FloatField(blank=True, null=True)),
|
|
("tokens", models.IntegerField(default=0)),
|
|
("tokens_eur", models.FloatField(blank=True, null=True)),
|
|
("category", models.CharField(blank=True, max_length=100)),
|
|
("initial_msg", models.TextField(blank=True)),
|
|
("user_rating", models.CharField(blank=True, max_length=50)),
|
|
(
|
|
"data_source",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="chat_sessions",
|
|
to="dashboard.datasource",
|
|
),
|
|
),
|
|
],
|
|
),
|
|
]
|