mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-06-27 16:57:01 +00:00
Add EmailSettings model with migration
This commit is contained in:
parent
ea9596b4bc
commit
b7ae6f1421
31
wireguard_tools/migrations/0001_initial.py
Normal file
31
wireguard_tools/migrations/0001_initial.py
Normal file
@ -0,0 +1,31 @@
|
||||
# Generated by Django 5.1.5 on 2025-02-25 12:21
|
||||
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='EmailSettings',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(default='email_settings', max_length=20, unique=True)),
|
||||
('smtp_username', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('smtp_password', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('smtp_host', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('smtp_port', models.IntegerField(default=587)),
|
||||
('smtp_encryption', models.CharField(choices=[('ssl', 'SSL'), ('tls', 'TLS')], default='tls', max_length=3)),
|
||||
('smtp_from_address', models.EmailField(blank=True, max_length=254, null=True)),
|
||||
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('updated', models.DateTimeField(auto_now=True)),
|
||||
],
|
||||
),
|
||||
]
|
@ -1,3 +1,16 @@
|
||||
from django.db import models
|
||||
import uuid
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class EmailSettings(models.Model):
|
||||
name = models.CharField(default='email_settings', max_length=20, unique=True)
|
||||
smtp_username = models.CharField(max_length=100, blank=True, null=True)
|
||||
smtp_password = models.CharField(max_length=100, blank=True, null=True)
|
||||
smtp_host = models.CharField(max_length=100, blank=True, null=True)
|
||||
smtp_port = models.IntegerField(default=587)
|
||||
smtp_encryption = models.CharField(default='tls', choices=(('ssl', 'SSL'), ('tls', 'TLS')), max_length=3)
|
||||
smtp_from_address = models.EmailField(blank=True, null=True)
|
||||
|
||||
uuid = models.UUIDField(default=uuid.uuid4, editable=False, unique=True)
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
updated = models.DateTimeField(auto_now=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user