Open hyeonpark-5 opened 7 months ago
Controller - service(service, serviceImpl) - mapper - mapper.xml - DB
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- DoctorMapper.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- HospitalMapper.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- MainMapper.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- UserMapper.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
파일구조
controller - service(service, serviceImpl) - dto - mapper - mapper.xml - DB
DTO 구현
기타사항
date, datetime, time format 필요
break 테이블의 break break_date로 이름 변경 필요
BreakDTO
break를 break_date로 변경 필요
import java.math.BigInteger; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime;
@Data public class BreakDTO { private BigInteger break_id; private Integer off; private LocalDate break_date; private LocalTime opening; private LocalTime close; private LocalDateTime created_at; private BigInteger room_id; }
package com.vitamin.app.dto;
import lombok.Data;
import java.math.BigInteger; import java.time.LocalTime;
@Data public class BusinessHourDTO { private BigInteger business_hour_id; private String week; private LocalTime opening; private LocalTime close; private Integer holiday; private BigInteger hospital_id; }
package com.vitamin.app.dto;
import lombok.Data;
import java.math.BigInteger;
@Data public class ClinicDTO { private BigInteger clinic_id; private String title; private String description; private BigInteger room_id; }
import lombok.Data;
import java.math.BigInteger; import java.time.LocalDate; import java.time.LocalDateTime;
@Data public class ClosedDTO { private BigInteger closed_id; private String title; private LocalDate date; private LocalDateTime created_at; private BigInteger admin_id; private BigInteger hospital_id; }
package com.vitamin.app.dto;
import lombok.Data;
import java.math.BigInteger; import java.time.LocalTime;
@Data public class ConsultationDTO { private BigInteger consultation_id; private String week; private LocalTime opening; private LocalTime close; private Integer off; private BigInteger room_id; }
package com.vitamin.app.dto;
import lombok.Data;
import java.math.BigInteger; @Data public class Disease_DTO { private BigInteger disease_id; private String name; private BigInteger user_id; }
package com.vitamin.app.dto;
import lombok.Data;
import java.math.BigInteger; import java.time.LocalDate; import java.time.LocalDateTime;
@Data public class DoctorDTO { private BigInteger doctor_id; private String email; private String name; private String position; private char Gender; private LocalDate birthdate; private String phone; private String address; private Integer banned; private LocalDate sign_out; private LocalDateTime created_at; private LocalDateTime updated_at; private BigInteger hospital_id; }
package com.vitamin.app.dto;
import lombok.Data;
import java.math.BigInteger; import java.time.LocalDate; import java.time.LocalDateTime;
@Data public class HospitalDTO { private BigInteger hospital_id; private String tel; private String owner; private LocalDate registration; private String address; private String corporate; private LocalDateTime create_at; private LocalDateTime updated_at; }
package com.vitamin.app.dto;
import lombok.Data;
import java.math.BigInteger; import java.time.LocalDate;
@Data public class MajorDTO { private BigInteger major_id; private String title; private String degree; private String school; private LocalDate graduate; private BigInteger doctor_id; }
package com.vitamin.app.dto;
import lombok.Data;
import java.math.BigInteger;
@Data public class MedicationDTO { private BigInteger medication_id; private String name; private String manufacturer; private BigInteger user_id; }
package com.vitamin.app.dto;
import lombok.Data;
import java.math.BigInteger; import java.time.LocalDateTime;
@Data public class NoticeDTO { private BigInteger notice_id; private String title; private String description; private LocalDateTime created_at; private LocalDateTime updated_at; private BigInteger hospital_id; private BigInteger admin_id; }
package com.vitamin.app.dto;
import lombok.Data;
import java.math.BigInteger; import java.time.LocalDateTime; @Data public class ReserveDTO { private BigInteger reserve_id; private LocalDateTime reservation; private Integer reservation_status; private LocalDateTime confirmed; private BigInteger user_id; private BigInteger hospital_id; private BigInteger room_id; }
package com.vitamin.app.dto;
import lombok.Data;
import java.math.BigInteger; @Data public class RoomDTO { private BigInteger room_id; private String name; private String area; private String floor; private String call_number; private BigInteger hospital_id; private BigInteger doctor_id; }
package com.vitamin.app.dto;
import lombok.Data;
import java.math.BigInteger; import java.time.LocalDate; import java.time.LocalDateTime;
@Data public class UserDTO { private BigInteger user_id; private String password; private String nickname; private String email; private String name; private char gender; private LocalDate birth_date; private String phone; private String address; private Integer banned; private LocalDateTime created_at; private LocalDateTime updated_at; private BigInteger hospital_id; }