Compare commits
5 Commits
a3f2c47f89
...
37e9cb3be1
| Author | SHA1 | Date | |
|---|---|---|---|
| 37e9cb3be1 | |||
| f5488495bc | |||
| 5fb1c2fe52 | |||
| afcea0517d | |||
|
|
0aac7742c2 |
@@ -13,6 +13,7 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
//テーブル名
|
||||||
@Table(name = "book_collection")
|
@Table(name = "book_collection")
|
||||||
@Entity
|
@Entity
|
||||||
@Data
|
@Data
|
||||||
@@ -47,7 +48,7 @@ public class Book_collectionEntity {
|
|||||||
@Column(name = "note text", nullable = true)
|
@Column(name = "note text", nullable = true)
|
||||||
private String noteText;
|
private String noteText;
|
||||||
|
|
||||||
//貸出フラグ
|
//貸出フラグ -> charに変更する
|
||||||
@Column(name = "flg_lending", length = 1, nullable = false)
|
@Column(name = "flg_lending", length = 1, nullable = false)
|
||||||
private String flgLending;
|
private String flgLending;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,101 @@
|
|||||||
package com.example.demo.entity;
|
package com.example.demo.entity;
|
||||||
|
|
||||||
|
import java.security.Timestamp;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.Audited.Table;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "borrow_books")
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
public class Borrow_booksEntity {
|
public class Borrow_booksEntity {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 申請ID
|
||||||
|
* */
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "id_request", nullable = false)
|
||||||
|
private Integer idRequest;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 申請者ID
|
||||||
|
* */
|
||||||
|
@Column(name = "id_applicant", nullable = false)
|
||||||
|
private Integer idApplicant;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 蔵書ID
|
||||||
|
* */
|
||||||
|
@Column(name = "id_book", nullable = false)
|
||||||
|
private Integer idBook;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 申請日
|
||||||
|
* */
|
||||||
|
@Column(name = "date_request", nullable = false)
|
||||||
|
private Date dateRequest;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ステータス
|
||||||
|
* */
|
||||||
|
@Column(name = "status", nullable = false)
|
||||||
|
private char 返却済 = 0;
|
||||||
|
private char 承認待 = 1;
|
||||||
|
private char 貸出中 = 2;
|
||||||
|
private char 却下 = 9;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 承認者
|
||||||
|
* */
|
||||||
|
@Column(name = "id_approval", nullable = true)
|
||||||
|
private Integer idApproval;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 承認日
|
||||||
|
* */
|
||||||
|
@Column(name = "date_approval", nullable = true)
|
||||||
|
private Date dateApproval;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 貸出日
|
||||||
|
* */
|
||||||
|
@Column(name = "date_borrow", nullable = false)
|
||||||
|
private Date dateBorrow;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 返却予定日
|
||||||
|
* */
|
||||||
|
@Column(name = "date_scheduled_return", nullable = false)
|
||||||
|
private Date dateScheduledReturn;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 返却日
|
||||||
|
* */
|
||||||
|
@Column(name = "date_return", nullable = true)
|
||||||
|
private Date dateReturn;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 更新者
|
||||||
|
* */
|
||||||
|
@Column(name = "id_update", nullable = false)
|
||||||
|
private Integer idUpdate;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 更新日
|
||||||
|
* */
|
||||||
|
@Column(name = "date_update", nullable = false)
|
||||||
|
private Timestamp dateUpdate;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.example.demo.repository;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.example.demo.entity.Book_collectionEntity;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface Book_CollectionRepository extends JpaRepository<Book_collectionEntity, Integer> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.example.demo.repository;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.example.demo.entity.Borrow_booksEntity;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface Borrow_BooksRepository extends JpaRepository<Borrow_booksEntity, Integer> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.example.demo.repository;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.example.demo.entity.EmployeeEntity;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface EmployeeRepository extends JpaRepository<EmployeeEntity, Integer> {
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user