feat: enhance user registration and follow functionality, add popular tags endpoint, and update tests
This commit is contained in:
@@ -6,7 +6,7 @@ pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub follower_id: Uuid,
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub followed_id: Uuid,
|
||||
pub following_id: Uuid,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
@@ -21,12 +21,12 @@ pub enum Relation {
|
||||
Follower,
|
||||
#[sea_orm(
|
||||
belongs_to = "super::user::Entity",
|
||||
from = "Column::FollowedId",
|
||||
from = "Column::FollowingId",
|
||||
to = "super::user::Column::Id",
|
||||
on_update = "NoAction",
|
||||
on_delete = "Cascade"
|
||||
)]
|
||||
Followed,
|
||||
Following,
|
||||
}
|
||||
|
||||
impl Related<super::user::Entity> for Entity {
|
||||
|
Reference in New Issue
Block a user