Commit 80972dba authored by Ilham Maulana's avatar Ilham Maulana 💻

fix: add created_at and updated_at field to book loan model

parent d4527ebf
# Generated by Django 5.0.7 on 2024-07-16 05:53
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('loans', '0002_alter_bookloan_loan_date'),
]
operations = [
migrations.AddField(
model_name='bookloan',
name='created_at',
field=models.DateTimeField(auto_now_add=True, default=datetime.datetime(2024, 7, 16, 5, 53, 54, 878346, tzinfo=datetime.timezone.utc)),
preserve_default=False,
),
migrations.AddField(
model_name='bookloan',
name='updated_at',
field=models.DateTimeField(auto_now=True),
),
]
......@@ -11,3 +11,5 @@ class BookLoan(models.Model):
loan_date = models.DateTimeField()
due_date = models.DateTimeField()
return_date = models.DateTimeField(blank=True, null=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment