using System; using System.Collections.Generic; namespace Haoliang.Models.Common { public class ApiResponse { public bool Success { get; set; } public T Data { get; set; } public string Message { get; set; } public int ErrorCode { get; set; } public DateTime Timestamp { get; set; } public string RequestId { get; set; } public Dictionary Meta { get; set; } } public class PaginatedResponse { public List Items { get; set; } public int TotalCount { get; set; } public int PageNumber { get; set; } public int PageSize { get; set; } public int TotalPages { get; set; } public bool HasPreviousPage { get; set; } public bool HasNextPage { get; set; } public ApiResponse Response { get; set; } } public class ValidationResult { public bool IsValid { get; set; } public List Errors { get; set; } } public class ValidationError { public string Field { get; set; } public string Message { get; set; } public string Code { get; set; } } public class SelectOption { public string Value { get; set; } public string Label { get; set; } public bool Disabled { get; set; } public string Group { get; set; } } public class TreeNode { public string Id { get; set; } public string Text { get; set; } public string Type { get; set; } public List Children { get; set; } public Dictionary Data { get; set; } public bool Expanded { get; set; } public bool Selected { get; set; } public bool HasChildren { get; set; } } public class ChartData { public string Type { get; set; } // line, bar, pie, doughnut, radar public string Title { get; set; } public List Labels { get; set; } public List Datasets { get; set; } public Dictionary Options { get; set; } } public class Dataset { public string Label { get; set; } public List Data { get; set; } public string BackgroundColor { get; set; } public string BorderColor { get; set; } public decimal BorderWidth { get; set; } public string BorderDash { get; set; } public bool Fill { get; set; } public string Tension { get; set; } } public class DashboardWidget { public string Id { get; set; } public string Title { get; set; } public string Type { get; set; } // chart, statistic, table, list public string Size { get; set; } // small, medium, large public int Row { get; set; } public int Col { get; set; } public Dictionary Config { get; set; } public bool Refreshable { get; set; } public int RefreshInterval { get; set; } public bool Visible { get; set; } } public class FilterCondition { public string Field { get; set; } public string Operator { get; set; } // eq, ne, gt, lt, gte, lte, in, like public object Value { get; set; } public string Logic { get; set; } // and, or } }