Kibou is a federated social networking server.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

models.rs 996B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. use chrono::NaiveDateTime;
  2. use database::schema::actors;
  3. use database::schema::activities;
  4. #[derive(Queryable, PartialEq, QueryableByName, Clone)]
  5. #[table_name="activities"]
  6. pub struct QueryActivity
  7. {
  8. pub id: i64,
  9. pub data: serde_json::Value,
  10. pub created: NaiveDateTime,
  11. pub modified: NaiveDateTime,
  12. pub actor_uri: String,
  13. }
  14. #[derive(Insertable)]
  15. #[table_name="activities"]
  16. pub struct InsertActivity<'a> {
  17. pub data: &'a serde_json::Value,
  18. pub actor_uri: &'a String,
  19. }
  20. #[derive(Queryable, PartialEq, QueryableByName, Clone)]
  21. #[table_name="actors"]
  22. pub struct QueryActor
  23. {
  24. pub id: i64,
  25. pub email: Option<String>,
  26. pub password: Option<String>,
  27. pub actor_uri: String,
  28. pub username: Option<String>,
  29. pub preferred_username: String,
  30. pub summary: Option<String>,
  31. pub inbox: Option<String>,
  32. pub icon: Option<String>,
  33. pub keys: serde_json::Value,
  34. pub created: NaiveDateTime,
  35. pub modified: NaiveDateTime,
  36. pub local: bool,
  37. }