changes
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28
app/migrations/0350_transaction_current.py
Normal file
28
app/migrations/0350_transaction_current.py
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# Generated by Django 5.1.7 on 2026-01-08 01:17
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('app', '0349_internal_entry_allocation_amount_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Transaction_Current',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('create_time', models.DateTimeField(auto_now_add=True, null=True)),
|
||||||
|
('update_time', models.DateTimeField(auto_now=True, null=True)),
|
||||||
|
('detail', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='app.transaction_detail')),
|
||||||
|
('transaction', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='txncurrent', to='app.transaction')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'db_table': 'transaction_current',
|
||||||
|
'unique_together': {('transaction', 'detail')},
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -1398,6 +1398,17 @@ class Transaction_Detail(AutoCodeModel):
|
|||||||
db_table = 'transaction_detail'
|
db_table = 'transaction_detail'
|
||||||
|
|
||||||
|
|
||||||
|
class Transaction_Current(models.Model):
|
||||||
|
transaction = models.OneToOneField(Transaction, null=False, related_name='txncurrent', on_delete=models.PROTECT)
|
||||||
|
detail = models.ForeignKey(Transaction_Detail, null=False, related_name='+', on_delete=models.PROTECT)
|
||||||
|
create_time = models.DateTimeField(null=True, auto_now_add=True)
|
||||||
|
update_time = models.DateTimeField(null=True, auto_now=True)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
db_table = 'transaction_current'
|
||||||
|
unique_together = ('transaction', 'detail')
|
||||||
|
|
||||||
|
|
||||||
class Transaction_File(models.Model):
|
class Transaction_File(models.Model):
|
||||||
txn_detail = models.ForeignKey(Transaction_Detail, null=False, related_name='txnfile', on_delete=models.PROTECT)
|
txn_detail = models.ForeignKey(Transaction_Detail, null=False, related_name='txnfile', on_delete=models.PROTECT)
|
||||||
file = models.ForeignKey(File, null=False, related_name='+', on_delete=models.PROTECT)
|
file = models.ForeignKey(File, null=False, related_name='+', on_delete=models.PROTECT)
|
||||||
|
|||||||
Reference in New Issue
Block a user