Merge branch 'a-takayama'

This commit is contained in:
2026-10-19 15:37:17 +09:00
2 changed files with 126 additions and 1 deletions

View File

@@ -1,5 +1,119 @@
package com.example.demo.entity;
import java.sql.Date;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Table(name = "book_collection")
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Book_collectionEntity {
//蔵書ID
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id_book", nullable = false)
private Integer idBook;
//ISBN
@Column(name = "isbn", nullable = false)
private String isBn;
//書籍名
@Column(name = "nm_book", nullable = false)
private String nmBook;
//書籍名よみ
@Column(name = "kn_book", nullable = true)
private String knBook;
//出版社
@Column(name = "publisher", nullable = true)
private String pubLisher;
//特記事項
@Column(name = "note text", nullable = true)
private String noteText;
//貸出フラグ
@Column(name = "flg_lending", length = 1, nullable = false)
private String flgLending;
//更新者
@Column(name = "id_update", nullable = false)
private Integer idUpdate;
//更新日
@Column(name = "date_update", nullable = false)
private Date dateUpdate;
// public static Book_collection convertFrom(Book_collection book_collection) {
// // 値を既に持ったインスタンスの生成に、コンストラクタを使用するとこうなります。
// return new Book_collection Entity(
// book_colletion.getIdBook(),
// book_colletion.getisBn(),
// book_colletion.getnmBook(),
// book_colletion..getknBook(),
// book_colletion.getpublisher(),
// book_colletion.getnoteText(),
// book_colletion.getflgLending(),
// book_colletion.getidUpdate(),
// book_colletion.getdateUupdate()
// );
//
//}
//public static EmployeeEntity convertFrom(SearchConditionEmployee searchConditionEmployee) {
// EmployeeEntity employeeEntity = new EmployeeEntity();
//
// employeeEntity.setIdBook(searchConditionEmployee.getIdBook());
// employeeEntity.setisBn(searchConditionEmployee.getisBn());
// employeeEntity.setnmBook(searchConditionEmployee.getnmBook());
// employeeEntity.setknBook(searchConditionEmployee.knBook());
// employeeEntity.setpublisher(searchConditionEmployee.getpublisher());
// employeeEntity.setnoteText(searchConditionEmployee.getnoteText());
// employeeEntity.setflgLending(searchConditionEmployee.getflgLending());
// employeeEntity.setidUpdate(searchConditionEmployee.getidUpdate());
// employeeEntity.setdateUpdate(searchConditionEmployee.getdateUupdate());
//
//// public static List<book_collection> createbook_collectionList(List<EmployeeEntity> employeeEntityList) {
//// return employeeEntityList.stream().map(EmployeeEntity::createbook_collection).toList();
//// }
//
// List<book_collection> book_collectionList = new ArrayList<>();
// for(book_collectionEntity book_collectionEntity:employeeEntityList){
// book_collection employee = book_collectionEntity.createbook_collection(book_collectionEntity);
// book_collectionList.add(employee);
// }
// return employeeList;
//
//
// public LoginUser createLoginUser() {
// // 値を既に持ったインスタンスの生成に、コンストラクタを使用するとこうなります。
// return new LoginUser(
// getidBook(),
// getisBn(),
// getnmBook(),
// getknBook(),
// getpublisher(),
// getnoteText(),
// getflgLending(),
// getidUpdate(),
// getdateUpdate()
// );
// }
}