1.3 KiB
请帮我将以下表转换为Java POJO对象,不需要getter和setter
CREATE TABLE goods_order_details
(
order_detail_id
int(11) NOT NULL AUTO_INCREMENT COMMENT '订单详情ID',
order_id
int(11) NOT NULL COMMENT '订单ID',
product_id
int(11) NOT NULL COMMENT '商品ID',
product_quantity
int(11) NOT NULL COMMENT '商品数量',
PRIMARY KEY (order_detail_id
) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
CREATE TABLE orders
(
order_id
int(11) NOT NULL AUTO_INCREMENT COMMENT '订单ID',
user_id
int(11) NOT NULL COMMENT '用户ID',
order_date
date NOT NULL COMMENT '订单日期',
order_status
enum('Pending','Processing','Shipped','Delivered','Cancelled') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '订单状态',
PRIMARY KEY (order_id
) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
例如:Good的对象为 @Data public class Good { Long id; String goodsName; Integer categoryId; String brand; String gallery; String brief; Boolean isOnSale; String picUrl; Integer type; String unit; Double counterPrice; Double retailPrice; String detail; Boolean deleted; }