class Data(BaseModel): __tablename__ = 'data' id = db.Column(db.Integer, primary_key=True, autoincrement=True) data = db.Column(JSONB) fk_region_id = db.Column(db.String, db.ForeignKey('regions.id')) region = db.relationship('Region', lazy='joined') __table_args__ = ( db.Index('data_ix_fk_region_id', 'fk_region_id'), db.Index('data_ix_data', 'data', postgresql_using='gin') )
class Layout(BaseModel): __tablename__ = 'layouts' id = db.Column(db.Integer, primary_key=True, autoincrement=True) data = db.Column(JSONB) fk_region_id = db.Column(db.String, db.ForeignKey('regions.id')) region = db.relationship('Region', lazy='joined') __table_args__ = ( db.Index('lay_ix_fk_region_id', 'fk_region_id'), db.Index('lay_ix_data', 'data'), )
class Apbdes(BaseModel): __tablename__ = 'apbdes' id = db.Column(db.Integer, primary_key=True, autoincrement=True) budgeted_revenue = db.Column(db.DECIMAL) transferred_revenue = db.Column(db.DECIMAL) budgeted_spending = db.Column(db.DECIMAL) realized_spending = db.Column(db.DECIMAL) year = db.Column(db.String, nullable=False) fk_region_id = db.Column(db.String, db.ForeignKey('regions.id')) region = db.relationship('Region', lazy='joined') __table_args__ = (db.Index('apbdes_ix_fk_region_id', 'fk_region_id'), )
class Summary(BaseModel): __tablename__ = 'summaries' id = db.Column(db.Integer, primary_key=True, autoincrement=True) penduduk_sex_male = db.Column(db.Integer, nullable=True) penduduk_sex_female = db.Column(db.Integer, nullable=True) penduduk_sex_unknown = db.Column(db.Integer, nullable=True) penduduk_edu_none = db.Column(db.Integer, nullable=True) penduduk_edu_sd = db.Column(db.Integer, nullable=True) penduduk_edu_smp = db.Column(db.Integer, nullable=True) penduduk_edu_sma = db.Column(db.Integer, nullable=True) penduduk_edu_pt = db.Column(db.Integer, nullable=True) penduduk_job_petani = db.Column(db.Integer, nullable=True) penduduk_job_pedagang = db.Column(db.Integer, nullable=True) penduduk_job_karyawan = db.Column(db.Integer, nullable=True) penduduk_job_nelayan = db.Column(db.Integer, nullable=True) penduduk_job_lain = db.Column(db.Integer, nullable=True) penganggaran_budgeted_revenue = db.Column(db.DECIMAL, nullable=True) penganggaran_year = db.Column(db.String, nullable=True) pemetaan_desa_boundary = db.Column(db.DECIMAL, nullable=True) pemetaan_desa_circumference = db.Column(db.DECIMAL, nullable=True) pemetaan_dusun_total = db.Column(db.Integer, nullable=True) pemetaan_landuse_farmland = db.Column(db.Integer, nullable=True) pemetaan_landuse_forest = db.Column(db.Integer, nullable=True) pemetaan_landuse_orchard = db.Column(db.Integer, nullable=True) pemetaan_landuse_farmland_area = db.Column(db.DECIMAL, nullable=True) pemetaan_landuse_forest_area = db.Column(db.DECIMAL, nullable=True) pemetaan_landuse_orchard_area = db.Column(db.DECIMAL, nullable=True) pemetaan_school_tk = db.Column(db.Integer, nullable=True) pemetaan_school_sd = db.Column(db.Integer, nullable=True) pemetaan_school_smp = db.Column(db.Integer, nullable=True) pemetaan_school_sma = db.Column(db.Integer, nullable=True) pemetaan_school_pt = db.Column(db.Integer, nullable=True) pemetaan_highway_asphalt_length = db.Column(db.DECIMAL, nullable=True) pemetaan_highway_concrete_length = db.Column(db.DECIMAL, nullable=True) pemetaan_highway_other_length = db.Column(db.DECIMAL, nullable=True) pemetaan_bridge_length = db.Column(db.DECIMAL, nullable=True) supradesa_code = db.Column(db.String, nullable=True) fk_region_id = db.Column(db.String, db.ForeignKey('regions.id')) region = db.relationship('Region', lazy='joined') __table_args__ = (db.Index('summaries_ix_fk_region_id', 'fk_region_id'), db.Index('summaries_ix_supradesa_code', 'supradesa_code', postgresql_using='btree'))
class Penduduk(BaseModel): __tablename__ = 'penduduks' pid = db.Column(db.Integer, primary_key=True, autoincrement=True) id = db.Column(db.String) nik = db.Column(db.String) nama_penduduk = db.Column(db.String) jenis_kelamin = db.Column(db.String) tempat_lahir = db.Column(db.String) tanggal_lahir = db.Column(db.Date) status_kawin = db.Column(db.String) agama = db.Column(db.String) golongan_darah = db.Column(db.String) kewarganegaraan = db.Column(db.String) no_kk = db.Column(db.String) nama_ayah = db.Column(db.String) nama_ibu = db.Column(db.String) hubungan_keluarga = db.Column(db.String) nama_dusun = db.Column(db.String) rw = db.Column(db.String) rt = db.Column(db.String) alamat_jalan = db.Column(db.String) no_telepon = db.Column(db.String) email = db.Column(db.String) no_akta = db.Column(db.String) no_kitas = db.Column(db.String) no_paspor = db.Column(db.String) pendidikan = db.Column(db.String) pekerjaan = db.Column(db.String) etnis_suku = db.Column(db.String) status_tinggal = db.Column(db.String) akseptor_kb = db.Column(db.String) cacat_fisik = db.Column(db.String) cacat_mental = db.Column(db.String) wajib_pajak = db.Column(db.String) lembaga_pemerintahan = db.Column(db.String) lembaga_kemasyarakatan = db.Column(db.String) lembaga_ekonomi = db.Column(db.String) fk_region_id = db.Column(db.String, db.ForeignKey('regions.id')) region = db.relationship('Region', lazy='joined') __table_args__ = ( db.Index('penduduks_ix_fk_region_id', 'fk_region_id'), )
class Region(BaseModel): __tablename__ = 'regions' id = db.Column(db.String, primary_key=True) desa_id = db.Column(db.Integer) siskeudes_code = db.Column(db.String) name = db.Column(db.Text) type = db.Column(db.Integer, nullable=False, default=False) domain = db.Column(db.Text) is_kelurahan = db.Column(db.Boolean, nullable=False, default=False) is_in_scope = db.Column(db.Boolean, nullable=False, default=False) is_lokpri = db.Column(db.Boolean, nullable=False, default=False) fk_parent_id = db.Column(db.String, db.ForeignKey('regions.id')) parent = db.relationship('Region', remote_side=[id], lazy='joined') __table_args__ = ( db.Index('regions_ix_fk_parent_id', 'fk_parent_id'), db.Index('regions_ix_id_is_lokpri', 'id', 'is_lokpri'), db.Index('regions_ix_is_lokpri', 'is_lokpri'), )