30 lines · 713 B · Rust
RawDownload
use crate::db::ProjectId;use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]#[sea_orm(table_name = "language_servers")]pub struct Model {    #[sea_orm(primary_key)]    pub project_id: ProjectId,    #[sea_orm(primary_key)]    pub id: i64,    pub name: String,} #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]pub enum Relation {    #[sea_orm(        belongs_to = "super::project::Entity",        from = "Column::ProjectId",        to = "super::project::Column::Id"    )]    Project,} impl Related<super::project::Entity> for Entity {    fn to() -> RelationDef {        Relation::Project.def()    }} impl ActiveModelBehavior for ActiveModel {}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t