修改完善实体类
This commit is contained in:
parent
2501b43fcc
commit
cca9181b72
@ -1,5 +1,10 @@
|
|||||||
# Homework-Ele
|
# Homework-entities
|
||||||
*网安实训作业*
|
*网安实训作业*
|
||||||
|
|
||||||
20230316
|
# 20230316
|
||||||
- 初始化项目
|
- 初始化项目
|
||||||
|
# 20230322
|
||||||
|
- 增加实体类
|
||||||
|
- 删除.idea文件
|
||||||
|
# 20230326
|
||||||
|
- 完善实体类
|
||||||
|
14
src/main/java/entities/Indent.java
Normal file
14
src/main/java/entities/Indent.java
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package entities;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
//订单类
|
||||||
|
@Data
|
||||||
|
public class Indent {
|
||||||
|
private Long id;//订单ID
|
||||||
|
private indentItem indentItemID;//外键,菜品ID
|
||||||
|
private Users userID;//外键,下单用户ID
|
||||||
|
private Merchants merchantsID;//外键,餐厅ID
|
||||||
|
private Float allPrice;//菜品总价
|
||||||
|
|
||||||
|
}
|
14
src/main/java/entities/Merchants.java
Normal file
14
src/main/java/entities/Merchants.java
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package entities;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
//商家类
|
||||||
|
@Data
|
||||||
|
public class Merchants {
|
||||||
|
private Long id;//商家编号
|
||||||
|
private String name;//店铺名字
|
||||||
|
private String address;//店铺地址
|
||||||
|
private Indent IndentID;//外键,订单ID
|
||||||
|
|
||||||
|
|
||||||
|
}
|
12
src/main/java/entities/Users.java
Normal file
12
src/main/java/entities/Users.java
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package entities;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
//用户类
|
||||||
|
@Data
|
||||||
|
public class Users {
|
||||||
|
private Long id;
|
||||||
|
private String name;//用户姓名
|
||||||
|
private String phoneNumber;//用户联系方式
|
||||||
|
private String address;//家庭住址
|
||||||
|
}
|
11
src/main/java/entities/indentItem.java
Normal file
11
src/main/java/entities/indentItem.java
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package entities;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class indentItem {
|
||||||
|
private Long id;//菜品ID
|
||||||
|
private String name;//菜品名字
|
||||||
|
private Float price;//菜品价格
|
||||||
|
private String description;//菜品描述
|
||||||
|
}
|
@ -2,11 +2,9 @@ package org.example;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hello world!
|
* Hello world!
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class App
|
public class App {
|
||||||
{
|
public static void main(String[] args) {
|
||||||
public static void main( String[] args ) {
|
System.out.println("Hello World!");
|
||||||
System.out.println( "Hello World!" );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user