Files
LibreTunes/src/models/backend/playlist.rs

23 lines
611 B
Rust

use chrono::NaiveDateTime;
use libretunes_macro::db_type;
use serde::{Deserialize, Serialize};
/// Model for a playlist
#[db_type(crate::schema::playlists)]
#[derive(Serialize, Deserialize, Clone)]
pub struct Playlist {
/// A unique id for the playlist
#[omit_new]
pub id: i32,
/// The time the playlist was created
#[omit_new]
pub created_at: NaiveDateTime,
/// The time the playlist was last updated
#[omit_new]
pub updated_at: NaiveDateTime,
/// The id of the user who owns the playlist
pub owner_id: i32,
/// The name of the playlist
pub name: String,
}