Rust AppView - highly experimental!
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore(parakeet-db): finally remove the New* models we're not using

-373
-373
parakeet-db/src/models.rs
··· 16 16 pub last_indexed: Option<NaiveDateTime>, 17 17 } 18 18 19 - #[derive(Insertable, AsChangeset)] 20 - #[diesel(table_name = crate::schema::actors)] 21 - #[diesel(check_for_backend(diesel::pg::Pg))] 22 - pub struct NewActor<'a> { 23 - pub did: &'a str, 24 - pub handle: Option<Option<String>>, 25 - pub status: Option<ActorStatus>, 26 - pub sync_state: Option<ActorSyncState>, 27 - pub last_indexed: Option<NaiveDateTime>, 28 - } 29 - 30 - #[derive(Insertable)] 31 - #[diesel(table_name = crate::schema::blocks)] 32 - #[diesel(check_for_backend(diesel::pg::Pg))] 33 - pub struct NewBlock<'a> { 34 - pub rkey: &'a str, 35 - pub did: &'a str, 36 - pub subject: &'a str, 37 - pub created_at: NaiveDateTime, 38 - } 39 - 40 - #[derive(Insertable)] 41 - #[diesel(table_name = crate::schema::follows)] 42 - #[diesel(check_for_backend(diesel::pg::Pg))] 43 - pub struct NewFollow<'a> { 44 - pub rkey: &'a str, 45 - pub did: &'a str, 46 - pub subject: &'a str, 47 - pub created_at: NaiveDateTime, 48 - } 49 - 50 19 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 51 20 #[diesel(table_name = crate::schema::profiles)] 52 21 #[diesel(primary_key(did))] ··· 71 40 pub indexed_at: NaiveDateTime, 72 41 } 73 42 74 - #[derive(Insertable, AsChangeset)] 75 - #[diesel(table_name = crate::schema::profiles)] 76 - #[diesel(check_for_backend(diesel::pg::Pg))] 77 - #[diesel(treat_none_as_null = true)] 78 - pub struct UpsertProfile<'a> { 79 - pub did: &'a str, 80 - pub cid: String, 81 - 82 - pub avatar_cid: Option<String>, 83 - pub banner_cid: Option<String>, 84 - 85 - pub display_name: Option<String>, 86 - pub description: Option<String>, 87 - 88 - pub pinned_uri: Option<String>, 89 - pub pinned_cid: Option<String>, 90 - 91 - pub joined_sp_uri: Option<String>, 92 - pub joined_sp_cid: Option<String>, 93 - 94 - #[diesel(treat_none_as_null = false)] 95 - pub created_at: Option<NaiveDateTime>, 96 - pub indexed_at: NaiveDateTime, 97 - } 98 - 99 43 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 100 44 #[diesel(table_name = crate::schema::lists)] 101 45 #[diesel(primary_key(at_uri))] ··· 115 59 pub indexed_at: NaiveDateTime, 116 60 } 117 61 118 - #[derive(Insertable, AsChangeset)] 119 - #[diesel(table_name = crate::schema::lists)] 120 - #[diesel(check_for_backend(diesel::pg::Pg))] 121 - #[diesel(treat_none_as_null = true)] 122 - pub struct UpsertList<'a> { 123 - pub at_uri: &'a str, 124 - pub owner: &'a str, 125 - pub cid: String, 126 - 127 - pub list_type: &'a str, 128 - pub name: &'a str, 129 - pub description: Option<String>, 130 - pub description_facets: Option<serde_json::Value>, 131 - pub avatar_cid: Option<String>, 132 - 133 - pub created_at: NaiveDateTime, 134 - pub indexed_at: NaiveDateTime, 135 - } 136 - 137 62 #[derive(Debug, Queryable, Selectable, Identifiable)] 138 63 #[diesel(table_name = crate::schema::list_blocks)] 139 64 #[diesel(primary_key(at_uri))] ··· 147 72 pub indexed_at: NaiveDateTime, 148 73 } 149 74 150 - #[derive(Insertable)] 151 - #[diesel(table_name = crate::schema::list_blocks)] 152 - #[diesel(check_for_backend(diesel::pg::Pg))] 153 - #[diesel(treat_none_as_null = true)] 154 - pub struct NewListBlock<'a> { 155 - pub at_uri: &'a str, 156 - pub did: &'a str, 157 - pub list_uri: &'a str, 158 - 159 - pub created_at: NaiveDateTime, 160 - pub indexed_at: NaiveDateTime, 161 - } 162 - 163 75 #[derive(Debug, Queryable, Selectable, Identifiable)] 164 76 #[diesel(table_name = crate::schema::list_items)] 165 77 #[diesel(primary_key(at_uri))] ··· 173 85 pub indexed_at: NaiveDateTime, 174 86 } 175 87 176 - #[derive(Insertable)] 177 - #[diesel(table_name = crate::schema::list_items)] 178 - #[diesel(check_for_backend(diesel::pg::Pg))] 179 - #[diesel(treat_none_as_null = true)] 180 - pub struct NewListItem<'a> { 181 - pub at_uri: &'a str, 182 - pub list_uri: &'a str, 183 - pub subject: &'a str, 184 - 185 - pub created_at: NaiveDateTime, 186 - pub indexed_at: NaiveDateTime, 187 - } 188 - 189 88 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 190 89 #[diesel(table_name = crate::schema::feedgens)] 191 90 #[diesel(primary_key(at_uri))] ··· 208 107 pub indexed_at: NaiveDateTime, 209 108 } 210 109 211 - #[derive(Insertable, AsChangeset)] 212 - #[diesel(table_name = crate::schema::feedgens)] 213 - #[diesel(check_for_backend(diesel::pg::Pg))] 214 - #[diesel(treat_none_as_null = true)] 215 - pub struct UpsertFeedGen<'a> { 216 - pub at_uri: &'a str, 217 - pub cid: &'a str, 218 - pub owner: &'a str, 219 - 220 - pub service_did: &'a str, 221 - pub content_mode: Option<String>, 222 - pub name: &'a str, 223 - 224 - pub description: Option<String>, 225 - pub description_facets: Option<serde_json::Value>, 226 - pub avatar_cid: Option<String>, 227 - #[diesel(treat_none_as_null = false)] 228 - pub accepts_interactions: Option<bool>, 229 - 230 - pub created_at: NaiveDateTime, 231 - pub indexed_at: NaiveDateTime, 232 - } 233 - 234 110 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 235 111 #[diesel(table_name = crate::schema::backfill)] 236 112 #[diesel(primary_key(repo, repo_ver))] ··· 245 121 pub indexed_at: NaiveDateTime, 246 122 } 247 123 248 - #[derive(Insertable)] 249 - #[diesel(table_name = crate::schema::backfill)] 250 - #[diesel(check_for_backend(diesel::pg::Pg))] 251 - pub struct NewBackfillRow<'a> { 252 - pub repo: &'a str, 253 - pub repo_ver: &'a str, 254 - pub cid: String, 255 - 256 - pub data: serde_json::Value, 257 - } 258 - 259 124 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 260 125 #[diesel(table_name = crate::schema::posts)] 261 126 #[diesel(primary_key(at_uri))] ··· 283 148 pub indexed_at: NaiveDateTime, 284 149 } 285 150 286 - #[derive(Insertable)] 287 - #[diesel(table_name = crate::schema::posts)] 288 - #[diesel(check_for_backend(diesel::pg::Pg))] 289 - pub struct NewPost<'a> { 290 - pub at_uri: &'a str, 291 - pub cid: String, 292 - pub did: &'a str, 293 - pub record: serde_json::Value, 294 - 295 - pub content: &'a str, 296 - pub facets: Option<serde_json::Value>, 297 - pub languages: Vec<String>, 298 - pub tags: Vec<String>, 299 - 300 - pub parent_uri: Option<String>, 301 - pub parent_cid: Option<String>, 302 - pub root_uri: Option<String>, 303 - pub root_cid: Option<String>, 304 - 305 - pub embed: Option<&'a str>, 306 - pub embed_subtype: Option<&'a str>, 307 - 308 - pub created_at: NaiveDateTime, 309 - } 310 - 311 151 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 312 152 #[diesel(table_name = crate::schema::post_embed_images)] 313 153 #[diesel(primary_key(post_uri, seq))] ··· 324 164 pub height: Option<i32>, 325 165 } 326 166 327 - #[derive(Insertable)] 328 - #[diesel(table_name = crate::schema::post_embed_images)] 329 - #[diesel(check_for_backend(diesel::pg::Pg))] 330 - pub struct NewPostEmbedImage<'a> { 331 - pub post_uri: &'a str, 332 - pub seq: i16, 333 - 334 - pub mime_type: String, 335 - pub cid: String, 336 - 337 - pub alt: Option<String>, 338 - pub width: Option<i32>, 339 - pub height: Option<i32>, 340 - } 341 - 342 167 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 343 168 #[diesel(table_name = crate::schema::post_embed_video)] 344 169 #[diesel(primary_key(post_uri))] ··· 354 179 pub height: Option<i32>, 355 180 } 356 181 357 - #[derive(Insertable)] 358 - #[diesel(table_name = crate::schema::post_embed_video)] 359 - #[diesel(check_for_backend(diesel::pg::Pg))] 360 - pub struct NewPostEmbedVideo<'a> { 361 - pub post_uri: &'a str, 362 - 363 - pub mime_type: &'a str, 364 - pub cid: String, 365 - 366 - pub alt: Option<String>, 367 - pub width: Option<i32>, 368 - pub height: Option<i32>, 369 - } 370 - 371 182 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 372 183 #[diesel(table_name = crate::schema::post_embed_video_captions)] 373 184 #[diesel(primary_key(post_uri, language))] ··· 380 191 pub cid: String, 381 192 } 382 193 383 - #[derive(Insertable)] 384 - #[diesel(table_name = crate::schema::post_embed_video_captions)] 385 - #[diesel(check_for_backend(diesel::pg::Pg))] 386 - pub struct NewPostEmbedVideoCaption<'a> { 387 - pub post_uri: &'a str, 388 - pub language: String, 389 - 390 - pub mime_type: String, 391 - pub cid: String, 392 - } 393 - 394 194 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 395 195 #[diesel(table_name = crate::schema::post_embed_ext)] 396 196 #[diesel(primary_key(post_uri))] ··· 406 206 pub thumb_cid: Option<String>, 407 207 } 408 208 409 - #[derive(Insertable)] 410 - #[diesel(table_name = crate::schema::post_embed_ext)] 411 - #[diesel(check_for_backend(diesel::pg::Pg))] 412 - pub struct NewPostEmbedExt<'a> { 413 - pub post_uri: &'a str, 414 - 415 - pub uri: &'a str, 416 - pub title: &'a str, 417 - pub description: &'a str, 418 - 419 - pub thumb_mime_type: Option<String>, 420 - pub thumb_cid: Option<String>, 421 - } 422 - 423 209 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 424 210 #[diesel(table_name = crate::schema::post_embed_record)] 425 211 #[diesel(primary_key(post_uri))] ··· 434 220 pub detached: bool, 435 221 } 436 222 437 - #[derive(Insertable)] 438 - #[diesel(table_name = crate::schema::post_embed_record)] 439 - #[diesel(check_for_backend(diesel::pg::Pg))] 440 - pub struct NewPostEmbedRecord<'a> { 441 - pub post_uri: &'a str, 442 - 443 - pub record_type: &'a str, 444 - pub uri: &'a str, 445 - pub cid: String, 446 - 447 - pub detached: Option<bool>, 448 - } 449 - 450 223 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 451 224 #[diesel(table_name = crate::schema::postgates)] 452 225 #[diesel(primary_key(post_uri))] ··· 463 236 pub indexed_at: NaiveDateTime, 464 237 } 465 238 466 - #[derive(Insertable, AsChangeset)] 467 - #[diesel(table_name = crate::schema::postgates)] 468 - #[diesel(check_for_backend(diesel::pg::Pg))] 469 - #[diesel(treat_none_as_null = true)] 470 - pub struct UpsertPostgate<'a> { 471 - pub at_uri: &'a str, 472 - pub cid: String, 473 - pub post_uri: &'a str, 474 - 475 - pub detached: &'a [String], 476 - pub rules: Vec<String>, 477 - 478 - pub created_at: NaiveDateTime, 479 - } 480 - 481 239 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 482 240 #[diesel(table_name = crate::schema::threadgates)] 483 241 #[diesel(primary_key(post_uri))] ··· 497 255 pub indexed_at: NaiveDateTime, 498 256 } 499 257 500 - #[derive(Insertable, AsChangeset)] 501 - #[diesel(table_name = crate::schema::threadgates)] 502 - #[diesel(check_for_backend(diesel::pg::Pg))] 503 - #[diesel(treat_none_as_null = true)] 504 - pub struct UpsertThreadgate<'a> { 505 - pub at_uri: &'a str, 506 - pub cid: String, 507 - pub post_uri: &'a str, 508 - 509 - pub hidden_replies: Vec<String>, 510 - pub allow: Vec<String>, 511 - pub allowed_lists: Vec<String>, 512 - 513 - pub record: serde_json::Value, 514 - 515 - pub created_at: NaiveDateTime, 516 - } 517 - 518 - #[derive(Insertable)] 519 - #[diesel(table_name = crate::schema::likes)] 520 - #[diesel(check_for_backend(diesel::pg::Pg))] 521 - pub struct NewLike<'a> { 522 - pub rkey: &'a str, 523 - pub did: &'a str, 524 - pub subject: &'a str, 525 - pub subject_cid: String, 526 - pub created_at: NaiveDateTime, 527 - } 528 - 529 - #[derive(Insertable)] 530 - #[diesel(table_name = crate::schema::reposts)] 531 - #[diesel(check_for_backend(diesel::pg::Pg))] 532 - pub struct NewRepost<'a> { 533 - pub rkey: &'a str, 534 - pub did: &'a str, 535 - pub post: &'a str, 536 - pub post_cid: String, 537 - pub created_at: NaiveDateTime, 538 - } 539 - 540 - #[derive(Insertable, AsChangeset)] 541 - #[diesel(table_name = crate::schema::chat_decls)] 542 - #[diesel(check_for_backend(diesel::pg::Pg))] 543 - pub struct NewChatDecl<'a> { 544 - pub did: &'a str, 545 - pub allow_incoming: String, 546 - } 547 - 548 258 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 549 259 #[diesel(table_name = crate::schema::starterpacks)] 550 260 #[diesel(primary_key(at_uri))] ··· 565 275 pub indexed_at: NaiveDateTime, 566 276 } 567 277 568 - #[derive(Insertable, AsChangeset)] 569 - #[diesel(table_name = crate::schema::starterpacks)] 570 - #[diesel(check_for_backend(diesel::pg::Pg))] 571 - pub struct NewStarterPack<'a> { 572 - pub at_uri: &'a str, 573 - pub cid: String, 574 - pub owner: &'a str, 575 - pub record: serde_json::Value, 576 - 577 - pub name: &'a str, 578 - pub description: Option<String>, 579 - pub description_facets: Option<serde_json::Value>, 580 - pub list: &'a str, 581 - pub feeds: Option<Vec<String>>, 582 - 583 - pub created_at: NaiveDateTime, 584 - pub indexed_at: NaiveDateTime, 585 - } 586 - 587 278 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 588 279 #[diesel(table_name = crate::schema::labelers)] 589 280 #[diesel(primary_key(did))] ··· 600 291 pub indexed_at: NaiveDateTime, 601 292 } 602 293 603 - #[derive(Insertable, AsChangeset)] 604 - #[diesel(table_name = crate::schema::labelers)] 605 - #[diesel(check_for_backend(diesel::pg::Pg))] 606 - pub struct UpsertLabelerService<'a> { 607 - pub did: &'a str, 608 - pub cid: String, 609 - 610 - pub reasons: Option<Vec<String>>, 611 - pub subject_types: Option<Vec<String>>, 612 - pub subject_collections: Option<&'a Vec<String>>, 613 - 614 - pub indexed_at: NaiveDateTime, 615 - } 616 - 617 294 #[derive(Clone, Debug, Queryable, Selectable, Identifiable, Associations)] 618 295 #[diesel(table_name = crate::schema::labeler_defs)] 619 296 #[diesel(belongs_to(LabelerService, foreign_key = labeler))] ··· 633 310 pub indexed_at: NaiveDateTime, 634 311 } 635 312 636 - #[derive(Insertable, AsChangeset)] 637 - #[diesel(table_name = crate::schema::labeler_defs)] 638 - #[diesel(check_for_backend(diesel::pg::Pg))] 639 - pub struct UpsertLabelDefinition<'a> { 640 - pub labeler: &'a str, 641 - pub label_identifier: &'a str, 642 - 643 - pub severity: Option<String>, 644 - pub blurs: Option<String>, 645 - pub default_setting: Option<String>, 646 - pub adult_only: Option<bool>, 647 - pub locales: Option<serde_json::Value>, 648 - 649 - pub indexed_at: NaiveDateTime, 650 - } 651 - 652 313 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 653 314 #[diesel(table_name = crate::schema::labels)] 654 315 #[diesel(primary_key(labeler, label, uri))] ··· 668 329 pub indexed_at: NaiveDateTime, 669 330 } 670 331 671 - #[derive(Insertable)] 672 - #[diesel(table_name = crate::schema::labels)] 673 - #[diesel(check_for_backend(diesel::pg::Pg))] 674 - pub struct NewLabel<'a> { 675 - pub labeler: &'a str, 676 - pub label: &'a str, 677 - pub uri: &'a str, 678 - pub self_label: bool, 679 - 680 - pub cid: Option<String>, 681 - 682 - pub expires: Option<NaiveDateTime>, 683 - pub sig: Option<&'a [u8]>, 684 - 685 - pub created_at: NaiveDateTime, 686 - } 687 - 688 332 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] 689 333 #[diesel(table_name = crate::schema::verification)] 690 334 #[diesel(primary_key(at_uri))] ··· 700 344 701 345 pub created_at: DateTime<Utc>, 702 346 pub indexed_at: NaiveDateTime, 703 - } 704 - 705 - #[derive(Insertable, AsChangeset)] 706 - #[diesel(table_name = crate::schema::verification)] 707 - #[diesel(check_for_backend(diesel::pg::Pg))] 708 - pub struct NewVerificationEntry<'a> { 709 - pub at_uri: &'a str, 710 - pub cid: String, 711 - pub verifier: &'a str, 712 - 713 - pub subject: &'a str, 714 - pub handle: &'a str, 715 - pub display_name: &'a str, 716 - 717 - pub created_at: NaiveDateTime, 718 - #[diesel(treat_none_as_default_value = true)] 719 - pub indexed_at: Option<NaiveDateTime>, 720 347 } 721 348 722 349 #[derive(Clone, Debug, Queryable, Selectable, Identifiable)]