コード例 #1
0
class messages(database.Model):
    __tablename__ = 'messages'
    Id = database.Column('Id', database.Integer, primary_key=True)
    Lastname = database.Column(database.String(100))
    Firstname = database.Column(database.String(100))
    Email = database.Column(database.String(100))
    Message = database.Column(database.String(100))
    Subject = database.Column(database.String(100))
    Date_sent = database.Column(database.DateTime(timezone=True),
                                default=datetime.datetime.now())

    def __init__(self, message, firstname, lastname, email, subject):
        self.Lastname = lastname
        self.Firstname = firstname
        self.Subject = subject
        self.Email = email
        self.Message = message
コード例 #2
0
class Users(database.Model):
    __tablename__ = 'perfect_trade_users'
    Id = database.Column('Id', database.Integer, primary_key=True)
    Lastname = database.Column(database.String(100))
    Firstname = database.Column(database.String(100))
    Email = database.Column(database.String(100))
    Password = database.Column(database.String(100))
    Customer_ID = database.Column(database.String(100))
    Date_Registered = database.Column(database.DateTime(timezone=True),
                                      default=datetime.datetime.now())

    def __init__(self, firstname, lastname, email, password, cus_id):
        self.Lastname = lastname
        self.Firstname = firstname
        self.Customer_ID = cus_id
        self.Email = email
        self.Password = password
コード例 #3
0
class investments(database.Model):
    __tablename__ = 'investments'

    Id = database.Column('Id', database.Integer, primary_key=True)
    Name = database.Column(database.String(100))
    Email = database.Column(database.String(100))
    Duration_Days = database.Column(database.Integer)
    Date_Invested = database.Column(database.DateTime(timezone=True),
                                    default=datetime.datetime.now())
    Amount = database.Column(database.Integer)
    Amount_Recieved = database.Column(database.Integer)
    Payment_Status = database.Column(database.String(100))
    Status = database.Column(database.String(100))
    Plan = database.Column(database.String(100))
    Percentage = database.Column(database.Integer)
    Currency = database.Column(database.Integer)
    Date_Of_Returns = database.Column(database.Date)

    def __init__(self,
                 name,
                 end,
                 percent,
                 currency,
                 amt,
                 amt_returned,
                 email,
                 plan,
                 duration,
                 status='Ongoing',
                 start=datetime.datetime.now()):
        self.Name = name
        self.Status = status
        self.Date_Invested = start
        self.Date_Of_Returns = end
        self.Amount = amt
        self.Amount_Recieved = amt_returned
        self.Duration_Days = duration
        self.Email = email
        self.Plan = plan
        self.Currency = currency
        self.Duration_in_Days = duration
        self.Percentage = percent
コード例 #4
0
class Promo(database.Model):
    __tablename__ = 'promos'

    Id = database.Column('Id', database.Integer, primary_key=True)
    Promo_Name = database.Column(database.String(100))
    Date_to_End = database.Column(database.Date)
    Duration_in_Days = database.Column(database.Integer)
    Date_Started = database.Column(database.DateTime(timezone=True),
                                   default=datetime.datetime.now())
    Status = database.Column(database.String(100))
    Description = database.Column(database.String(100))
    Short_Description = database.Column(database.String(100))

    def __init__(self, name, end, des, short_desc, duration, status='Ongoing'):
        self.Promo_Name = name
        self.Status = status
        self.Date_Started = datetime.datetime.now()
        self.Date_to_End = end
        self.Description = desc
        self.Duration_in_Days = duration
        self.Short_Description = short_desc
コード例 #5
0
class withdrawals(database.Model):
    __tablename__ = 'withrawals'

    Id = database.Column('Id', database.Integer, primary_key=True)
    Name = database.Column(database.String(100))
    Email = database.Column(database.String(100))
    Status = database.Column(database.String(100))
    Amount = database.Column(database.Integer)
    Currency = database.Column(database.String(100))
    Date = database.Column(database.DateTime(timezone=True),
                           default=datetime.datetime.now())

    def __init__(self,
                 name,
                 email,
                 acc_no,
                 currency,
                 date=datetime.datetime.now()):
        self.Name = name
        self.Email = email
        self.Status = 'Pending'
        self.Amount = acc_no
        self.Currency = currency
        self.Date = date