Esempio n. 1
0
class Odeme(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    tutar = db.Column(db.Float, nullable=False)
    create_date = db.Column(db.Date, nullable=False)
    musteri_id = db.Column(db.Integer,
                           db.ForeignKey('musteri.id'),
                           nullable=False)
Esempio n. 2
0
class GuncelOdeme(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    tutar = db.Column(db.Float, nullable=False)
    create_date = db.Column(db.Date, nullable=False)
    siparis_id = db.Column(db.Integer,
                           db.ForeignKey('siparis.id'),
                           nullable=False)
Esempio n. 3
0
class Guncel_Tahsilat(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    tutar = db.Column(db.Float)
    tahsilat_tarihi = db.Column(db.Date)
    aciklama = db.Column(db.String)
    dekont = db.Column(db.String, nullable=True)
    siparis_id = db.Column(db.Integer,
                           db.ForeignKey('siparis.id'),
                           nullable=False)
    durum = db.Column(db.String, nullable=False, default="Onay Bekliyor")
Esempio n. 4
0
class TumMusteriTahsilatlari(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    musteri_adi_crm = db.Column(db.String)
    crm_kodu = db.Column(db.String)
    tahsilat_tutari = db.Column(db.Float)
    durum = db.Column(db.String, nullable=False, default="Onay Bekliyor")
    tahsilat_tarihi = db.Column(db.Date)
    aciklama = db.Column(db.String)
    dekont = db.Column(db.String, nullable=True)
    create_date = db.Column(db.Date, nullable=False, default=datetime.now())
    user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
Esempio n. 5
0
class Tahsilat(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    tutar = db.Column(db.Float, nullable=False)
    durum = db.Column(db.String, nullable=False, default="Onay Bekliyor")
    dekont = db.Column(db.String, nullable=True)
    aciklama = db.Column(db.Text, nullable=True)
    shortcode = db.Column(db.String, nullable=False)
    create_date = db.Column(db.Date, nullable=False, default=datetime.now())
    parasut_id = db.Column(db.String)
    musteri_id = db.Column(db.Integer,
                           db.ForeignKey('musteri.id'),
                           nullable=False)
Esempio n. 6
0
class Musteri(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    isim = db.Column(db.String, nullable=False)
    telefon = db.Column(db.String, nullable=False)
    bakiye = db.Column(db.Float, nullable=False)
    guncel_bakiye = db.Column(db.Float, default=0.0)
    tahsilat = db.Column(db.Float, default=0.0)
    mail = db.Column(db.String)
    parasut_no = db.Column(db.String, nullable=False)
    parasut_odeme_linki = db.Column(db.String)
    tahsilatlar = db.relationship('Tahsilat', backref='musteri', lazy=True)
    odemeler = db.relationship('Odeme', backref='musteri', lazy=True)
    indirimler = db.relationship('Indirim', backref='musteri', lazy='dynamic')
    user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
Esempio n. 7
0
class Siparis(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    proje_no = db.Column(db.String)
    musteri_adi = db.Column(db.String, nullable=False)
    siparis_tutari = db.Column(db.Float, nullable=False)
    son_odeme_tarihi = db.Column(db.Date)
    isin_alinma_tarihi = db.Column(db.Date)
    tahsilat = db.Column(db.Float, default=0)
    onceki_aydan_kalan = db.Column(db.Integer, default=0)
    siparis_son_durum = db.Column(db.String)
    evrak_cikis_tarihi = db.Column(db.Date)
    user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
    tahsilatlar = db.relationship('Guncel_Tahsilat',
                                  backref='siparis',
                                  lazy=True)
    odeme = db.relationship('GuncelOdeme', backref='sipariss', lazy=True)
Esempio n. 8
0
class BlogPost(db.Model):

    users = db.relationship(User)

    id = db.Column(db.Integer, primary_key=True)
    user_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False)

    date = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)
    title = db.Column(db.String(250), nullable=False)
    text = db.Column(db.Text, nullable=False)

    def __init__(self, title, text, user_id):
        self.title = title
        self.text = text
        self.user_id = user_id

    def __repr__(self):
        return f'Post ID: {self.id} -- Date: {self.date} --- {self.title}'
Esempio n. 9
0
class TemsilciOranlari(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
    siparis_date = db.Column(db.Date, nullable=False)
    toplam_siparis_miktari = db.Column(db.Integer, default=0.0)
    toplam_siparis_tahsilati = db.Column(db.Integer, default=0.0)
Esempio n. 10
0
class Indirim(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    indirim_tutari = db.Column(db.Float, nullable=False)
    musteri_id = db.Column(db.Integer, db.ForeignKey('musteri.id'))
    create_date = db.Column(db.Date)