feat: 增加DDL语句生成小工具
This commit is contained in:
@@ -9,7 +9,6 @@ import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.EntityListeners;
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import jakarta.persistence.ManyToMany;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.Table;
|
||||
import java.time.LocalDate;
|
||||
@@ -74,10 +73,6 @@ public class Stock extends SimpleEntity {
|
||||
@ToString.Exclude
|
||||
private Set<CashFlow> cashFlows;
|
||||
|
||||
@ManyToMany
|
||||
@ToString.Exclude
|
||||
private Set<StockCollection> collections;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum Market implements SimpleEnum {
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.lanyuanxiaoyao.leopard.core;
|
||||
|
||||
import com.lanyuanxiaoyao.service.template.util.DDLGenerator;
|
||||
import org.hibernate.dialect.PostgreSQLDialect;
|
||||
import org.postgresql.Driver;
|
||||
|
||||
/**
|
||||
* 建表语句
|
||||
*
|
||||
* @author lanyuanxiaoyao
|
||||
* @version 20250911
|
||||
*/
|
||||
public class GenerateDDL {
|
||||
public static void main(String[] args) {
|
||||
DDLGenerator.generateDDL(
|
||||
"com.lanyuanxiaoyao.leopard.core.entity",
|
||||
"/Users/lanyuanxiaoyao/Project/IdeaProjects/leopard/leopard-core/target",
|
||||
PostgreSQLDialect.class,
|
||||
"jdbc:postgresql://81.71.3.24:6785/leopard_dev",
|
||||
"leopard",
|
||||
"9NEzFzovnddf@PyEP?e*AYAWnCyd7UhYwQK$pJf>7?ccFiN^x4$eKEZ5~E<7<+~X",
|
||||
Driver.class
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user