title: Angular 2 models: interface vs classes
body: <p>I have a login/registration module and I want to write a model for them.</p>
  
  <p>I would use interfaces, but I need to have one predefined value.</p>
  
  <p>And I was wondering - should I put the predefined out as a constant (it won't be changed, altered) and use interfaces. Or write it as classes (as currently)</p>
  
  <p>Currently, I wrote two separate classes - registration.model.ts, login.model.ts, could I be able to abstract to use only one model? (example: user.model.ts)</p>
  
  <p>Some examples:</p>
  
  <pre><code>export class LoginUser {
    constructor(
      private email,
      private password,
  
      // I need to have it, backend expects it to be sent
      private connection = 'Username-Password-Authentication'  
    ) { }
  } 
  
  
  export class RegistrateUser {
    constructor(
      public name: string,
      public lastName: string,
      public email: string,
      public password: string,
  
      // I need to have it, backend expects it to be sent
      private connection = 'Username-Password-Authentication'
    ) { }
  }
  </code></pre>