Exemplo n.º 1
0
class Tsurat_ket(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    kategori = db.Column(db.String(50), nullable=False)
    keterangan = db.Column(db.String(300), nullable=False)
    tgl_post = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)
    penduduk_id = db.Column(db.Integer, db.ForeignKey('tpenduduk.id'))

    def __repr__(self):
        return f"Tsurat_ket('{self.kategori}', '{self.keterangan}', '{self.tgl_post}')"
Exemplo n.º 2
0
class Tpengaduan(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    subjek = db.Column(db.String(100), nullable=False)
    katagori = db.Column(db.String(50), nullable=False)
    detail_pengaduan = db.Column(db.String(300), nullable=False)
    tgl_post = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)
    mahasiswa_id = db.Column(db.Integer, db.ForeignKey('tmahasiswa.id'))

    def __repr__(self):
        return f"Tpengaduan('{self.subjek}','{self.katagori}','{self.detail_pengaduan}','{self.tgl_post}')"