feat: add job seeker notice settings API
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.cms.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 移动端求职者消息接收设置。
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("移动端求职者消息接收设置")
|
||||
@TableName("app_user_notice_setting")
|
||||
public class AppUserNoticeSetting extends BaseEntity
|
||||
{
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** APP 用户 ID,每名用户仅有一条设置。 */
|
||||
private Long userId;
|
||||
|
||||
/** 职位上新。 */
|
||||
private Boolean jobUpdateEnabled;
|
||||
|
||||
/** 招聘会预约提醒。 */
|
||||
private Boolean appointmentReminderEnabled;
|
||||
|
||||
/** 平台系统通知。 */
|
||||
private Boolean systemNotificationEnabled;
|
||||
|
||||
/** 企业面试通知。 */
|
||||
private Boolean interviewNotificationEnabled;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.ruoyi.cms.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 移动端消息接收设置保存请求。
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("移动端消息接收设置保存请求")
|
||||
public class NoticeSettingRequest
|
||||
{
|
||||
@NotNull(message = "职位上新开关不能为空")
|
||||
@ApiModelProperty(value = "是否接收职位上新通知", required = true, example = "true")
|
||||
private Boolean jobUpdateEnabled;
|
||||
|
||||
@NotNull(message = "预约提醒开关不能为空")
|
||||
@ApiModelProperty(value = "是否接收招聘会预约提醒", required = true, example = "true")
|
||||
private Boolean appointmentReminderEnabled;
|
||||
|
||||
@NotNull(message = "系统通知开关不能为空")
|
||||
@ApiModelProperty(value = "是否接收系统通知", required = true, example = "true")
|
||||
private Boolean systemNotificationEnabled;
|
||||
|
||||
@NotNull(message = "面试通知开关不能为空")
|
||||
@ApiModelProperty(value = "是否接收面试通知", required = true, example = "true")
|
||||
private Boolean interviewNotificationEnabled;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.ruoyi.cms.domain.vo;
|
||||
|
||||
import com.ruoyi.cms.domain.AppUserNoticeSetting;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 移动端消息接收设置返回对象。
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("移动端消息接收设置")
|
||||
public class NoticeSettingVO
|
||||
{
|
||||
@ApiModelProperty(value = "是否接收职位上新通知", example = "true")
|
||||
private Boolean jobUpdateEnabled;
|
||||
|
||||
@ApiModelProperty(value = "是否接收招聘会预约提醒", example = "true")
|
||||
private Boolean appointmentReminderEnabled;
|
||||
|
||||
@ApiModelProperty(value = "是否接收系统通知", example = "true")
|
||||
private Boolean systemNotificationEnabled;
|
||||
|
||||
@ApiModelProperty(value = "是否接收面试通知", example = "true")
|
||||
private Boolean interviewNotificationEnabled;
|
||||
|
||||
public static NoticeSettingVO from(AppUserNoticeSetting setting)
|
||||
{
|
||||
NoticeSettingVO result = new NoticeSettingVO();
|
||||
result.setJobUpdateEnabled(setting.getJobUpdateEnabled());
|
||||
result.setAppointmentReminderEnabled(setting.getAppointmentReminderEnabled());
|
||||
result.setSystemNotificationEnabled(setting.getSystemNotificationEnabled());
|
||||
result.setInterviewNotificationEnabled(setting.getInterviewNotificationEnabled());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user