correctly handle updated alerts
This commit is contained in:
parent
a8c0be2c05
commit
ac0ac8a10d
34 changed files with 775 additions and 114 deletions
12
entity/Cargo.toml
Normal file
12
entity/Cargo.toml
Normal file
|
@ -0,0 +1,12 @@
|
|||
[package]
|
||||
name = "entity"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
license.workspace = true
|
||||
authors.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[dependencies]
|
||||
sea-orm = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
time = { workspace = true }
|
18
entity/src/alerts.rs
Normal file
18
entity/src/alerts.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.10
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use time::PrimitiveDateTime;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
|
||||
#[sea_orm(table_name = "alerts")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
pub publish_date: PrimitiveDateTime,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
pub enum Relation {}
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
5
entity/src/lib.rs
Normal file
5
entity/src/lib.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.10
|
||||
|
||||
pub mod prelude;
|
||||
|
||||
pub mod alerts;
|
3
entity/src/prelude.rs
Normal file
3
entity/src/prelude.rs
Normal file
|
@ -0,0 +1,3 @@
|
|||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.10
|
||||
|
||||
pub use super::alerts::Entity as Alerts;
|
Loading…
Add table
Add a link
Reference in a new issue