use parquet_derive::ParquetRecordWriter;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
pub struct SourceRating {
pub user: String,
pub asin: String,
pub rating: f32,
pub timestamp: i64,
}
#[derive(Serialize, Deserialize)]
pub struct SourceReview {
#[serde(rename = "reviewerID")]
pub user: String,
pub asin: String,
#[serde(rename = "overall")]
pub rating: f32,
#[serde(rename = "unixReviewTime")]
pub timestamp: i64,
pub summary: Option<String>,
#[serde(rename = "reviewText")]
pub text: Option<String>,
pub verified: bool,
}
#[derive(ParquetRecordWriter, Serialize, Deserialize)]
pub struct RatingRow {
pub user: i32,
pub asin: String,
pub rating: f32,
pub timestamp: i64,
}
#[derive(ParquetRecordWriter, Serialize, Deserialize)]
pub struct ReviewRow {
pub user: i32,
pub asin: String,
pub rating: f32,
pub timestamp: i64,
pub summary: String,
pub text: String,
}