|
@@ -1,23 +1,14 @@
|
|
|
export class Noticia {
|
|
|
- id: string;
|
|
|
- titulo: string;
|
|
|
- introduccion: string;
|
|
|
- descripcion: string;
|
|
|
- fecha: string;
|
|
|
- foto: string;
|
|
|
- categoria: string;
|
|
|
+ id: string | undefined;
|
|
|
+ titulo: string | undefined;
|
|
|
+ introduccion: string | undefined;
|
|
|
+ descripcion: string | undefined;
|
|
|
+ fecha: string | undefined;
|
|
|
+ foto: string | undefined;
|
|
|
+ categoria: string | undefined;
|
|
|
|
|
|
constructor(json?: Partial<Noticia>) {
|
|
|
- this.id = "";
|
|
|
- this.titulo = "";
|
|
|
- this.introduccion = "";
|
|
|
- this.descripcion = "";
|
|
|
- this.fecha = "";
|
|
|
- this.foto = "";
|
|
|
- this.categoria = "";
|
|
|
- if (json !== null) {
|
|
|
Object.assign(this, json);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
static fromJson(json: Partial<Noticia>) {
|