29 lines
890 B
Python
29 lines
890 B
Python
# Generated by Django 4.2.30 on 2026-08-20 02:38
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='KwhReadings',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('timestamp', models.DateTimeField(auto_now_add=True)),
|
|
('voltage', models.FloatField(help_text='Tegangan (V)')),
|
|
('current', models.FloatField(help_text='Arus (A)')),
|
|
('active_power', models.FloatField(help_text='Daya Aktif (kW)')),
|
|
('total_energy', models.FloatField(help_text='Total kWh')),
|
|
],
|
|
options={
|
|
'ordering': ['-timestamp'],
|
|
},
|
|
),
|
|
]
|