Initial commit - clean project structure
This commit is contained in:
62
accounts/migrations/0001_initial.py
Normal file
62
accounts/migrations/0001_initial.py
Normal file
@@ -0,0 +1,62 @@
|
||||
# Generated by Django 5.2.17 on 2026-08-10 11:37
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='OTPCode',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('phone', models.CharField(db_index=True, max_length=15)),
|
||||
('code', models.CharField(max_length=6)),
|
||||
('expires_at', models.DateTimeField()),
|
||||
('is_used', models.BooleanField(default=False)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='User',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('phone', models.CharField(blank=True, db_index=True, max_length=15, null=True, unique=True)),
|
||||
('device_id', models.CharField(blank=True, db_index=True, max_length=64, null=True)),
|
||||
('name', models.CharField(blank=True, max_length=100)),
|
||||
('avatar', models.CharField(blank=True, max_length=100)),
|
||||
('is_guest', models.BooleanField(default=True)),
|
||||
('grade_id', models.IntegerField(blank=True, null=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-created_at'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Session',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('refresh_token', models.CharField(max_length=200, unique=True)),
|
||||
('device_id', models.CharField(blank=True, max_length=64)),
|
||||
('expires_at', models.DateTimeField()),
|
||||
('revoked', models.BooleanField(default=False)),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sessions', to='accounts.user')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Profile',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('birth_year', models.PositiveSmallIntegerField(blank=True, null=True)),
|
||||
('parent_phone', models.CharField(blank=True, max_length=15)),
|
||||
('bio', models.CharField(blank=True, max_length=200)),
|
||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to='accounts.user')),
|
||||
],
|
||||
),
|
||||
]
|
||||
0
accounts/migrations/__init__.py
Normal file
0
accounts/migrations/__init__.py
Normal file
Reference in New Issue
Block a user