'use strict';

const User = require('./User-286a0714.js');

class BaseModel {
}

class Workspace extends BaseModel {
  static decode(json) {
    return Object.assign(Object.create(Workspace.prototype), json);
  }
}

class Product extends BaseModel {
  static decode(json) {
    const item = Object.assign(Object.create(Product.prototype), json);
    if (item.user)
      item.user = User.User.decode(item.user);
    if (item.workspace)
      item.workspace = Workspace.decode(item.workspace);
    return item;
  }
}

exports.BaseModel = BaseModel;
exports.Product = Product;
exports.Workspace = Workspace;
