Cuser models
This commit is contained in:
20
api/cuser/migrations/0004_alter_customuser_rfc.py
Normal file
20
api/cuser/migrations/0004_alter_customuser_rfc.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# Generated by Django 5.2.3 on 2025-10-05 17:47
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cuser', '0003_alter_customuser_rfc'),
|
||||
('customs', '0015_partida_updated_at'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='customuser',
|
||||
name='rfc',
|
||||
field=models.ForeignKey(blank=True, help_text='RFC associated with the user if they are an importer', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='users', to='customs.importador'),
|
||||
),
|
||||
]
|
||||
@@ -12,7 +12,7 @@ class CustomUser(AbstractUser):
|
||||
profile_picture = models.ImageField(upload_to='profile_pictures/', null=True, blank=True)
|
||||
|
||||
is_importador = models.BooleanField(default=False, help_text="Indicates if the user is an importer")
|
||||
rfc = models.CharField(max_length=1, null=True, blank=True, help_text="RFC of the user")
|
||||
rfc = models.ForeignKey('customs.Importador', on_delete=models.SET_NULL, null=True, blank=True, related_name='users', help_text="RFC associated with the user if they are an importer")
|
||||
|
||||
def __str__(self):
|
||||
return self.username
|
||||
|
||||
Reference in New Issue
Block a user