risingwave_meta_model/
catalog_version.rs1use sea_orm::entity::prelude::*;
16use serde::{Deserialize, Serialize};
17
18#[derive(Clone, Copy, Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)]
19#[sea_orm(rs_type = "String", db_type = "string(None)")]
20pub enum VersionCategory {
21 #[sea_orm(string_value = "NOTIFICATION")]
22 Notification,
23 #[sea_orm(string_value = "TABLE_REVISION")]
24 TableRevision,
25}
26
27#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
28#[sea_orm(table_name = "catalog_version")]
29pub struct Model {
30 #[sea_orm(primary_key, auto_increment = false)]
31 pub name: VersionCategory,
32 pub version: i64,
33}
34
35#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
36pub enum Relation {}
37
38impl ActiveModelBehavior for ActiveModel {}