add section admin permission
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package ru.soune.nocopy.adminpanel.entity;
|
||||
|
||||
public enum AdminSection {
|
||||
DASH,
|
||||
USERS,
|
||||
STAFF,
|
||||
SUBSCRIPTIONS,
|
||||
TARIFFS,
|
||||
CONTENT_MODERATION,
|
||||
COMPLAINTS,
|
||||
CLAIMS,
|
||||
MAILINGS,
|
||||
API,
|
||||
MONEY,
|
||||
KYC,
|
||||
AGREEMENTS
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package ru.soune.nocopy.adminpanel.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
@Table(name = "admin_section_permissions")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
public class AdminSectionPermission {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "user_id", nullable = false, unique = true)
|
||||
private Long userId;
|
||||
|
||||
@Column(name = "dash", nullable = false)
|
||||
private Integer dash = 0b00;
|
||||
|
||||
@Column(name = "users", nullable = false)
|
||||
private Integer users = 0b00;
|
||||
|
||||
@Column(name = "staff", nullable = false)
|
||||
private Integer staff = 0b00;
|
||||
|
||||
@Column(name = "subscriptions", nullable = false)
|
||||
private Integer subscriptions = 0b00;
|
||||
|
||||
@Column(name = "tariffs", nullable = false)
|
||||
private Integer tariffs = 0b00;
|
||||
|
||||
@Column(name = "content_moderation", nullable = false)
|
||||
private Integer contentModeration = 0b00;
|
||||
|
||||
@Column(name = "complaints", nullable = false)
|
||||
private Integer complaints = 0b00;
|
||||
|
||||
@Column(name = "claims", nullable = false)
|
||||
private Integer claims = 0b00;
|
||||
|
||||
@Column(name = "mailings", nullable = false)
|
||||
private Integer mailings = 0b00;
|
||||
|
||||
@Column(name = "api", nullable = false)
|
||||
private Integer api = 0b00;
|
||||
|
||||
@Column(name = "money", nullable = false)
|
||||
private Integer money = 0b00;
|
||||
|
||||
@Column(name = "kyc", nullable = false)
|
||||
private Integer kyc = 0b00;
|
||||
|
||||
@Column(name = "agreements", nullable = false)
|
||||
private Integer agreements = 0b00;
|
||||
|
||||
@CreatedDate
|
||||
@Column(name = "created_at", updatable = false)
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
@LastModifiedDate
|
||||
@Column(name = "updated_at")
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
Reference in New Issue
Block a user