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.
52 lines
1.4 KiB
52 lines
1.4 KiB
package com.mathvision.diet.entity;
|
|
|
|
import com.alibaba.fastjson2.JSONWriter;
|
|
import com.alibaba.fastjson2.annotation.JSONField;
|
|
import com.mathvision.diet.convert.AuthTypeConvert;
|
|
import com.mathvision.diet.domian.AuthType;
|
|
import lombok.*;
|
|
|
|
import javax.persistence.*;
|
|
import java.time.Instant;
|
|
|
|
@Builder
|
|
@AllArgsConstructor
|
|
@NoArgsConstructor
|
|
@Getter
|
|
@Setter
|
|
@Entity
|
|
@Table(name = "role_item")
|
|
public class RoleItem {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
@Column(name = "id", nullable = false)
|
|
private Long id;
|
|
|
|
@Column(name = "item_name", nullable = false, length = 45)
|
|
private String itemName;
|
|
|
|
@Column(name = "category", nullable = false, length = 50)
|
|
private String category;
|
|
|
|
@JSONField(serializeFeatures = { JSONWriter.Feature.WriteEnumUsingToString })
|
|
@Convert(converter = AuthTypeConvert.class)
|
|
@Column(name = "item_type", columnDefinition="ENUM('管理端','业务端')", nullable = false)
|
|
private AuthType itemType;
|
|
|
|
@JSONField(serialize = false)
|
|
@Column(name = "item_value", nullable = false)
|
|
private String itemValue;
|
|
|
|
@JSONField(serialize = false)
|
|
@Column(name = "operate", length = 45)
|
|
private String operate;
|
|
|
|
@JSONField(serialize = false)
|
|
@Column(name = "created")
|
|
private Instant created;
|
|
|
|
@JSONField(serialize = false)
|
|
@Column(name = "modify")
|
|
private Instant modify;
|
|
}
|