X-Git-Url: https://code.grnet.gr/git/pithos-ms-client/blobdiff_plain/283809f373f4556c812cb32cdb1dc0cd243d8246..7d915c34d5a6ec34fe8b5b821f89630eae739a32:/trunk/Pithos.Core/FileState.cs diff --git a/trunk/Pithos.Core/FileState.cs b/trunk/Pithos.Core/FileState.cs index 58be1ec..f751f81 100644 --- a/trunk/Pithos.Core/FileState.cs +++ b/trunk/Pithos.Core/FileState.cs @@ -22,6 +22,8 @@ namespace Pithos.Core public class FileState:ActiveRecordLinqBase { private string _filePath; + private IList _tags=new List(); + [PrimaryKey] public string FilePath @@ -39,7 +41,28 @@ namespace Pithos.Core [Property] public string Checksum { get; set; } + [HasMany(Cascade=ManyRelationCascadeEnum.AllDeleteOrphan,Lazy=true)] + public IList Tags + { + get { return _tags; } + set { _tags=value;} + } + } - + [ActiveRecord] + public class FileTag : ActiveRecordLinqBase + { + [PrimaryKey] + public string FilePath { get; set; } + + [Property] + public string Value { get; set; } + + [BelongsTo("FilePath")] + public FileState FileState { get; set; } + + } + + }