StorageArea.cs
1.72 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
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Rcs.Domain.Entities
{
/// <summary>
/// 库区实体
/// @author zzy
/// </summary>
[Table("storage_areas")]
public class StorageArea : Entity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Column("area_id")]
public Guid AreaId { get; set; }
/// <summary>
/// 库区编码
/// </summary>
[Required]
[Column("area_code")]
[MaxLength(50)]
public string AreaCode { get; set; }
/// <summary>
/// 库区名称
/// </summary>
[Column("area_name")]
[MaxLength(100)]
public string? AreaName { get; set; }
/// <summary>
/// 库区描述
/// </summary>
[Column("description")]
[MaxLength(500)]
public string? Description { get; set; }
/// <summary>
/// 是否启用
/// </summary>
[Column("is_active")]
public bool IsActive { get; set; } = true;
/// <summary>
/// 创建时间
/// </summary>
[Column("created_at", TypeName = "timestamp")]
public DateTime CreatedAt { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[Column("updated_at", TypeName = "timestamp")]
public DateTime? UpdatedAt { get; set; }
#region 导航属性 OneToMany
/// <summary>
/// 库位集合
/// </summary>
public virtual ICollection<StorageLocation> StorageLocations { get; set; } = new List<StorageLocation>();
#endregion
}
}