BaseLog(this.type, [Json? json]) { if (json != null) { time = DateTime.parse(json['time']); orderId = json['orderId']; } else { time = DateTime.now(); orderId = ++BaseLog.count; } }