// -----------------------------------------------------------------------
using Castle.ActiveRecord;
+using Castle.ActiveRecord.Framework;
using Pithos.Interfaces;
namespace Pithos.Core
/// TODO: Update summary.
/// </summary>
[ActiveRecord]
- public class FileState:ActiveRecordBase<FileState>
+ public class FileState:ActiveRecordLinqBase<FileState>
{
+ private string _filePath;
+ private IList<FileTag> _tags=new List<FileTag>();
+
+
[PrimaryKey]
- public string FilePath { get; set; }
+ public string FilePath
+ {
+ get { return _filePath; }
+ set { _filePath = value.ToLower(); }
+ }
[Property]
public FileOverlayStatus OverlayStatus { get; set; }
[Property]
public string Checksum { get; set; }
+
+ [HasMany(Cascade=ManyRelationCascadeEnum.AllDeleteOrphan,Lazy=true)]
+ public IList<FileTag> Tags
+ {
+ get { return _tags; }
+ set { _tags=value;}
+ }
+
+ }
+
+ [ActiveRecord]
+ public class FileTag : ActiveRecordLinqBase<FileTag>
+ {
+ [PrimaryKey]
+ public string FilePath { get; set; }
+
+ [Property]
+ public string Value { get; set; }
+
+ [BelongsTo("FilePath")]
+ public FileState FileState { get; set; }
+
}
+
+
}