Tags für Kontakte

Fixes #64
This commit is contained in:
gw3000 2023-10-22 12:32:21 +02:00
parent f8c1482ef8
commit accdb60a8c
9 changed files with 231 additions and 2 deletions

View file

@ -0,0 +1,30 @@
# Generated by Django 4.2.6 on 2023-10-22 09:59
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Contact',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('name', models.CharField(blank=True, max_length=50, null=True, verbose_name='Kontakt Name')),
('phone', models.CharField(blank=True, max_length=50, null=True, verbose_name='Telefon')),
('email', models.CharField(blank=True, max_length=50, null=True, verbose_name='Email')),
('address', models.CharField(blank=True, max_length=50, null=True, verbose_name='Adresse')),
('comment', models.CharField(blank=True, max_length=50, null=True, verbose_name='Bemerkungen')),
],
options={
'verbose_name': 'Kontakt',
'verbose_name_plural': 'Kontakte',
},
),
]

View file

@ -0,0 +1,31 @@
# Generated by Django 4.2.6 on 2023-10-22 10:14
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('contact', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='ContactTag',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('tag', models.CharField(blank=True, max_length=50, null=True, verbose_name='Tag')),
],
options={
'verbose_name': 'Kontakt Tag',
'verbose_name_plural': 'Kontakt Tags',
},
),
migrations.AddField(
model_name='contact',
name='tag_id',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='contact.contacttag', verbose_name='Tag'),
),
]