package com.example.demo.model.iot;/* * Copyright © 2020-2035 erupt.xyz All rights reserved. * Author: YuePeng (erupts@126.com) */ import javax.persistence.*; import xyz.erupt.annotation.*; import xyz.erupt.annotation.sub_erupt.*; import xyz.erupt.annotation.sub_field.*; import xyz.erupt.annotation.sub_field.sub_edit.*; import xyz.erupt.upms.model.EruptUser; import xyz.erupt.upms.model.base.HyperModel; import xyz.erupt.jpa.model.BaseModel; import java.util.Set; import java.util.Date; @Erupt(name = "周期任务") @Table(name = "t_task_period") @Entity public class PeriodTask extends BaseModel { @EruptField( views = @View( title = "任务名称", sortable = true ), edit = @Edit( title = "任务名称", type = EditType.INPUT, search = @Search, notNull = true, inputType = @InputType ) ) private String task_def; @EruptField( views = @View( title = "开始时间(例01:30)", sortable = true ), edit = @Edit( title = "开始时间(例01:30)", type = EditType.INPUT, search = @Search, notNull = true, inputType = @InputType ) ) private String start_time; @EruptField( views = @View( title = "结束时间", sortable = true ), edit = @Edit( title = "结束时间", type = EditType.INPUT, search = @Search, notNull = true, inputType = @InputType ) ) private String end_time; @EruptField( views = @View( title = "间隔(秒)", sortable = true ), edit = @Edit( title = "间隔(秒)", type = EditType.NUMBER, search = @Search, notNull = true, numberType = @NumberType ) ) private Integer period; @EruptField( views = @View( title = "频率值" ), edit = @Edit( title = "频率值", type = EditType.INPUT, search = @Search, notNull = true, inputType = @InputType ) ) private String frequency; @EruptField( views = @View( title = "执行指令", sortable = true ), edit = @Edit( title = "执行指令", type = EditType.TEXTAREA, search = @Search, notNull = true ) ) private @Lob String taskcmd; @EruptField( views = @View( title = "任务制作人" ), edit = @Edit( title = "任务制作人", type = EditType.CHECKBOX, search = @Search, notNull = true, checkboxType = @CheckboxType(id = "id", label = "name") ) ) @ManyToMany @JoinTable(name = "period_task_erupt_user", joinColumns = @JoinColumn(name = "period_task_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "erupt_user_id", referencedColumnName = "id")) private Set createuser; @EruptField( views = @View( title = "状态", sortable = true ), edit = @Edit( title = "状态", type = EditType.BOOLEAN, search = @Search, notNull = true, boolType = @BoolType ) ) private Boolean status; }