活动初始添加

This commit is contained in:
chuyan 2020-02-13 15:16:58 +08:00 committed by yourtree
parent 554d6ec7b9
commit 9cc8f77c4e
2 changed files with 110 additions and 0 deletions

View File

@ -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<User> volunteers;
@ManyToMany(cascade = CascadeType.ALL)
@JoinTable(name = "act_participate", joinColumns = {
@JoinColumn(name = "act_id")
})
private Set<User> participateGroup;
private Set<User> participatedGroup;
private Set<User> signGroup;
private Set<User> signedGroup;
private Set<User> visibleGroup;
private Set<User> informGroup;
private Set<User> informedGroup;
private Period planPeriod;
private Period realPe
/*
participated_group list<long>
sign_group list<long>
signed_group list<long>
visible_group list<long>
inform_group list<long>
informed_group list<long>
plan_t_id long
real_t_id long
remind_time string
enclosure_id list<long>
chief_manager long
assist_manager list<long>
is_on bool
is_finished bool
c_id long
*/
}

View File

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