This repository has been archived by the owner on Jul 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# Generated by Django 5.0.2 on 2024-03-07 11:08 | ||
|
||
import core.utils.utils | ||
import django.contrib.auth.models | ||
import django.core.validators | ||
import django.db.models.deletion | ||
import django.utils.timezone | ||
import uuid | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('auth', '0012_alter_user_first_name_max_length'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='PanelConnection', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('connection_name', models.CharField(max_length=64)), | ||
('panel_name', models.CharField(choices=[('Marzban', 'Marzban'), ('x-ui alireza0', 'x-ui alireza0'), ('3x-ui MHSanaei', '3x-ui MHSanaei')], default='Marzban', max_length=32)), | ||
('url', models.CharField(blank=True, max_length=64, null=True)), | ||
('username', models.CharField(blank=True, max_length=128, null=True)), | ||
('password', models.CharField(blank=True, max_length=256, null=True)), | ||
('session_cookie', models.CharField(blank=True, max_length=1024, null=True)), | ||
('is_active', models.BooleanField(default=True)), | ||
('updated_at', models.DateTimeField(auto_now=True)), | ||
], | ||
options={ | ||
'ordering': ['-updated_at'], | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='UserAccount', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('password', models.CharField(max_length=128, verbose_name='password')), | ||
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), | ||
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), | ||
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), | ||
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), | ||
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), | ||
('username', models.CharField(max_length=256, unique=True, validators=[django.core.validators.MaxLengthValidator(256)])), | ||
('first_name', models.CharField(max_length=256, validators=[django.core.validators.MaxLengthValidator(256)])), | ||
('last_name', models.CharField(max_length=256, validators=[django.core.validators.MaxLengthValidator(256)])), | ||
('account_type', models.CharField(choices=[('user', 'user'), ('moderator', 'moderator'), ('admin', 'admin')], default='user', max_length=64)), | ||
('is_active', models.BooleanField(default=True)), | ||
('updated_at', models.DateTimeField(auto_now=True)), | ||
('created_at', models.DateTimeField(auto_now_add=True)), | ||
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')), | ||
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')), | ||
], | ||
options={ | ||
'ordering': ['-updated_at', '-created_at'], | ||
}, | ||
managers=[ | ||
('objects', django.contrib.auth.models.UserManager()), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='ResetPassword', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('key_token', models.CharField(default=core.utils.utils.generate_random_key, max_length=128, unique=True, validators=[django.core.validators.MaxLengthValidator(128)])), | ||
('created_at', models.DateTimeField(auto_now_add=True)), | ||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='user', to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'ordering': ['-created_at'], | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Subscription', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('subscription_uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), | ||
('subscription_title', models.CharField(max_length=512, null=True, validators=[django.core.validators.MaxLengthValidator(512)])), | ||
('subscription_link', models.CharField(max_length=512, null=True, validators=[django.core.validators.MaxLengthValidator(512)])), | ||
('use_count', models.IntegerField(default=0)), | ||
('expose', models.BooleanField(default=False)), | ||
('is_active', models.BooleanField(default=True)), | ||
('user_email_in_xui_panel', models.CharField(max_length=512, null=True, validators=[django.core.validators.MaxLengthValidator(512)])), | ||
('updated_at', models.DateTimeField(auto_now=True)), | ||
('created_at', models.DateTimeField(auto_now_add=True)), | ||
('assigned_to', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subscriptions_assignee', to=settings.AUTH_USER_MODEL)), | ||
('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subscriptions_creator', to=settings.AUTH_USER_MODEL)), | ||
('panel_connection', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='panel', to='core.panelconnection')), | ||
], | ||
options={ | ||
'ordering': ['-updated_at', '-created_at'], | ||
}, | ||
), | ||
] |