GithubCompareModel constructor

  1. @JsonSerializable.new(explicitToJson: true)
const GithubCompareModel({
  1. String? status,
  2. @Default.new(0) int aheadBy,
  3. @Default.new(0) int behindBy,
  4. @Default.new(0) int totalCommits,
  5. @jsonParam GithubCommitModel? mergeBaseCommit,
  6. @jsonParam GithubCommitModel? baseCommit,
  7. @jsonParam @Default.new([]) List<GithubCommitModel> commits,
  8. ModelUri? diffUrl,
  9. ModelUri? patchUrl,
  10. ModelUri? htmlUrl,
  11. ModelUri? permalinkUrl,
  12. @Default.new(false) bool fromServer,
})

Model for managing Github branch comparisons.

Githubのブランチ比較を管理するためのモデル。

Implementation

@JsonSerializable(explicitToJson: true)
const factory GithubCompareModel({
  /// Comparison status (behind, ahead, identical, diverged)
  String? status,

  /// How many commits ahead
  @Default(0) int aheadBy,

  /// How many commits behind
  @Default(0) int behindBy,

  /// Total commits in comparison
  @Default(0) int totalCommits,

  /// Merge base commit (divergence point)
  @jsonParam GithubCommitModel? mergeBaseCommit,

  /// Base commit
  @jsonParam GithubCommitModel? baseCommit,

  /// Commits in the comparison
  @jsonParam @Default([]) List<GithubCommitModel> commits,

  /// URL for diff
  ModelUri? diffUrl,

  /// URL for patch
  ModelUri? patchUrl,

  /// HTML URL
  ModelUri? htmlUrl,

  /// Permalink URL
  ModelUri? permalinkUrl,
  @Default(false) bool fromServer,
}) = _GithubCompareModel;