package com.ydtech.modules.admin.model.po; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.ydtech.modules.admin.model.vo.wechat.SysWechatCustomerDutyRulesVo; import com.ydtech.utils.DateTimeUtil; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.time.LocalDateTime; /** * 微信客服值班时间 * * @TableName sys_wechat_customer_duty */ @TableName(value = "sys_wechat_customer_duty") @AllArgsConstructor @NoArgsConstructor @Data public class SysWechatCustomerDuty implements Serializable { /** * 主键 */ @TableId(value = "id", type = IdType.AUTO) private long id; /** * 值班客服 */ @TableField(value = "duty_customer_id") private long dutyCustomerId; /** * 值班开始时间 */ @TableField(value = "start_time") private LocalDateTime startTime; /** * 值班结束时间 */ @TableField(value = "end_time") private LocalDateTime endTime; /** * 客服id */ @TableField(value = "customer_id") private long customerId; @TableField(exist = false) private static final long serialVersionUID = 1L; public SysWechatCustomerDuty(long customerId, long dutyCustomerId, SysWechatCustomerDutyRulesVo.DutyDateTime dutyDateTime) { this.startTime = DateTimeUtil.parseLocalDateTime(dutyDateTime.getStartTime(), DateTimeUtil.DATETIME_PATTERN); this.endTime = DateTimeUtil.parseLocalDateTime(dutyDateTime.getEndTime(), DateTimeUtil.DATETIME_PATTERN); this.customerId = customerId; this.dutyCustomerId = dutyCustomerId; } }