Exemplo n.º 1
0
def mailsentall(job_applications_id):
    return send_request(
        'SELECT mail_sent.id, mail_content, date_sent, mail_sent.id_job_application FROM mail_sent INNER JOIN job_applications ON job_applications.id = mail_sent.id_job_application WHERE job_applications.id = %s;',
        job_applications_id)
Exemplo n.º 2
0
def contracts():
    return send_request('SELECT * FROM contract_types;')
Exemplo n.º 3
0
def jobsall():
    return send_request('SELECT * from jobs;')
Exemplo n.º 4
0
def onejobapplicationid(job_applications_id):
    return send_request(
        'SELECT job_applications.id, job_applications.date, id_advertisements, id_users, job_applications.name, job_applications.firstname, job_applications.email, job_applications.phone, message FROM job_applications INNER JOIN advertisement ON advertisement.id = job_applications.id_advertisements INNER JOIN users ON users.id = job_applications.id_users  WHERE job_applications.id = %s;',
        job_applications_id)
Exemplo n.º 5
0
def citiesall():
    return send_request('SELECT * from cities;')
Exemplo n.º 6
0
def onejobapplicationbyadvertisement(advertisement_id):
    return send_request(
        'SELECT job_applications.id, job_applications.date, id_advertisements, id_users FROM job_applications INNER JOIN advertisement ON advertisement.id = job_applications.id_advertisements INNER JOIN users ON users.id = job_applications.id_users  WHERE advertisement.id = %s;',
        advertisement_id)
Exemplo n.º 7
0
def adminjobapplicationsall():
    return send_request(
        'SELECT job_applications.id, job_applications.date, id_advertisements, id_users, job_applications.name, job_applications.firstname, job_applications.email, job_applications.phone, message FROM job_applications INNER JOIN advertisement ON advertisement.id = job_applications.id_advertisements INNER JOIN users ON users.id = job_applications.id_users;'
    )
Exemplo n.º 8
0
def companiesall():
    return send_request(
        'SELECT companies.id, address, description_company, email, name, phone, website, activity, city FROM companies LEFT JOIN cities ON cities.id = companies.id_cities;'
    )
Exemplo n.º 9
0
def usertypesall():
    return send_request('SELECT * from user_types;')
Exemplo n.º 10
0
def onecompany(company_id):
    return send_request(
        'SELECT companies.id, address, description_company, email, name, phone, website, activity, city FROM companies LEFT JOIN cities ON cities.id = companies.id_cities WHERE companies.id = %%s;',
        company_id)
Exemplo n.º 11
0
def usersall():
    return send_request(
        'SELECT users.id, name, firstname, birthday, role, users.phone as user_phone, users.email as users_email, users.address as users_address, password, id_user_types FROM users LEFT JOIN user_types ON user_types.id = users.id_user_types;'
    )
Exemplo n.º 12
0
def registeruser(email):
    return send_request('SELECT id FROM users WHERE email = %s;', email)
Exemplo n.º 13
0
def oneuser(user_id):
    return send_request(
        'SELECT users.id, name, firstname, birthday, users.phone as user_phone, users.email as users_email, users.address as users_address, password FROM users WHERE users.id = %s;',
        user_id)
Exemplo n.º 14
0
def oneadvertisement(ad_id):
    return send_request(
        'SELECT title, advertisement.id, date, description, salary, city, name, type_contract, experience, job_type, worktime FROM advertisement LEFT JOIN cities ON cities.id = advertisement.id_cities LEFT JOIN companies ON companies.id = advertisement.id_companies LEFT JOIN contract_types ON contract_types.id = advertisement.id_contract_types LEFT JOIN jobs ON jobs.id = advertisement.id_jobs WHERE advertisement.id = (%s);',
        ad_id)