# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
#   * Rearrange models' order
#   * Make sure each model has one field with primary_key=True
#   * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
#   * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
# Feel free to rename the models, but don't rename db_table values or field names.
from django.db import models


class AccountCity(models.Model):
    id = models.BigAutoField(primary_key=True)
    name = models.CharField(max_length=255)
    province = models.ForeignKey('AccountProvince', models.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'account_city'


class AccountOtp(models.Model):
    id = models.BigAutoField(primary_key=True)
    code = models.CharField(max_length=6)
    created_at = models.DateTimeField()
    is_verified = models.BooleanField()
    user = models.ForeignKey('AccountUser', models.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'account_otp'


class AccountPayment(models.Model):
    id = models.BigAutoField(primary_key=True)
    amount = models.IntegerField()
    authority = models.CharField(max_length=255)
    status = models.CharField(max_length=20)
    created_at = models.DateTimeField()
    response = models.TextField(blank=True, null=True)
    user_plan = models.ForeignKey('AccountUserPlan', models.DO_NOTHING, blank=True, null=True)
    tracking_code = models.CharField(max_length=255, blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'account_payment'


class AccountPlan(models.Model):
    id = models.BigAutoField(primary_key=True)
    name = models.CharField(unique=True, max_length=50)
    description = models.TextField(blank=True, null=True)
    monthly_price = models.IntegerField()
    yearly_price = models.IntegerField()
    is_offered = models.BooleanField()
    order = models.IntegerField()
    color = models.TextField(blank=True, null=True)
    disabled_features = models.TextField(blank=True, null=True)
    enabled_features = models.TextField(blank=True, null=True)
    icon = models.TextField(blank=True, null=True)
    is_popular = models.BooleanField()

    class Meta:
        managed = False
        db_table = 'account_plan'


class AccountProvince(models.Model):
    id = models.BigAutoField(primary_key=True)
    name = models.CharField(max_length=255)

    class Meta:
        managed = False
        db_table = 'account_province'


class AccountUser(models.Model):
    id = models.BigAutoField(primary_key=True)
    password = models.CharField(max_length=128)
    last_login = models.DateTimeField(blank=True, null=True)
    is_superuser = models.BooleanField()
    cell = models.CharField(unique=True, max_length=11)
    is_active = models.BooleanField()
    is_staff = models.BooleanField()
    first_name = models.CharField(max_length=255, blank=True, null=True)
    is_vip = models.BooleanField()
    last_name = models.CharField(max_length=255, blank=True, null=True)
    national_code = models.CharField(max_length=10, blank=True, null=True)
    city = models.ForeignKey(AccountCity, models.DO_NOTHING, blank=True, null=True)
    province = models.ForeignKey(AccountProvince, models.DO_NOTHING, blank=True, null=True)
    birth_date = models.IntegerField(blank=True, null=True)
    email = models.CharField(max_length=255, blank=True, null=True)
    gender = models.CharField(max_length=6)

    class Meta:
        managed = False
        db_table = 'account_user'


class AccountUserGroups(models.Model):
    id = models.BigAutoField(primary_key=True)
    customuser = models.ForeignKey(AccountUser, models.DO_NOTHING)
    group = models.ForeignKey('AuthGroup', models.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'account_user_groups'
        unique_together = (('customuser', 'group'),)


class AccountUserPlan(models.Model):
    id = models.BigAutoField(primary_key=True)
    start_date = models.DateTimeField()
    end_date = models.DateTimeField(blank=True, null=True)
    last_payment_date = models.DateTimeField(blank=True, null=True)
    next_payment_date = models.DateTimeField(blank=True, null=True)
    status = models.CharField(max_length=20)
    period = models.CharField(max_length=20)
    plan = models.ForeignKey(AccountPlan, models.DO_NOTHING, blank=True, null=True)
    user = models.OneToOneField(AccountUser, models.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'account_user_plan'


class AccountUserUserPermissions(models.Model):
    id = models.BigAutoField(primary_key=True)
    customuser = models.ForeignKey(AccountUser, models.DO_NOTHING)
    permission = models.ForeignKey('AuthPermission', models.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'account_user_user_permissions'
        unique_together = (('customuser', 'permission'),)


class AuthGroup(models.Model):
    name = models.CharField(unique=True, max_length=150)

    class Meta:
        managed = False
        db_table = 'auth_group'


class AuthGroupPermissions(models.Model):
    id = models.BigAutoField(primary_key=True)
    group = models.ForeignKey(AuthGroup, models.DO_NOTHING)
    permission = models.ForeignKey('AuthPermission', models.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'auth_group_permissions'
        unique_together = (('group', 'permission'),)


class AuthPermission(models.Model):
    name = models.CharField(max_length=255)
    content_type = models.ForeignKey('DjangoContentType', models.DO_NOTHING)
    codename = models.CharField(max_length=100)

    class Meta:
        managed = False
        db_table = 'auth_permission'
        unique_together = (('content_type', 'codename'),)


class DjangoAdminLog(models.Model):
    action_time = models.DateTimeField()
    object_id = models.TextField(blank=True, null=True)
    object_repr = models.CharField(max_length=200)
    action_flag = models.SmallIntegerField()
    change_message = models.TextField()
    content_type = models.ForeignKey('DjangoContentType', models.DO_NOTHING, blank=True, null=True)
    user = models.ForeignKey(AccountUser, models.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'django_admin_log'


class DjangoContentType(models.Model):
    app_label = models.CharField(max_length=100)
    model = models.CharField(max_length=100)

    class Meta:
        managed = False
        db_table = 'django_content_type'
        unique_together = (('app_label', 'model'),)


class DjangoMigrations(models.Model):
    id = models.BigAutoField(primary_key=True)
    app = models.CharField(max_length=255)
    name = models.CharField(max_length=255)
    applied = models.DateTimeField()

    class Meta:
        managed = False
        db_table = 'django_migrations'


class DjangoSession(models.Model):
    session_key = models.CharField(primary_key=True, max_length=40)
    session_data = models.TextField()
    expire_date = models.DateTimeField()

    class Meta:
        managed = False
        db_table = 'django_session'


class TehranstockHistory(models.Model):
    id = models.BigAutoField(primary_key=True)
    date = models.DateField()
    open = models.DecimalField(max_digits=10, decimal_places=2)
    high = models.DecimalField(max_digits=10, decimal_places=2)
    low = models.DecimalField(max_digits=10, decimal_places=2)
    close = models.DecimalField(max_digits=10, decimal_places=2)
    volume = models.BigIntegerField()
    symbol = models.ForeignKey('TehranstockSymbol', models.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'tehranStock_history'
        unique_together = (('symbol', 'date'),)


class TehranstockSymbol(models.Model):
    id = models.BigAutoField(primary_key=True)
    name = models.CharField(unique=True, max_length=10)

    class Meta:
        managed = False
        db_table = 'tehranStock_symbol'
