firedbg_stream_indexer/entity/
breakpoint.rs

1use sea_orm::entity::prelude::*;
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)]
5#[sea_orm(table_name = "breakpoint")]
6pub struct Model {
7    #[sea_orm(primary_key, auto_increment = false, column_type = "Integer")]
8    pub id: u32,
9    pub file_id: u32,
10    pub loc_line: u32,
11    pub loc_column: Option<u32>,
12    pub breakpoint_type: String,
13    pub capture: String,
14    pub hit_count: i64,
15}
16
17#[derive(Debug, Copy, Clone, EnumIter, DeriveRelation)]
18pub enum Relation {
19    #[sea_orm(
20        belongs_to = "super::file::Entity",
21        from = "Column::FileId",
22        to = "super::file::Column::Id"
23    )]
24    File,
25}
26
27impl Related<super::file::Entity> for Entity {
28    fn to() -> RelationDef {
29        Relation::File.def()
30    }
31}
32
33impl ActiveModelBehavior for ActiveModel {}