From 55911bdc405891f1cc2f36352fc447ea689a64a1 Mon Sep 17 00:00:00 2001 From: chanhengseang Date: Sun, 18 May 2025 19:07:54 -0700 Subject: [PATCH] add some tables --- .../db/migration/V6__add_event_link.sql | 27 +++++++++++++++++++ sport/src/main/java/com/srr/domain/Event.java | 4 +++ .../java/com/srr/service/dto/EventDto.java | 3 +++ 3 files changed, 34 insertions(+) create mode 100644 eladmin-system/src/main/resources/db/migration/V6__add_event_link.sql diff --git a/eladmin-system/src/main/resources/db/migration/V6__add_event_link.sql b/eladmin-system/src/main/resources/db/migration/V6__add_event_link.sql new file mode 100644 index 00000000..d9f94ef3 --- /dev/null +++ b/eladmin-system/src/main/resources/db/migration/V6__add_event_link.sql @@ -0,0 +1,27 @@ +alter table event + add column public_link varchar(255); + +create table match_group +( + id bigint auto_increment primary key, + create_time datetime, + size int default 2 not null, + name varchar(255) not null, + score int default 0 +); + +create table group_player +( + id bigint auto_increment primary key, + player_id bigint not null references player (id), + group_id bigint not null references match_group (id) +); + +create table sport_match +( + id bigint auto_increment primary key, + event_id bigint not null references event (id), + name varchar(32) not null comment '名称', + create_time datetime null comment '创建时间', + enabled bit null comment '是否启用' +); \ No newline at end of file diff --git a/sport/src/main/java/com/srr/domain/Event.java b/sport/src/main/java/com/srr/domain/Event.java index 8ce3604f..143ef707 100644 --- a/sport/src/main/java/com/srr/domain/Event.java +++ b/sport/src/main/java/com/srr/domain/Event.java @@ -101,6 +101,10 @@ public class Event implements Serializable { @ApiModelProperty(value = "clubId") private Long clubId; + @Column(name = "`public_link`") + @ApiModelProperty(value = "publicLink", accessMode = ApiModelProperty.AccessMode.READ_ONLY) + private String publicLink; + @NotNull @Column(name = "`sport_id`",nullable = false) @ApiModelProperty(value = "sportId") diff --git a/sport/src/main/java/com/srr/service/dto/EventDto.java b/sport/src/main/java/com/srr/service/dto/EventDto.java index 1e02f986..e7e79ae9 100644 --- a/sport/src/main/java/com/srr/service/dto/EventDto.java +++ b/sport/src/main/java/com/srr/service/dto/EventDto.java @@ -70,6 +70,9 @@ public class EventDto implements Serializable { @ApiModelProperty(value = "clubId") private Long clubId; + @ApiModelProperty(value = "publicLink") + private String publicLink; + @ApiModelProperty(value = "sportId") private Long sportId;