attendence records, extra hours , rewards and punishment funnctionality have been added
This commit is contained in:
21
lib/domain/models/attendance_model.dart
Normal file
21
lib/domain/models/attendance_model.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
import 'finance_record.dart';
|
||||
|
||||
class AttendanceModel extends FinanceRecord {
|
||||
final DateTime? loginTime;
|
||||
final DateTime? logoutTime;
|
||||
final int? workHours;
|
||||
final DateTime? createdAt;
|
||||
final bool isDeleted;
|
||||
|
||||
AttendanceModel({
|
||||
required super.id,
|
||||
required super.employeeId,
|
||||
super.date,
|
||||
super.reason,
|
||||
this.loginTime,
|
||||
this.logoutTime,
|
||||
this.workHours,
|
||||
this.createdAt,
|
||||
required this.isDeleted,
|
||||
});
|
||||
}
|
||||
17
lib/domain/models/extra_payment_model.dart
Normal file
17
lib/domain/models/extra_payment_model.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'finance_record.dart';
|
||||
|
||||
class ExtraPaymentModel extends FinanceRecord {
|
||||
final double amount;
|
||||
final String? note;
|
||||
final bool isPenalty;
|
||||
|
||||
ExtraPaymentModel({
|
||||
required super.id,
|
||||
required super.employeeId,
|
||||
super.date,
|
||||
super.reason,
|
||||
required this.amount,
|
||||
this.note,
|
||||
required this.isPenalty,
|
||||
});
|
||||
}
|
||||
1
lib/domain/models/finance_category.dart
Normal file
1
lib/domain/models/finance_category.dart
Normal file
@@ -0,0 +1 @@
|
||||
enum FinanceCategory { attendance, overtime, bonus, penalty }
|
||||
13
lib/domain/models/finance_record.dart
Normal file
13
lib/domain/models/finance_record.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
abstract class FinanceRecord {
|
||||
final String id;
|
||||
final String employeeId;
|
||||
final DateTime? date;
|
||||
final String? reason;
|
||||
|
||||
FinanceRecord({
|
||||
required this.id,
|
||||
required this.employeeId,
|
||||
this.date,
|
||||
this.reason,
|
||||
});
|
||||
}
|
||||
16
lib/domain/models/overtime_model.dart
Normal file
16
lib/domain/models/overtime_model.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'finance_record.dart';
|
||||
|
||||
class OvertimeModel extends FinanceRecord {
|
||||
final double hours;
|
||||
final double hourlyRateAtTheTime;
|
||||
final double totalAmount;
|
||||
|
||||
OvertimeModel({
|
||||
required super.id,
|
||||
required super.employeeId,
|
||||
super.date,
|
||||
required this.hours,
|
||||
required this.hourlyRateAtTheTime,
|
||||
required this.totalAmount,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user