parent
52062b66d5
commit
e38e99374a
@ -0,0 +1,69 @@
|
||||
# Generated by Django 5.1.4 on 2025-01-09 09:45
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Employee',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('first_name', models.CharField(max_length=50)),
|
||||
('last_name', models.CharField(max_length=50)),
|
||||
('position', models.CharField(max_length=100)),
|
||||
('email', models.EmailField(max_length=254, unique=True)),
|
||||
('hired_date', models.DateField()),
|
||||
('work_schedule', models.JSONField(default=dict)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Leave',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('leave_type', models.CharField(choices=[('vacation', 'Vacation'), ('sick', 'Sick Leave')], max_length=10)),
|
||||
('start_date', models.DateField()),
|
||||
('end_date', models.DateField()),
|
||||
('reason', models.TextField(blank=True)),
|
||||
('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hr.employee')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='OvertimeReport',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('date', models.DateField()),
|
||||
('worked_hours', models.FloatField()),
|
||||
('required_hours', models.FloatField(default=8.0)),
|
||||
('overtime', models.FloatField()),
|
||||
('comment', models.TextField(blank=True)),
|
||||
('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hr.employee')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Report',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('report_date', models.DateField(auto_now_add=True)),
|
||||
('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hr.employee')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='WorkTimeLog',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('date', models.DateField()),
|
||||
('check_in', models.TimeField(blank=True, null=True)),
|
||||
('check_out', models.TimeField(blank=True, null=True)),
|
||||
('worked_hours', models.FloatField(blank=True, null=True)),
|
||||
('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hr.employee')),
|
||||
],
|
||||
),
|
||||
]
|
Loading…
Reference in new issue