35 lines
1.8 KiB
C#
35 lines
1.8 KiB
C#
using AgriculturalPlatform.Api.Models;
|
|
|
|
namespace AgriculturalPlatform.Api.Dtos;
|
|
|
|
// ---------- 数据字典 ----------
|
|
public record DictDto(int Id, string Name, string Code, string Remark, bool IsSystem, int Sort, int ItemCount);
|
|
public record DictSaveRequest(string Name, string Code, string Remark, int Sort);
|
|
|
|
public record DictItemDto(int Id, int DictId, string Label, string Value, string Ext, bool IsDefault, bool Enabled, int Sort);
|
|
public record DictItemSaveRequest(string Label, string Value, string Ext, bool IsDefault, bool Enabled, int Sort);
|
|
public record DictDetailDto(DictDto Dict, List<DictItemDto> Items);
|
|
|
|
// ---------- 菜单/权限 ----------
|
|
public record MenuDto(
|
|
int Id, int? ParentId, string Name, string Path, string Component, string Icon,
|
|
string Type, string Permission, bool Visible, int Sort, List<MenuDto> Children);
|
|
public record MenuSaveRequest(
|
|
int? ParentId, string Name, string Path, string Component, string Icon,
|
|
string Type, string Permission, bool Visible, int Sort);
|
|
|
|
// ---------- 角色 ----------
|
|
public record RoleDto(int Id, string Name, string Code, string Description, bool IsSystem, int[] MenuIds);
|
|
public record RoleSaveRequest(string Name, string Code, string Description, int[] MenuIds);
|
|
|
|
// ---------- 通知公告 ----------
|
|
public record AnnouncementDto(
|
|
int Id, string Title, string Content, string Type, string ScopeOrgIds, bool IsPinned,
|
|
string PublisherName, DateTime PublishedAt, DateTime CreatedAt, bool IsRead);
|
|
public record AnnouncementSaveRequest(string Title, string Content, string Type, string ScopeOrgIds, bool IsPinned);
|
|
|
|
// ---------- 关于 ----------
|
|
public record AboutDto(
|
|
string AppName, string Version, string Copyright, string Company, string License,
|
|
string Description, DateTime BuiltAt);
|