feat: add basic premium scaffolding

This commit is contained in:
alyssa 2025-12-21 01:19:02 -05:00
parent 578c09c216
commit 5e462a0ca2
8 changed files with 70 additions and 2 deletions

View file

@ -0,0 +1,7 @@
-- database version 54
-- initial support for premium
alter table system_config add column premium_until timestamp;
alter table system_config add column premium_lifetime bool default false;
update info set schema_version = 54;

View file

@ -1,3 +1,4 @@
use chrono::NaiveDateTime;
use pk_macros::pk_model;
use sqlx::{postgres::PgTypeInfo, Database, Decode, Postgres, Type};
@ -87,4 +88,8 @@ struct SystemConfig {
name_format: Option<String>,
#[json = "description_templates"]
description_templates: Vec<String>,
#[json = "premium_until"]
premium_until: Option<NaiveDateTime>,
#[json = "premium_lifetime"]
premium_lifetime: bool
}