import 'package:json_annotation/json_annotation.dart';

part 'job_note_taking_trajectory.g.dart';

@JsonSerializable()
class JobNoteTakingTrajectory extends Object {
  @JsonKey(name: 'lattices')
  List<Lattices> lattices;

  @JsonKey(name: 'paperPicture')
  String paperPicture;

  @JsonKey(name: 'resetTime')
  int? resetTime;

  @JsonKey(name: 'pictureQuestionTop')
  double pictureQuestionTop;

  @JsonKey(name: 'pictureQuestionHeight')
  double pictureQuestionHeight;

  JobNoteTakingTrajectory(
      this.lattices, this.paperPicture, this.resetTime, this.pictureQuestionHeight, this.pictureQuestionTop);

  factory JobNoteTakingTrajectory.fromJson(Map<String, dynamic> srcJson) => _$JobNoteTakingTrajectoryFromJson(srcJson);

  Map<String, dynamic> toJson() => _$JobNoteTakingTrajectoryToJson(this);
}

@JsonSerializable()
class Lattices extends Object {
  @JsonKey(name: 'stroke')
  int stroke;

  @JsonKey(name: 'x')
  double x;

  @JsonKey(name: 'y')
  double y;

  @JsonKey(name: 'time')
  double time;

  Lattices(
    this.stroke,
    this.x,
    this.y,
    this.time,
  );

  factory Lattices.fromJson(Map<String, dynamic> srcJson) => _$LatticesFromJson(srcJson);

  Map<String, dynamic> toJson() => _$LatticesToJson(this);
}
