#9 feat(Customer): add address_external_id field.
This commit is contained in:
parent
cf0f6dc4b5
commit
81e4c0bc0d
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 5.0.6 on 2025-07-20 00:04
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('don_confiao', '0042_product_unit_external_id'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='customer',
|
||||||
|
name='address_external_id',
|
||||||
|
field=models.CharField(blank=True, max_length=100, null=True),
|
||||||
|
),
|
||||||
|
]
|
@ -18,6 +18,7 @@ class Customer(models.Model):
|
|||||||
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)
|
external_id = models.CharField(max_length=100, null=True, blank=True)
|
||||||
|
address_external_id = models.CharField(max_length=100, null=True, blank=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
@ -15,6 +15,7 @@ class TestCustomer(TestCase):
|
|||||||
|
|
||||||
self.assertIsInstance(customer, Customer)
|
self.assertIsInstance(customer, Customer)
|
||||||
self.assertIsNone(customer.external_id)
|
self.assertIsNone(customer.external_id)
|
||||||
|
self.assertIsNone(customer.address_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