Esempio n. 1
0
def sign_up(user):
    statement = """INSERT INTO UserAccount (UserID, FullName, Username, Password, Email, Phone, UserPrivilege, BankName, BankAccount, IdentityCardNumber, ProfileImage) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"""
    token = validate_user(user)
    value = user.user_id, user.fullname, user.username, user.password, user.email, user.phone, user.privilege, user.bank_name, user.bank_account, user.identity_card, user.image
    if token[0] is True:
        token = Post.create(statement=statement, value=value)
    return (token, "User Registered Successfully!") if token is True else (
        False, "Unable to Registered User!")
Esempio n. 2
0
def register_Property(value):
    statement = """INSERT INTO BaseProperty (PropertyUID, Price, PropertyType, YearBuilt, TenureType, Bedroom, Bathroom, ExtraRoom, Parking, Size, FloorPlan, Unit, Area, Street, District, State, Postcode, Township) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"""
    token = Post.create(statement=statement, value=value)
    return token
Esempio n. 3
0
def owned(value):
    statement = """INSERT INTO BaseProperty (PropertyUID, Price, PropertyType, YearBuilt, TenureType, Bedroom, Bathroom, ExtraRoom, Parking, Size, FloorPlan, Unit, Area, Street, District, State, Postcode, Township, Contract, ContactPeriod, RentID, OwnershipID, RentPrice, SellPrice, Images, RentalStartDate, RentalEndDate, RentalPeriod, Description, LastUpdatedDate, RentContract, SellContract) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"""
    token = Post.create(statement=statement, value=value)
    return token
Esempio n. 4
0
def request(value):
    statement = """INSERT INTO Request (RequestDate, RequestStatus, RequestType, RentalStartDate, RentalPeriod, UserID, PropertyID) VALUES (?, ?, ?, ?, ?, ?, ?)"""
    token = Post.create(statement=statement, value=value)
    return token
Esempio n. 5
0
def create(value):
    statement = """INSERT INTO Billing (IssuedDate, BillingType, BillingAmount, PaymentDate, PropertyID) VALUES (?, ?, ?, ?, ?)"""
    token = Post.create(statement=statement, value=value)
    return token