export interface Resource {
  idResource?: string;
  resourceName?: string;
  description?: string;
  descriptionNative?:string;
  links?:Link[];
  youtube?:string
  files?:any[];
  resourceOrigin?: string;
  resourceType?: ResourceType;
  sectors?: Sector[];
  regions?: Region[];
  crops?:Crop[];
  pests?:Pest[];
  language?: Language;
  project?: Project;
  projectWeb?: string;
  projectGrantNo?:string;
  contactInstitution?: string;
  contactEmail?: string;
  contactPhone?: string;
  canEdit?:boolean;
  citation?:string;
  creationDate?:Date;
  approved?:boolean;
  external?:boolean;
  hide?:boolean;
}

export class Link{
  name?:string;
  url?:string;
}
export class Crop{
  public idCrop?:string;
  public commonName?: string;
  public latinName?:string;
  public eppo?:string;
}
export class Pest{
  public idPest?:string;
  public commonName?: string;
  public latinName?:string;
  public eppo?:string;
}
export class ResourceType{
  public idResourceType!:string;
  public name!: string;
}
export class Sector{
  public idSector!: string;
  public name!: string;
  public name_sr!: string;
  public sectorIcon!:string;

}
export class Region{
  public idRegion!: string;
  public name!: string;
  public code!:string;


}
export class Language{
  public idLanguage!: string;
  public name!: string;
  public code!:string;
}
export class Project{
  public idProject!: string;
  public name!: string;
  public description!: string;
}
export class Keyword{
  public idKeyword!: string;
  public name!: string;
}
export class FileDesc{
  public fileIdentifier?: string;
  public description?: string;
}
export class PageableResource {
  content?: Resource[] = [];
  empty?: boolean;
  first?: boolean;
  last?: boolean;
  number?: number = 0;
  numberOfElements?: number;
  pageable?: any;
  size?: number = 0;
  sort?: any;
  totalElements: number|undefined;
  totalPages?: number =0;
}
export class Comment{
  public text?: string;
  public commenterEmail?: string;
}
