9 Commits
Author SHA1 Message Date
vladp d97b7e679f fix type GF_AUTH
Test Workflow / test (push) Successful in 2s
2025-12-08 13:09:31 +07:00
vladp 530477fb75 add healt chekc status
Test Workflow / test (push) Successful in 2s
2025-12-08 12:38:56 +07:00
vladp 6a78475844 Merge remote-tracking branch 'origin/dev' into dev
Test Workflow / test (push) Successful in 1m26s
2025-12-01 11:39:27 +07:00
vladp 8a4b8e49f1 add test workflow 2025-12-01 11:39:15 +07:00
backdev 235ea7143a Удалить .gitea 2025-12-01 12:37:06 +08:00
backdev 520d2df3a9 Добавить .gitea 2025-12-01 12:34:24 +08:00
backdev 3b0803bef3 Удалить job.yaml 2025-12-01 12:33:50 +08:00
backdev 7d17b8d617 Обновить job.yaml 2025-12-01 12:32:06 +08:00
backdev c51608276d Добавить job 2025-12-01 12:31:34 +08:00
8 changed files with 33 additions and 121 deletions
+17
View File
@@ -0,0 +1,17 @@
name: Test Workflow
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Print environment variables
run: |
echo "GITHUB_REPOSITORY: $GITHUB_REPOSITORY"
echo "GITHUB_SHA: $GITHUB_SHA"
echo "GITHUB_REF: $GITHUB_REF"
echo "GITHUB_ACTOR: $GITHUB_ACTOR"
echo "PATH: $PATH"
+1 -1
View File
@@ -44,7 +44,7 @@ services:
alloy:
condition: service_started
environment:
GF_AUTH_ANONYMOUS_ENABLED: true
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
GF_METRICS_ENABLED: "true"
@@ -0,0 +1,15 @@
package ru.soune.no_copy.controller;
import org.apache.coyote.Response;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/api")
public class HealtCheckController {
@GetMapping("/healt")
public HttpStatus healtCheck() {
return HttpStatus.OK;
}
}
@@ -1,17 +0,0 @@
package ru.soune.no_copy.dto;
import ru.soune.no_copy.entity.ContentStatus;
import ru.soune.no_copy.entity.FileType;
import java.time.LocalDateTime;
public record UserContentResponse(
Long id,
String filename,
String originalFilename,
FileType fileType,
long fileSize,
String filePath,
ContentStatus status,
LocalDateTime uploadDate
) {}
@@ -1,5 +0,0 @@
package ru.soune.no_copy.entity;
public enum ContentStatus {
PROCESSING, COMPLETED, ERROR
}
@@ -1,5 +0,0 @@
package ru.soune.no_copy.entity;
public enum FileType {
PHOTO, DOCUMENT, AUDIO, VIDEO
}
@@ -1,73 +0,0 @@
package ru.soune.no_copy.entity;
import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.CreationTimestamp;
import java.time.LocalDateTime;
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Getter @Setter
@Table(name = "user_content",
indexes = {
@Index(name = "idx_user_id", columnList = "user_id"),
@Index(name = "idx_file_type", columnList = "file_type"),
@Index(name = "idx_upload_date", columnList = "upload_date")
})
public class UserContent {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id", nullable = false,
foreignKey = @ForeignKey(name = "fk_usercontent_user"))
private User user;
@Column(nullable = false)
private String filename;
@Column(name = "original_filename", nullable = false)
private String originalFilename;
@Enumerated(EnumType.STRING)
@Column(name = "file_type", nullable = false, length = 16)
private FileType fileType;
@Column(name = "file_extension", length = 16)
private String fileExtension;
@Column(name = "file_size", nullable = false)
private Long fileSize;
@Column(name = "file_path", columnDefinition = "TEXT", nullable = false)
private String filePath;
@Column(name = "protection_level")
private Integer protectionLevel;
@Column(name = "geometric_resistant")
private Boolean geometricResistant = false;
@Column(name = "watermark_applied")
private Boolean watermarkApplied = false;
@Column(name = "protection_hash", length = 64)
private String protectionHash;
@Column(name = "watermark_id", length = 50)
private String watermarkId;
@Enumerated(EnumType.STRING)
@Column(length = 16)
private ContentStatus status = ContentStatus.PROCESSING;
@CreationTimestamp
@Column(name = "upload_date", nullable = false, updatable = false)
private LocalDateTime uploadDate;
}
@@ -1,20 +0,0 @@
package ru.soune.no_copy.repository;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import ru.soune.no_copy.entity.FileType;
import ru.soune.no_copy.entity.UserContent;
import java.util.List;
public interface UserContentRepository extends JpaRepository<UserContent, Long> {
List<UserContent> findByUserIdOrderByUploadDateDesc(Long userId);
List<UserContent> findByUserIdAndFileTypeOrderByUploadDateDesc(
Long userId, FileType type, Pageable pageable
);
long countByUserIdAndFileType(Long userId, FileType type);
long countByUserId(Long userId);
}