2024-01-05 19:33:25 +08:00
|
|
|
# Generated by Django 4.2.7 on 2024-01-05 10:26
|
2023-12-08 23:00:15 +08:00
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
import django.utils.timezone
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
('equipments', '0001_initial'),
|
2024-01-05 19:33:25 +08:00
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
2023-12-08 23:00:15 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Transaction',
|
|
|
|
fields=[
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2023-12-29 18:38:59 +08:00
|
|
|
('remarks', models.TextField(max_length=512, null=True)),
|
2024-01-05 19:33:25 +08:00
|
|
|
('additional_members', models.TextField(max_length=512, null=True)),
|
|
|
|
('consumables', models.TextField(max_length=512, null=True)),
|
2023-12-08 23:00:15 +08:00
|
|
|
('transaction_status', models.CharField(choices=[('Pending Approval', 'Pending Approval'), ('Approved', 'Approved'), ('Rejected', 'Rejected'), ('Cancelled', 'Cancelled'), ('Borrowed', 'Borrowed'), ('Returned: Pending Checking', 'Returned: Pending Checking'), ('With Breakages: Pending Resolution', 'With Breakages: Pending Resolution'), ('Finalized', 'Finalized')], default='Pending', max_length=40)),
|
2023-12-29 18:38:59 +08:00
|
|
|
('subject', models.TextField(max_length=128)),
|
2023-12-08 23:00:15 +08:00
|
|
|
('timestamp', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
|
|
|
|
('borrower', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='borrowed_transactions', to=settings.AUTH_USER_MODEL)),
|
|
|
|
('equipments', models.ManyToManyField(to='equipments.equipmentinstance')),
|
|
|
|
('teacher', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='teacher_transactions', to=settings.AUTH_USER_MODEL)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
]
|