hytos / ID2.Manager / ID2.Manager.Data / Models / AttFileInfo.cs @ d8bd4799
이력 | 보기 | 이력해설 | 다운로드 (2.15 KB)
1 | 2fb63a42 | yoush97 | using System; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | using System.Linq; |
||
4 | using System.Text; |
||
5 | using System.Threading.Tasks; |
||
6 | |||
7 | using System.Runtime.Serialization; |
||
8 | 08499f5f | taeseongkim | using System.ComponentModel; |
9 | using System.ComponentModel.DataAnnotations.Schema; |
||
10 | 2fb63a42 | yoush97 | |
11 | namespace ID2.Manager.Data.Models |
||
12 | { |
||
13 | [DataContract] |
||
14 | 08499f5f | taeseongkim | public class AttFileInfo : IEquatable<AttFileInfo> |
15 | 2fb63a42 | yoush97 | { |
16 | 08499f5f | taeseongkim | private string fileID; |
17 | |||
18 | 2fb63a42 | yoush97 | [DataMember] |
19 | 08499f5f | taeseongkim | public string FileID { get => fileID; |
20 | set => fileID = value; } |
||
21 | 2fb63a42 | yoush97 | [DataMember] |
22 | public string RefID { get; set; } |
||
23 | [DataMember] |
||
24 | public string Category { get; set; } |
||
25 | [DataMember] |
||
26 | public string FileType { get; set; } |
||
27 | [DataMember] |
||
28 | public string FileName { get; set; } |
||
29 | [DataMember] |
||
30 | public string FilePath { get; set; } |
||
31 | [DataMember] |
||
32 | 677a1d1f | yoush97 | public string FileExtension { get; set; } |
33 | [DataMember] |
||
34 | 2fb63a42 | yoush97 | public byte[] FileData { get; set; } |
35 | [DataMember] |
||
36 | 64811fe5 | yoush97 | public string Remark { get; set; } |
37 | [DataMember] |
||
38 | 2fb63a42 | yoush97 | public DateTime CreatedDate { get; set; } |
39 | [DataMember] |
||
40 | public string Creator { get; set; } |
||
41 | 08499f5f | taeseongkim | |
42 | public bool Equals(AttFileInfo other) |
||
43 | { |
||
44 | return other != null |
||
45 | && FileID == other.FileID |
||
46 | && RefID == other.RefID |
||
47 | && Category == other.Category |
||
48 | && FileType == other.FileType |
||
49 | && FilePath == other.FilePath |
||
50 | && FileName == other.FileName |
||
51 | && FileExtension == other.FileExtension |
||
52 | && CreatedDate == other.CreatedDate |
||
53 | 295ce375 | yoush97 | && Creator == other.Creator |
54 | && FileData != null && other.FileData != null && FileData.SequenceEqual(other.FileData); |
||
55 | 08499f5f | taeseongkim | } |
56 | |||
57 | public override int GetHashCode() |
||
58 | { |
||
59 | return this.FileID.GetNullableHash() + this.RefID.GetNullableHash() + this.Category.GetNullableHash() + this.FileType.GetNullableHash() |
||
60 | + FilePath.GetNullableHash() + FileName.GetNullableHash() + FileExtension.GetNullableHash() + FileData.GetNullableHash() + CreatedDate.GetNullableHash() + Creator.GetNullableHash(); |
||
61 | } |
||
62 | |||
63 | 2fb63a42 | yoush97 | } |
64 | } |