feat(billing): workflow_points_cost config

This commit is contained in:
boos
2026-06-16 20:32:10 +08:00
parent cfe2098b73
commit be7538a1da
+7
View File
@@ -62,6 +62,8 @@ pub struct ComfyUIConfig {
pub money_printer_video_cost: f64, pub money_printer_video_cost: f64,
#[serde(default)] #[serde(default)]
pub digital_human_video_cost: f64, pub digital_human_video_cost: f64,
#[serde(default = "default_workflow_points_cost")]
pub workflow_points_cost: f64,
#[serde(default = "default_comfyui_docker_image")] #[serde(default = "default_comfyui_docker_image")]
pub docker_image: String, pub docker_image: String,
#[serde(default = "default_comfyui_container_name")] #[serde(default = "default_comfyui_container_name")]
@@ -113,6 +115,10 @@ fn default_comfyui_container_name() -> String {
"boosapi-comfyui-workflow".to_string() "boosapi-comfyui-workflow".to_string()
} }
fn default_workflow_points_cost() -> f64 {
10.0
}
impl Default for ComfyUIConfig { impl Default for ComfyUIConfig {
fn default() -> Self { fn default() -> Self {
Self { Self {
@@ -120,6 +126,7 @@ impl Default for ComfyUIConfig {
backend: ComfyUIBackend::Boosapi, backend: ComfyUIBackend::Boosapi,
money_printer_video_cost: 0.0, money_printer_video_cost: 0.0,
digital_human_video_cost: 0.0, digital_human_video_cost: 0.0,
workflow_points_cost: 10.0,
docker_image: default_comfyui_docker_image(), docker_image: default_comfyui_docker_image(),
container_name: default_comfyui_container_name(), container_name: default_comfyui_container_name(),
install_dir: None, install_dir: None,