add auth, format
This commit is contained in:
@@ -6,18 +6,39 @@ part 'audit_log_model.g.dart';
|
||||
|
||||
@HiveType(typeId: HiveTypeIds.auditLogModel)
|
||||
class AuditLogModel extends HiveObject {
|
||||
AuditLogModel({required this.logId, required this.userId, required this.action, required this.entityType, required this.entityId, this.oldValue, this.newValue, this.ipAddress, this.userAgent, required this.timestamp});
|
||||
|
||||
@HiveField(0) final int logId;
|
||||
@HiveField(1) final String userId;
|
||||
@HiveField(2) final String action;
|
||||
@HiveField(3) final String entityType;
|
||||
@HiveField(4) final String entityId;
|
||||
@HiveField(5) final String? oldValue;
|
||||
@HiveField(6) final String? newValue;
|
||||
@HiveField(7) final String? ipAddress;
|
||||
@HiveField(8) final String? userAgent;
|
||||
@HiveField(9) final DateTime timestamp;
|
||||
AuditLogModel({
|
||||
required this.logId,
|
||||
required this.userId,
|
||||
required this.action,
|
||||
required this.entityType,
|
||||
required this.entityId,
|
||||
this.oldValue,
|
||||
this.newValue,
|
||||
this.ipAddress,
|
||||
this.userAgent,
|
||||
required this.timestamp,
|
||||
});
|
||||
|
||||
@HiveField(0)
|
||||
final int logId;
|
||||
@HiveField(1)
|
||||
final String userId;
|
||||
@HiveField(2)
|
||||
final String action;
|
||||
@HiveField(3)
|
||||
final String entityType;
|
||||
@HiveField(4)
|
||||
final String entityId;
|
||||
@HiveField(5)
|
||||
final String? oldValue;
|
||||
@HiveField(6)
|
||||
final String? newValue;
|
||||
@HiveField(7)
|
||||
final String? ipAddress;
|
||||
@HiveField(8)
|
||||
final String? userAgent;
|
||||
@HiveField(9)
|
||||
final DateTime timestamp;
|
||||
|
||||
factory AuditLogModel.fromJson(Map<String, dynamic> json) => AuditLogModel(
|
||||
logId: json['log_id'] as int,
|
||||
|
||||
Reference in New Issue
Block a user