MapFile.cs
2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Rcs.Domain.Entities
{
/// <summary>
/// 地图文件实体类
/// </summary>
[Table("map_files")]
public partial class MapFile : Entity
{
/// <summary>
/// 系统ID
/// </summary>
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Column("id")]
[MaxLength(36)]
public string Id { get; set; } = string.Empty;
/// <summary>
/// 文件名称
/// </summary>
[Required]
[Column("file_name")]
[MaxLength(255)]
public string FileName { get; set; } = string.Empty;
/// <summary>
/// 文件大小(字节)
/// </summary>
[Required]
[Column("file_size")]
public long FileSize { get; set; }
/// <summary>
/// 文件路径
/// </summary>
[Required]
[Column("file_path")]
[MaxLength(512)]
public string FilePath { get; set; } = string.Empty;
/// <summary>
/// 透明度(0-1)
/// </summary>
[Column("opacity")]
public decimal Opacity { get; set; } = 0.60m;
/// <summary>
/// 缩放比例
/// </summary>
[Column("scale")]
public decimal Scale { get; set; } = 1.00m;
/// <summary>
/// 缩放比例
/// </summary>
[Column("rotation")]
public decimal Rotation { get; set; } = 0.00m;
/// <summary>
/// 地图左下角偏移量X
/// </summary>
[Column("offset_x")]
public decimal OffsetX { get; set; } = 0.00m;
/// <summary>
/// 地图左下角偏移量Y
/// </summary>
[Column("offset_y")]
public decimal OffsetY { get; set; } = 0.00m;
/// <summary>
/// 上传时间
/// </summary>
[Column("upload_time", TypeName = "timestamp")]
public DateTime UploadTime { get; set; }
/// <summary>
/// 关联地图ID(一对一关联)
/// </summary>
[Required]
[Column("map_id")]
public Guid MapId { get; set; }
/// <summary>
/// 是否激活
/// </summary>
[Column("active")]
public bool Active { get; set; } = true;
#region 导航属性
/// <summary>
/// 关联地图导航属性
/// </summary>
[ForeignKey(nameof(MapId))]
public virtual Map? Map { get; set; }
#endregion
}
}