Merge branch 'main' of https://gitea.it-college.co.jp/2026_0910_AI_5G_Java_MUN/last-group-delevelopment-team1 into m-endo
This commit is contained in:
11
.project
Normal file
11
.project
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>last-group-delevelopment-team1</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@@ -1,5 +1,123 @@
|
|||||||
package com.example.demo.entity;
|
package com.example.demo.entity;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
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 org.springframework.data.annotation.LastModifiedDate;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
//テーブル名
|
||||||
|
@Table(name = "book_collection")
|
||||||
|
@Entity
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
public class Book_collectionEntity {
|
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;
|
||||||
|
|
||||||
|
//貸出フラグ -> charに変更する
|
||||||
|
@Column(name = "flg_lending", nullable = false, columnDefinition = "default 0")
|
||||||
|
private Character flgLending;
|
||||||
|
|
||||||
|
//更新者
|
||||||
|
@Column(name = "id_update", nullable = false)
|
||||||
|
private Integer idUpdate;
|
||||||
|
|
||||||
|
//更新日
|
||||||
|
@Column(name = "date_update", nullable = false)
|
||||||
|
@LastModifiedDate
|
||||||
|
private Timestamp 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()
|
||||||
|
// );
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import jakarta.persistence.GenerationType;
|
|||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
|
|
||||||
import org.hibernate.annotations.Audited.Table;
|
import org.hibernate.annotations.Audited.Table;
|
||||||
|
import org.springframework.data.annotation.LastModifiedDate;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -20,6 +21,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
|
||||||
public class Borrow_booksEntity {
|
public class Borrow_booksEntity {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -51,11 +53,8 @@ public class Borrow_booksEntity {
|
|||||||
/*
|
/*
|
||||||
* ステータス
|
* ステータス
|
||||||
* */
|
* */
|
||||||
@Column(name = "status", nullable = false)
|
@Column(name = "status", nullable = false, columnDefinition = "default 1")
|
||||||
private char 返却済 = 0;
|
private Character status;
|
||||||
private char 承認待 = 1;
|
|
||||||
private char 貸出中 = 2;
|
|
||||||
private char 却下 = 9;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 承認者
|
* 承認者
|
||||||
@@ -97,5 +96,6 @@ public class Borrow_booksEntity {
|
|||||||
* 更新日
|
* 更新日
|
||||||
* */
|
* */
|
||||||
@Column(name = "date_update", nullable = false)
|
@Column(name = "date_update", nullable = false)
|
||||||
|
@LastModifiedDate
|
||||||
private Timestamp dateUpdate;
|
private Timestamp dateUpdate;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user