平安校园
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

CameraGroup.cs 1.3 KiB

4 个月前
3 个月前
1 个月前
3 个月前
4 个月前
1 个月前
4 个月前
123456789101112131415161718192021222324252627282930313233343536373839
  1. namespace SafeCampus.System;
  2. [SugarTable("CameraGroup", TableDescription = "摄像头分组表")]
  3. [Tenant(SqlSugarConst.DB_DEFAULT)]
  4. [BatchEdit]
  5. [CodeGen]
  6. [IgnoreInitTable]
  7. public class CameraGroup : PrimaryKeyEntity
  8. {
  9. /// <summary>
  10. /// 分组名称
  11. /// </summary>
  12. [SugarColumn(ColumnName = "Name", ColumnDescription = "分组名称", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = false)]
  13. public string Name { get; set; }
  14. /// <summary>
  15. /// 父级id
  16. /// </summary>
  17. [SugarColumn(ColumnName = "ParentId", ColumnDescription = "父级id", IsNullable = true)]
  18. public long ParentId { get; set; }
  19. /// <summary>
  20. /// 推送人id
  21. /// </summary>
  22. [SugarColumn(ColumnName = "PushUserId", ColumnDescription = "推送人id", IsNullable = true)]
  23. public long? PushUserId { get; set; }
  24. /// <summary>
  25. /// 子级
  26. /// </summary>
  27. [SugarColumn(IsIgnore = true)]
  28. public List<CameraGroup> Children { get; set; }
  29. /// <summary>
  30. /// 摄像头列表
  31. /// </summary>
  32. [Navigate(NavigateType.OneToMany, nameof(CameraInfo.GroupId))]
  33. public List<CameraInfo> CameraInfos { get; set; }
  34. /// <summary>
  35. /// 推送人信息
  36. /// </summary>
  37. [Navigate(NavigateType.OneToOne, nameof(CameraInfo.PushUserId))]
  38. public SysUser SysUserItem { get; set; }
  39. }