changes
This commit is contained in:
Binary file not shown.
@@ -21,7 +21,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
SECRET_KEY = 'django-insecure-_u202k$8qq2p*cr_eo(7k!0ngr5^n)27@85+5oy8&41(u6&j54'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = False
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
@@ -81,8 +81,8 @@ ASGI_APPLICATION = 'api.asgi.application'
|
||||
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
|
||||
#prod:5.223.52.193 dev:5.223.42.146
|
||||
|
||||
MODE = 'prod'
|
||||
DBHOST = '172.17.0.1' if MODE == 'prod' else '5.223.52.193'
|
||||
MODE = 'dev'
|
||||
DBHOST = '172.17.0.1' if MODE == 'prod' else '5.223.42.146'
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
|
||||
Binary file not shown.
19
app/migrations/0358_people_issued_place.py
Normal file
19
app/migrations/0358_people_issued_place.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 5.1.7 on 2026-01-18 17:27
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('app', '0357_discount_type_method'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='people',
|
||||
name='issued_place',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='app.issued_place'),
|
||||
),
|
||||
]
|
||||
@@ -1190,6 +1190,16 @@ class Country(models.Model):
|
||||
db_table = 'country'
|
||||
|
||||
|
||||
class Issued_Place(models.Model):
|
||||
code = models.CharField(max_length=30, null=True, unique=True)
|
||||
name = models.CharField(max_length=100, null=False)
|
||||
create_time = models.DateTimeField(null=True, auto_now_add=True)
|
||||
update_time = models.DateTimeField(null=True, auto_now=True)
|
||||
|
||||
class Meta:
|
||||
db_table = 'issued_place'
|
||||
|
||||
|
||||
class Company(AutoCodeModel):
|
||||
code_prefix = "CP"
|
||||
code_padding = 5
|
||||
@@ -1226,6 +1236,7 @@ class People(AutoCodeModel):
|
||||
legal_type = models.ForeignKey(Legal_Type, null=True, related_name='+', on_delete=models.PROTECT)
|
||||
legal_code = models.CharField(max_length=20, null=True)
|
||||
issued_date = models.DateField(null=True)
|
||||
issued_place = models.ForeignKey(Issued_Place, null=True, related_name='+', on_delete=models.PROTECT)
|
||||
address = models.CharField(max_length=200, null=True)
|
||||
contact_address = models.CharField(max_length=200, null=True)
|
||||
taxcode = models.CharField(max_length=100, null=True)
|
||||
@@ -1274,16 +1285,6 @@ class Document_Audit(models.Model):
|
||||
db_table = 'document_audit'
|
||||
|
||||
|
||||
class Issued_Place(models.Model):
|
||||
code = models.CharField(max_length=30, null=True, unique=True)
|
||||
name = models.CharField(max_length=100, null=False)
|
||||
create_time = models.DateTimeField(null=True, auto_now_add=True)
|
||||
update_time = models.DateTimeField(null=True, auto_now=True)
|
||||
|
||||
class Meta:
|
||||
db_table = 'issued_place'
|
||||
|
||||
|
||||
class Transaction_Phase(models.Model):
|
||||
code = models.CharField(max_length=30, null=True, unique=True)
|
||||
name = models.CharField(max_length=100, null=False)
|
||||
|
||||
Reference in New Issue
Block a user