firefish/packages/backend-rs/src/model/entity/ad.rs

32 lines
898 B
Rust
Raw Normal View History

2024-03-22 16:40:28 +00:00
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15
2023-05-25 06:34:48 +00:00
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
2023-05-25 06:34:48 +00:00
#[sea_orm(table_name = "ad")]
2024-04-07 03:17:02 +00:00
#[cfg_attr(
feature = "napi",
napi_derive::napi(object, js_name = "Ad", use_nullable = true)
)]
2023-05-25 06:34:48 +00:00
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
2024-04-06 19:58:54 +00:00
pub created_at: DateTime,
2023-05-25 06:34:48 +00:00
#[sea_orm(column_name = "expiresAt")]
2024-04-06 19:58:54 +00:00
pub expires_at: DateTime,
2023-05-25 06:34:48 +00:00
pub place: String,
pub priority: String,
pub url: String,
#[sea_orm(column_name = "imageUrl")]
pub image_url: String,
pub memo: String,
pub ratio: i32,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}