database support

This commit is contained in:
Simon
2025-06-05 18:50:28 +00:00
parent 6d08362937
commit 175c9b748f
15 changed files with 333 additions and 140 deletions

10
src/models.rs Normal file
View File

@@ -0,0 +1,10 @@
use diesel::prelude::*;
use serde::{Serialize};
#[derive(Debug, Clone, Serialize, Queryable, Insertable)]
#[diesel(table_name = crate::schema::videos)]
#[diesel(check_for_backend(diesel::sqlite::Sqlite))]
pub struct DBVideo {
pub id: String,
pub url: String,
}