chore: Move //fun/tvldb -> //fun/paroxysm
Say ~my~ its name! Change-Id: I7890318aef984af0f6bc011de32282f16e01cbb3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1483 Tested-by: BuildkiteCI Reviewed-by: eta <eta@theta.eu.org>
This commit is contained in:
parent
ef54f5da9f
commit
82ba28f197
18 changed files with 10 additions and 9 deletions
36
fun/paroxysm/src/models.rs
Normal file
36
fun/paroxysm/src/models.rs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
use crate::schema::{entries, keywords};
|
||||
use chrono::NaiveDateTime;
|
||||
|
||||
#[derive(Queryable)]
|
||||
pub struct Keyword {
|
||||
pub id: i32,
|
||||
pub name: String,
|
||||
pub chan: String,
|
||||
}
|
||||
|
||||
#[derive(Queryable)]
|
||||
pub struct Entry {
|
||||
pub id: i32,
|
||||
pub keyword_id: i32,
|
||||
pub idx: i32,
|
||||
pub text: String,
|
||||
pub creation_ts: NaiveDateTime,
|
||||
pub created_by: String,
|
||||
}
|
||||
|
||||
#[derive(Insertable)]
|
||||
#[table_name = "keywords"]
|
||||
pub struct NewKeyword<'a> {
|
||||
pub name: &'a str,
|
||||
pub chan: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Insertable)]
|
||||
#[table_name = "entries"]
|
||||
pub struct NewEntry<'a> {
|
||||
pub keyword_id: i32,
|
||||
pub idx: i32,
|
||||
pub text: &'a str,
|
||||
pub creation_ts: NaiveDateTime,
|
||||
pub created_by: &'a str,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue