//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.luozhihui.project.mapper;

import com.luozhihui.project.entity.Brand;
import com.luozhihui.project.entity.Parking;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.transaction.annotation.Transactional;

public interface ParkingMapper {
    @Select({"select * from  `parking`"})
    List<Parking> FindAllParking();

    @Select({"select * from  `parking` where `id`=#{id}"})
    List<Brand> FindParkingById(String Id);

    @Insert({"insert into `parking`(`parkingName`,`address`,`type`,`carsNumber`,`enable`,`coord`) VALUES(#{parkingName},#{address},#{type},#{carsNumber},#{enable},#{coord})"})
    @Transactional
    void addParking(Parking parking);

    @Delete({"delete  from  `parking` where `id`=#{id}"})
    boolean DeleteParkingById(String Id);

    @Select({"select * from  `parking` where `id`=#{id}"})
    Parking ParkingId(Integer Id);

    @Update({"UPDATE `parking` SET parkingName = #{parkingName},  address = #{address}, type = #{type}, carsNumber = #{carsNumber}, enable = #{enable}, coord = #{coord} where id = #{id}"})
    void update(Parking parking);
}
