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