diff --git a/crates/db/src/models/professional.rs b/crates/db/src/models/professional.rs index 022c760..74ab5b6 100644 --- a/crates/db/src/models/professional.rs +++ b/crates/db/src/models/professional.rs @@ -110,7 +110,7 @@ pub struct ProfessionalRepository; impl ProfessionalRepository { pub async fn get_by_user_id(pool: &PgPool, user_id: Uuid) -> Result { sqlx::query_as::<_, Professional>( - "SELECT id, user_id, role_key as profession_key, status, created_at, updated_at FROM user_role_profiles WHERE user_id = $1 AND role_key != 'CUSTOMER' AND role_key != 'COMPANY'", + "SELECT id, user_id, role_key, status, created_at, updated_at FROM user_role_profiles WHERE user_id = $1 AND role_key != 'CUSTOMER' AND role_key != 'COMPANY'", ) .bind(user_id) .fetch_one(pool) @@ -556,7 +556,7 @@ impl ProfessionalRepository { profession_key: &str, ) -> Result { let prof = sqlx::query_as::<_, Professional>( - "SELECT id, user_id, role_key as profession_key, status, created_at, updated_at FROM user_role_profiles WHERE user_id = $1 AND role_key = $2", + "SELECT id, user_id, role_key, status, created_at, updated_at FROM user_role_profiles WHERE user_id = $1 AND role_key = $2", ) .bind(user_id) .bind(profession_key) @@ -572,7 +572,7 @@ impl ProfessionalRepository { UPDATE user_role_profiles SET status = 'PENDING_REVIEW', updated_at = NOW() WHERE user_id = $1 AND role_key = $2 - RETURNING id, user_id, role_key as profession_key, status, created_at, updated_at + RETURNING id, user_id, role_key, status, created_at, updated_at "#, ) .bind(user_id)