2020-05-18 15:55:43 +02:00
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace zero.Core.Attributes
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This attribute will allow the usage of custom collection names for Raven collections
|
|
|
|
|
/// </summary>
|
2020-05-19 14:42:51 +02:00
|
|
|
[AttributeUsage(AttributeTargets.Interface | AttributeTargets.Class, AllowMultiple = false)]
|
2020-05-18 15:55:43 +02:00
|
|
|
public class CollectionAttribute : Attribute
|
|
|
|
|
{
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
2020-11-16 16:03:22 +01:00
|
|
|
public bool LongId { get; set; } = false;
|
|
|
|
|
|
|
|
|
|
public CollectionAttribute(string name, bool longId = false)
|
2020-05-18 15:55:43 +02:00
|
|
|
{
|
|
|
|
|
Name = name;
|
2020-11-16 16:03:22 +01:00
|
|
|
LongId = longId;
|
2020-05-18 15:55:43 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|