/* * Copyright 2019-2020 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package me.zhengjie.modules.treatment.domain; import lombok.Data; import lombok.Getter; import lombok.Setter; import lombok.ToString; import me.zhengjie.base.BaseEntity; import me.zhengjie.modules.system.domain.Dept; import me.zhengjie.modules.system.domain.Job; import cn.hutool.core.bean.BeanUtil; import io.swagger.annotations.ApiModelProperty; import cn.hutool.core.bean.copier.CopyOptions; import javax.persistence.*; import javax.validation.constraints.*; import java.sql.Timestamp; import java.util.List; import java.io.Serializable; import java.math.BigDecimal; /** * @website https://eladmin.vip * @description / * @author 姚增春 * @date 2023-05-07 **/ @Entity @Data @Table(name="new_cmn_level") public class CmnLevel extends BaseEntity implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "`id`") @ApiModelProperty(value = "ID") private Long id; @NotNull @ApiModelProperty(value = "岗位") @ManyToOne @JoinColumn(name = "job_id", nullable = false) private Job job; @Column(name = "`name`",nullable = false) @NotBlank @ApiModelProperty(value = "名称") private String name; @OneToMany(mappedBy = "level", cascade= {CascadeType.PERSIST, CascadeType.REMOVE}) private List cmnLevelRankList; @Column(name = "`basic_wage`",nullable = false) @NotNull @ApiModelProperty(value = "基本工资") private BigDecimal basicWage; @Column(name = "`rank_wage`",nullable = false) @NotNull @ApiModelProperty(value = "浮动工资") private BigDecimal rankWage; @Column(name = "`performance_wage`",nullable = false) @NotNull @ApiModelProperty(value = "绩效工资") private BigDecimal performanceWage; @Column(name = "`description`") @ApiModelProperty(value = "描述") private String description; public void copy(CmnLevel source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } }