Compare commits
5 Commits
a8b747f1ef
...
bf94b9c04c
Author | SHA1 | Date |
---|---|---|
bitfl0wer | bf94b9c04c | |
bitfl0wer | f31c7298d8 | |
bitfl0wer | 28154c3c53 | |
bitfl0wer | 3fed76bb99 | |
bitfl0wer | a561b61321 |
|
@ -171,6 +171,8 @@ fn compare_permission_overwrites(
|
|||
///
|
||||
/// # Reference
|
||||
/// See <https://discord-userdoccers.vercel.app/resources/channel#forum-tag-object>
|
||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow, sqlx::Type))]
|
||||
#[cfg_attr(feature = "sqlx", sqlx(type_name = "interface_type"))]
|
||||
pub struct Tag {
|
||||
pub id: Snowflake,
|
||||
/// The name of the tag (max 20 characters)
|
||||
|
@ -317,6 +319,8 @@ impl PartialEq for ThreadMember {
|
|||
///
|
||||
/// # Reference
|
||||
/// See <https://discord-userdoccers.vercel.app/resources/channel#default-reaction-object>
|
||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow, sqlx::Type))]
|
||||
#[cfg_attr(feature = "sqlx", sqlx(type_name = "interface_type"))]
|
||||
pub struct DefaultReaction {
|
||||
#[serde(default)]
|
||||
pub emoji_id: Option<Snowflake>,
|
||||
|
|
|
@ -130,7 +130,8 @@ impl Default for UserSettings {
|
|||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow, sqlx::Type))]
|
||||
#[cfg_attr(feature = "sqlx", sqlx(type_name = "interface_type"))]
|
||||
pub struct CustomStatus {
|
||||
pub emoji_id: Option<String>,
|
||||
pub emoji_name: Option<String>,
|
||||
|
@ -140,7 +141,7 @@ pub struct CustomStatus {
|
|||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Copy, PartialOrd, Ord, Hash)]
|
||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow, sqlx::Type))]
|
||||
pub struct FriendSourceFlags {
|
||||
pub all: bool,
|
||||
}
|
||||
|
@ -152,7 +153,8 @@ impl Default for FriendSourceFlags {
|
|||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow, sqlx::Type))]
|
||||
#[cfg_attr(feature = "sqlx", sqlx(type_name = "interface_type"))]
|
||||
pub struct GuildFolder {
|
||||
#[cfg(not(feature = "sqlx"))]
|
||||
pub color: Option<u32>,
|
||||
|
|
|
@ -102,6 +102,13 @@ impl sqlx::Type<sqlx::Postgres> for Snowflake {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "sqlx")]
|
||||
impl sqlx::postgres::PgHasArrayType for Snowflake {
|
||||
fn array_type_info() -> sqlx::postgres::PgTypeInfo {
|
||||
<Vec<String> as sqlx::Type<sqlx::Postgres>>::type_info()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "sqlx")]
|
||||
impl<'q> sqlx::Encode<'q, sqlx::Postgres> for Snowflake {
|
||||
fn encode_by_ref(
|
||||
|
|
Loading…
Reference in New Issue