import { Entity, PrimaryColumn, Column } from "typeorm"; @Entity("cnf_ciudades", { synchronize: false }) export class Ciudad { @PrimaryColumn({ name: "id_ciudad", type: "int" }) id: number; @Column({ name: "ciudad", type: "varchar", length: 50 }) nombre: String; @Column({ name: "cod_pais", type: "varchar", length: 2 }) codPais: String; @Column({ name: "latitud", type: "double" }) latitud: number; @Column({ name: "longitud", type: "double" }) longitud: number; constructor( id: number, nombre: String, cod_pais: String, latitud: number, longitud: number ) { this.id = id; this.nombre = nombre; this.codPais = cod_pais; this.latitud = latitud; this.longitud = longitud; } }