kcw-wx-java/youchain-common/src/main/java/com/youchain/annotation/DataPermission.java

48 lines
1.5 KiB
Java
Raw Normal View History

2025-07-25 11:22:48 +08:00
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.youchain.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* <p>
*
* 1 @OneToOne fieldName [DeptQueryCriteria.class]
* 2 @OneToOne fieldName joinName UserQueryCriteria.class:
* @DataPermission(joinName = "dept", fieldName = "id")
* </p>
* @author Liu Xue
* @website https://eladmin.vip
* @date 2020-05-07
**/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface DataPermission {
/**
* Entity
*/
String fieldName() default "";
/**
* Entity
*/
String joinName() default "";
}