//! Aggregated contact (one or more raw_contacts believed to describe the
//! same person). v1 aggregation is trivial — one raw_contact per contact.

#[ derive( Debug, Clone, PartialEq, Eq ) ]
pub struct Contact
{
	pub id: i64,
	pub display_name: Option<String>,
	pub photo_id: Option<i64>,
	pub times_contacted: i64,
	pub last_time_contacted: Option<i64>,
	pub starred: bool,
	pub custom_ringtone: Option<String>,
	pub send_to_voicemail: bool,
	pub created_at: i64,
	pub updated_at: i64,
}

#[ derive( Debug, Clone, Default ) ]
pub struct ContactPatch
{
	pub display_name: Option<String>,
	pub photo_id: Option<i64>,
	pub starred: Option<bool>,
	pub custom_ringtone: Option<String>,
	pub send_to_voicemail: Option<bool>,
	pub times_contacted: Option<i64>,
	pub last_time_contacted: Option<i64>,
}

/// A contact plus its primary phone, assembled in one query for list views
/// that would otherwise need a round-trip per contact to fetch the number.
#[ derive( Debug, Clone ) ]
pub struct ContactSummary
{
	pub id: i64,
	pub display_name: Option<String>,
	pub photo_id: Option<i64>,
	pub starred: bool,
	pub number: Option<String>,
	pub phone_type: Option<i32>,
	pub phone_label: Option<String>,
}
