using System;
using System.Linq;
namespace FreeSql.DataAnnotations
{
    /// 
    /// 设置 AggregateRootRepository 边界范围
    /// 在边界范围之内的规则 :
    /// 1、OneToOne/OneToMany/ManyToMany(中间表) 可以查询、可以增删改
    /// 2、ManyToOne/ManyToMany外部表/PgArrayToMany 只可以查询,不支持增删改(会被忽略)
    /// 
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
    public class AggregateRootBoundaryAttribute : Attribute
    {
        public string Name { get; set; }
        /// 
        /// 边界是否终止
        /// 
        public bool Break { get; set; }
        /// 
        /// 边界是否终止向下探测
        /// 
        public bool BreakThen { get; set; }
        public AggregateRootBoundaryAttribute(string name)
        {
            this.Name = name;
        }
        public AggregateRootBoundaryAttribute()
        {
        }
    }
}