class Log {
  final int id;
  final String username;
  final String action;
  final DateTime datetime;
  
  Log({
    required this.id,
    required this.username,
    required this.action,
    required this.datetime,
  });
  
  factory Log.fromMap(Map<String, dynamic> map) {
    return Log(
      id: map['id'],
      username: map['username'],
      action: map['action'],
      datetime: map['datetime'] as DateTime,
    );
  }
}