forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompositeIndexAttribute.cs
More file actions
31 lines (25 loc) · 845 Bytes
/
Copy pathCompositeIndexAttribute.cs
File metadata and controls
31 lines (25 loc) · 845 Bytes
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
using System;
using System.Collections.Generic;
namespace ServiceStack.DataAnnotations
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)]
public class CompositeIndexAttribute : AttributeBase
{
public CompositeIndexAttribute()
{
this.FieldNames = new List<string>();
}
public CompositeIndexAttribute(params string[] fieldNames)
{
this.FieldNames = new List<string>(fieldNames);
}
public CompositeIndexAttribute(bool unique, params string[] fieldNames)
{
this.Unique = unique;
this.FieldNames = new List<string>(fieldNames);
}
public List<string> FieldNames { get; set; }
public bool Unique { get; set; }
public string Name { get; set; }
}
}