#9 feat(Sale): add external_id field.
This commit is contained in:
parent
62d39c97c0
commit
46e7181653
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 5.0.6 on 2025-07-19 22:27
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('don_confiao', '0039_sale_external_id'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='customer',
|
||||||
|
name='external_id',
|
||||||
|
field=models.CharField(blank=True, max_length=100, null=True),
|
||||||
|
),
|
||||||
|
]
|
@ -17,6 +17,7 @@ class Customer(models.Model):
|
|||||||
address = models.CharField(max_length=100, null=True, blank=True)
|
address = models.CharField(max_length=100, null=True, blank=True)
|
||||||
email = models.CharField(max_length=100, null=True, blank=True)
|
email = models.CharField(max_length=100, null=True, blank=True)
|
||||||
phone = models.CharField(max_length=100, null=True, blank=True)
|
phone = models.CharField(max_length=100, null=True, blank=True)
|
||||||
|
external_id = models.CharField(max_length=100, null=True, blank=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
@ -14,6 +14,7 @@ class TestCustomer(TestCase):
|
|||||||
customer.save()
|
customer.save()
|
||||||
|
|
||||||
self.assertIsInstance(customer, Customer)
|
self.assertIsInstance(customer, Customer)
|
||||||
|
self.assertIsNone(customer.external_id)
|
||||||
|
|
||||||
def test_don_create_customer_without_name(self):
|
def test_don_create_customer_without_name(self):
|
||||||
customer = Customer()
|
customer = Customer()
|
||||||
|
Loading…
Reference in New Issue
Block a user