You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
700 B
16 lines
700 B
package com.mydreamjob.profileimage;
|
|
|
|
import jakarta.persistence.*;
|
|
import lombok.*;
|
|
|
|
/** 仅保存重新编码后的展示图片;与 URL 引用在同一事务提交。 */
|
|
@Entity
|
|
@Table(name = "profile_images", uniqueConstraints = @UniqueConstraint(columnNames = {"owner_user_id", "kind"}))
|
|
@Getter @Setter @NoArgsConstructor
|
|
public class ProfileImage {
|
|
@Id @Column(length = 36) private String id;
|
|
@Column(name = "owner_user_id", nullable = false) private Long ownerUserId;
|
|
@Column(name = "company_id") private Long companyId;
|
|
@Column(nullable = false, length = 10) private String kind;
|
|
@Lob @Column(nullable = false, columnDefinition = "MEDIUMBLOB") private byte[] content;
|
|
}
|
|
|