package com.sysu.admin.controller.crop.class_item_period;

import com.sysu.admin.controller.crop.class_item.CropClassItem;
import com.xiesx.fastboot.core.jpa.JpaPlusRepository;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import lombok.experimental.FieldNameConstants;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.repository.Query;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;

/**
 * 作物类别条目 与 生长周期关联表
 */
public interface CropClassItemPeriodRepository extends JpaPlusRepository<CropClassItemPeriod, PKRP> {

    @Query(value = "select * from p_crop_class_item_period order by crop_item_id",nativeQuery = true)
    List<CropClassItemPeriod> findAllOrderByCropItemId();

}
