12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package com.zzys.lightting.template.dao.model;
- import com.zzys.lightting.base.model.BaseEntity;
- import lombok.*;
- import org.hibernate.Hibernate;
- import org.hibernate.annotations.DynamicUpdate;
- import javax.persistence.Column;
- import javax.persistence.Entity;
- import javax.persistence.Table;
- import java.util.Objects;
- /**
- * @Author: zzf
- * @Date: 2024/5/23:16:20
- * @Description:
- */
- @Entity
- @ToString
- @RequiredArgsConstructor
- @Getter
- @Setter
- @AllArgsConstructor
- @Table(name = "lt_template_music_info")
- @org.hibernate.annotations.Table(appliesTo = "lt_template_music_info", comment = "音乐模板表")
- @DynamicUpdate
- public class TemplateMusicInfo extends BaseEntity {
- @Column(name = "template_id",columnDefinition = "varchar(50) not null comment '模板id'")
- private String templateId;
- @Column(name = "music_id",columnDefinition = "varchar(50) not null comment '音乐id'")
- private String musicId;
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
- TemplateMusicInfo that = (TemplateMusicInfo) o;
- return getId() != null && Objects.equals(getId(), that.getId());
- }
- @Override
- public int hashCode() {
- return getClass().hashCode();
- }
- }
|