From 9cc8f77c4e2cf5b15ffc98e4681d8667515c21ab Mon Sep 17 00:00:00 2001 From: chuyan <1047381936@qq.com> Date: Thu, 13 Feb 2020 15:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=88=9D=E5=A7=8B=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ase/model/permission/Activity.java | 74 +++++++++++++++++++ .../ase/model/permission/Period.java | 36 +++++++++ 2 files changed, 110 insertions(+) create mode 100644 src/main/java/com/codesdream/ase/model/permission/Activity.java create mode 100644 src/main/java/com/codesdream/ase/model/permission/Period.java diff --git a/src/main/java/com/codesdream/ase/model/permission/Activity.java b/src/main/java/com/codesdream/ase/model/permission/Activity.java new file mode 100644 index 0000000..2d98a37 --- /dev/null +++ b/src/main/java/com/codesdream/ase/model/permission/Activity.java @@ -0,0 +1,74 @@ +package com.codesdream.ase.model.permission; + +import jdk.jfr.DataAmount; +import lombok.Data; +import org.hibernate.annotations.Cascade; +import sun.security.x509.DNSName; + +import javax.persistence.*; +import java.util.Set; + +@Entity +@Table(name = "activity_container") +@Data +public class Activity { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int id; + + //活动标题 + @Column(nullable = false) + private String title; + + //创建人 + @Column(nullable = false) + private String creator; + + //活动类型1qa + @Column(nullable = false) + private String type; + + //活动描述 + @Column(nullable = true) + private String description; + + //自愿参与人列表 + @ManyToMany(cascade = CascadeType.ALL) + @JoinTable(name = "act_volunteer") + private Set volunteers; + + + @ManyToMany(cascade = CascadeType.ALL) + @JoinTable(name = "act_participate", joinColumns = { + @JoinColumn(name = "act_id") + }) + private Set participateGroup; + + private Set participatedGroup; + private Set signGroup; + private Set signedGroup; + private Set visibleGroup; + private Set informGroup; + private Set informedGroup; + private Period planPeriod; + private Period realPe + /* +participated_group list +sign_group list +signed_group list +visible_group list +inform_group list +informed_group list +plan_t_id long +real_t_id long +remind_time string +enclosure_id list +chief_manager long +assist_manager list +is_on bool +is_finished bool +c_id long + + */ + +} \ No newline at end of file diff --git a/src/main/java/com/codesdream/ase/model/permission/Period.java b/src/main/java/com/codesdream/ase/model/permission/Period.java new file mode 100644 index 0000000..062c2fe --- /dev/null +++ b/src/main/java/com/codesdream/ase/model/permission/Period.java @@ -0,0 +1,36 @@ +package com.codesdream.ase.model.permission; + +import lombok.Data; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; + +import javax.persistence.*; +import java.util.Date; +import java.util.Objects; + +@Entity +@Table(name = "period_container") +@Data +public class Period { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int id; + + //开始时间 + @Column(name = "start_time", nullable = false) + private Date startTime; + + //结束时间 + @Column(name = "end_time", nullable = false) + private Date endTime; + + //启用状体 + @Column(name = "enabled", nullable = false) + private boolean enabled; + + public Period(Date startTime, Date endTime, boolean enabled) { + this.startTime = startTime; + this.endTime = endTime; + this.enabled = enabled; + } + +}