package cn.reghao.tnb.user.app.model.po;

import cn.reghao.jutil.jdk.web.db.BaseObject;
import lombok.Getter;
import lombok.NoArgsConstructor;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
 * @author reghao
 * @date 2024-02-14 14:58:31
 */
@NoArgsConstructor
@Getter
public class UserProfile extends BaseObject<Integer> {
    @NotNull
    private Long userId;
    @NotNull
    private Integer gender;
    @NotNull
    @Size(max = 255, message = "signature 不能超过 255 个字符")
    private String signature;
    @NotNull
    private Integer following;
    @NotNull
    private Integer follower;

    public UserProfile(long userId) {
        this.userId = userId;
        this.gender = 2;
        this.signature = "";
        this.following = 0;
        this.follower = 0;
    }

    @Deprecated
    public UserProfile(long userId, int gender, String signature) {
        this.userId = userId;
        this.gender = gender;
        this.signature = signature;
        this.following = 0;
        this.follower = 0;
    }
}
