feat: rename farmer to resource provider across codebase and update terminology

This commit is contained in:
mik-tf
2025-09-06 23:27:14 -04:00
parent bf273102cb
commit c8e28cf8ed
34 changed files with 511 additions and 511 deletions

View File

@@ -146,7 +146,7 @@ pub struct RegionDeployments {
pub gateways: i32,
}
/// Node information for farmer dashboard
/// Node information for resource_provider dashboard
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NodeInfo {
pub id: String,
@@ -200,14 +200,14 @@ impl std::fmt::Display for NodeStatus {
}
}
/// Default maintenance window for farmer settings
/// Default maintenance window for resource_provider settings
pub fn default_maintenance_window() -> String {
"02:00-04:00 UTC".to_string()
}
/// Farmer configuration settings
/// ResourceProvider configuration settings
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FarmerSettings {
pub struct ResourceProviderSettings {
pub auto_accept_reserved_slices: bool,
pub maintenance_window: String, // e.g., "02:00-04:00 UTC"
pub notification_email: Option<String>,
@@ -229,7 +229,7 @@ pub struct FarmerSettings {
pub preferred_regions: Vec<String>,
}
impl Default for FarmerSettings {
impl Default for ResourceProviderSettings {
fn default() -> Self {
Self {
auto_accept_reserved_slices: true,
@@ -324,7 +324,7 @@ impl Default for LiquidityPoolConfig {
}
}
impl Default for FarmerData {
impl Default for ResourceProviderData {
fn default() -> Self {
Self {
total_nodes: 0,
@@ -761,9 +761,9 @@ pub struct QuickAction {
pub enabled: bool,
}
/// Farmer-specific data
/// ResourceProvider-specific data
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FarmerData {
pub struct ResourceProviderData {
pub total_nodes: i32,
pub active_nodes: i32,
pub total_monthly_earnings_usd: i32,
@@ -1224,7 +1224,7 @@ where
.map_err(serde::de::Error::custom)
}
/// Node group for farmer organization
/// Node group for resource_provider organization
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NodeGroup {
pub id: String,
@@ -1358,7 +1358,7 @@ pub struct NodeCapacity {
pub ram_gb: i32,
}
/// Farmer node information
/// ResourceProvider node information
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FarmNode {
pub id: String,
@@ -1418,7 +1418,7 @@ pub struct FarmNode {
pub health_score: f32,
}
/// Earnings record for farmer data
/// Earnings record for resource_provider data
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EarningsRecord {
pub date: String,
@@ -1428,7 +1428,7 @@ pub struct EarningsRecord {
pub source: String,
}
/// Group statistics for farmer dashboard
/// Group statistics for resource_provider dashboard
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GroupStatistics {
pub group_name: String,
@@ -1517,7 +1517,7 @@ pub struct GridNodeData {
/// Additional missing user model types
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FarmerRentalEarning {
pub struct ResourceProviderRentalEarning {
pub date: String,
pub amount: Decimal,
pub rental_id: String,