import { IAPIRefStatus } from '../lib/api'
import { GitHubRepository } from './github-repository'

export class PullRequestRef {
  public readonly ref: string
  public readonly sha: string
  public readonly gitHubRepository: GitHubRepository

  public constructor(
    ref: string,
    sha: string,
    gitHubRepository: GitHubRepository
  ) {
    this.ref = ref
    this.sha = sha
    this.gitHubRepository = gitHubRepository
  }
}

export class PullRequest {
  public readonly id: number
  public readonly created: Date
  public readonly status: IAPIRefStatus
  public readonly title: string
  public readonly number: number
  public readonly head: PullRequestRef
  public readonly base: PullRequestRef
  public readonly author: string

  public constructor(
    id: number,
    created: Date,
    status: IAPIRefStatus,
    title: string,
    number_: number,
    head: PullRequestRef,
    base: PullRequestRef,
    author: string
  ) {
    this.id = id
    this.created = created
    this.status = status
    this.title = title
    this.number = number_
    this.head = head
    this.base = base
    this.author = author
  }
}

import { IAPIRefStatus } from '../lib/api'
import { GitHubRepository } from './github-repository'

export class PullRequestRef {
  public readonly ref: string
  public readonly sha: string
  public readonly gitHubRepository: GitHubRepository

  public constructor(
    ref: string,
    sha: string,
    gitHubRepository: GitHubRepository
  ) {
    this.ref = ref
    this.sha = sha
    this.gitHubRepository = gitHubRepository
  }
}

export class PullRequest {
  public readonly created: Date
  public readonly status: IAPIRefStatus
  public readonly title: string
  public readonly number: number
  public readonly head: PullRequestRef
  public readonly base: PullRequestRef
  public readonly author: string

  public constructor(
    created: Date,
    status: IAPIRefStatus,
    title: string,
    number_: number,
    head: PullRequestRef,
    base: PullRequestRef,
    author: string
  ) {
    this.created = created
    this.status = status
    this.title = title
    this.number = number_
    this.head = head
    this.base = base
    this.author = author
  }
}

--- 
+++ 
@@ -18,6 +18,7 @@
 }
 
 export class PullRequest {
+  public readonly id: number
   public readonly created: Date
   public readonly status: IAPIRefStatus
   public readonly title: string
@@ -27,6 +28,7 @@
   public readonly author: string
 
   public constructor(
+    id: number,
     created: Date,
     status: IAPIRefStatus,
     title: string,
@@ -35,6 +37,7 @@
     base: PullRequestRef,
     author: string
   ) {
+    this.id = id
     this.created = created
     this.status = status
     this.title = title
Add id to pr model
