export interface IMagento2Block {
  id: number,
  identifier: string,
  title: string,
  content: string|JQLite,
  creation_time: Date,
  update_time: Date,
  active: boolean
}

export class Magento2Block implements IMagento2Block {
  id: number;
  identifier: string;
  title: string;
  content: string|JQLite;
  creation_time: Date;
  update_time: Date;
  active: boolean;

  constructor(obj: IMagento2Block) {
    this.id = Number(obj.id);
    this.identifier = obj.identifier;
    this.title = obj.title;
    this.content = obj.content;
    this.creation_time = new Date(obj.creation_time);
    this.update_time = new Date(obj.update_time);
    this.active = obj.active;
  }
}
