add asignatura list

This commit is contained in:
2019-07-16 10:40:44 -04:00
parent dd99fe116b
commit cfd4e9ccff
12 changed files with 919 additions and 39 deletions

15
src/db/asignatura.vala Normal file
View File

@@ -0,0 +1,15 @@
namespace Colegio {
namespace DB {
public class Asignatura : Object {
public int id_asignatura { get; set; default = 0; }
public string nombre { get; set; default = ""; }
public Profesor profesor { get; set; default = new Profesor(); }
public Asignatura (int id_asignatura = 0, string nombre = "", Profesor profesor = new Profesor()) {
this.id_asignatura = id_asignatura;
this.nombre = nombre;
this.profesor = profesor;
}
}
}
}

15
src/db/ciudad.vala Normal file
View File

@@ -0,0 +1,15 @@
namespace Colegio {
namespace DB {
public class Ciudad : Object {
public int id_ciudad { get; set; default = 0; }
public string nombre_ciudad { get; set; default = ""; }
public Region region { get; set; default = new Region(); }
public Ciudad (int id_ciudad = 0, string nombre_ciudad = "", Region region = new Region()) {
this.id_ciudad = id_ciudad;
this.nombre_ciudad = nombre_ciudad;
this.region = region;
}
}
}
}

19
src/db/profesor.vala Normal file
View File

@@ -0,0 +1,19 @@
namespace Colegio {
namespace DB {
public class Profesor : Object {
public string rut_profesor { get; set; default = ""; }
public string nombres { get; set; default = ""; }
public string apellidos { get; set; default = ""; }
public string direcion { get; set; default = ""; }
public Ciudad ciudad { get; set; default = new Ciudad(); }
public Profesor (string rut_profesor = "", string nombres = "", string apellidos = "", string direcion = "", Ciudad ciudad = new Ciudad()) {
this.rut_profesor = rut_profesor;
this.nombres = nombres;
this.apellidos = apellidos;
this.direcion = direcion;
this.ciudad = ciudad;
}
}
}
}

13
src/db/region.vala Normal file
View File

@@ -0,0 +1,13 @@
namespace Colegio {
namespace DB {
public class Region : Object {
public int id_region { get; set; default = 0; }
public string nombre_region { get; set; default = ""; }
public Region (int id_region = 0, string nombre_region = "") {
this.id_region = id_region;
this.nombre_region = nombre_region;
}
}
}
}