// This base model was auto-generated by export_app
// PLEASE DO NOT EDIT
// you can make changes in app/models/{{application_name}}/{{model_name}}.js
// or regenerate this file by running
// `./manage.py export{%if target_app %} --target_app {{target_app}}{% endif %} {{endpoint}}`
export default class {{application_name|title}}{{model_name|title}}Base {
  id:string;
  {% for field in fields %}
    {{field.name}}{% if field.type %}:{{field.type}}{% endif %};
  {% endfor %}
  {% for field in rels %}
    {{field.name}}:string{% if field.type == 'hasMany' %}[]{% endif %};
  {% endfor %}

  constructor(json:any) {
    if (json) {
      this.id = json.id;
      {% for field in fields %}
        this.{{field.name}} = json.{{field.name}};
      {% endfor %}
      {% for field in rels %}
        this.{{field.name}} = json.{{field.name}};
      {% endfor %}
    }
  }
}
