| | |
| | | package com.rongyichuang.common.entity; |
| | | |
| | | import jakarta.persistence.*; |
| | | import org.hibernate.annotations.Where; |
| | | |
| | | @Entity |
| | | @Table(name = "t_media") |
| | | @Where(clause = "state = 1") |
| | | public class Media extends BaseEntity { |
| | | |
| | | @Column(name = "name", length = 255) |
| | |
| | | @Column(name = "description", length = 255) |
| | | private String description; |
| | | |
| | | // 移除mediaState字段,使用继承自BaseEntity的state字段 |
| | | /** |
| | | * 状态:1-正常,0-删除 |
| | | */ |
| | | @Column(name = "state", nullable = false) |
| | | private Integer state = 1; |
| | | |
| | | @Column(name = "target_type", nullable = false) |
| | | private Integer targetType; |
| | |
| | | public void setMediaType(Integer mediaType) { |
| | | this.mediaType = mediaType; |
| | | } |
| | | |
| | | public Integer getState() { |
| | | return state; |
| | | } |
| | | |
| | | public void setState(Integer state) { |
| | | this.state = state; |
| | | } |
| | | } |