59 lines
2.0 KiB
Python
59 lines
2.0 KiB
Python
|
# Generated by Django 5.0.6 on 2024-07-08 13:55
|
||
|
|
||
|
import django.db.models.deletion
|
||
|
from django.conf import settings
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
("device", "0003_remove_component_type_remove_computer_type_and_more"),
|
||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name="Lot",
|
||
|
fields=[
|
||
|
(
|
||
|
"id",
|
||
|
models.BigAutoField(
|
||
|
auto_created=True,
|
||
|
primary_key=True,
|
||
|
serialize=False,
|
||
|
verbose_name="ID",
|
||
|
),
|
||
|
),
|
||
|
("created", models.DateTimeField(auto_now_add=True)),
|
||
|
("updated", models.DateTimeField(auto_now=True)),
|
||
|
(
|
||
|
"type",
|
||
|
models.CharField(
|
||
|
choices=[
|
||
|
("Incoming", "Incoming"),
|
||
|
("Outgoing", "Outgoing"),
|
||
|
("Temporal", "Temporal"),
|
||
|
],
|
||
|
default="Temporal",
|
||
|
max_length=32,
|
||
|
),
|
||
|
),
|
||
|
("name", models.CharField(blank=True, max_length=64, null=True)),
|
||
|
("code", models.CharField(blank=True, max_length=64, null=True)),
|
||
|
("description", models.CharField(blank=True, max_length=64, null=True)),
|
||
|
("closed", models.BooleanField(default=True)),
|
||
|
("devices", models.ManyToManyField(to="device.device")),
|
||
|
(
|
||
|
"owner",
|
||
|
models.ForeignKey(
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
to=settings.AUTH_USER_MODEL,
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
]
|