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; + } + +}