package shared

type FileManagerFileAttributes struct {
	FileUUID            string `json:"file_uuid,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	FolderID            string `json:"folder_id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name                string `json:"name" example:"policy.pdf"`
	NameNormalized      string `json:"name_normalized,omitempty" example:"policy.pdf"`
	Extension           string `json:"extension,omitempty" example:"pdf"`
	SizeBytes           int64  `json:"size_bytes" example:"1024"`
	MimeType            string `json:"mime_type" example:"application/pdf"`
	IsTemplate          bool   `json:"is_template" example:"true"`
	DownloadURL         string `json:"download_url,omitempty" example:"https://s3.localhost.localstack.cloud:4566/wucher-file-dev/files/2026/04/05/policy.pdf?X-Amz-Signature=..."`
	Status              string `json:"status" example:"validated"`
	FailureReason       string `json:"failure_reason,omitempty" example:""`
	UploadError         string `json:"upload_error,omitempty" example:""`
	ProcessingStartedAt string `json:"processing_started_at,omitempty" example:"2026-03-12T03:04:05Z"`
	ProcessedAt         string `json:"processed_at,omitempty" example:"2026-03-12T03:04:05Z"`
	ValidatedAt         string `json:"validated_at,omitempty" example:"2026-03-12T03:04:05Z"`
	FailedAt            string `json:"failed_at,omitempty" example:"2026-03-12T03:04:05Z"`
	CreatedAt           string `json:"created_at,omitempty" example:"2026-03-12T03:04:05Z"`
	CreatedBy           string `json:"created_by,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	UpdatedAt           string `json:"updated_at,omitempty" example:"2026-03-12T03:04:05Z"`
	UpdatedBy           string `json:"updated_by,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	DeletedAt           string `json:"deleted_at,omitempty" example:"2026-03-12T03:04:05Z"`
	DeletedBy           string `json:"deleted_by,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	TrashedAt           string `json:"trashed_at,omitempty" example:"2026-03-12T03:04:05Z"`
	PurgeAt             string `json:"purge_at,omitempty" example:"2026-04-12T03:04:05Z"`
}

type FileManagerFileListAttributes struct {
	Name           string `json:"name" example:"policy.pdf"`
	NameNormalized string `json:"name_normalized,omitempty" example:"policy.pdf"`
	Extension      string `json:"extension,omitempty" example:"pdf"`
	SizeBytes      int64  `json:"size_bytes" example:"1024"`
	MimeType       string `json:"mime_type" example:"application/pdf"`
	IsTemplate     bool   `json:"is_template" example:"true"`
	DownloadURL    string `json:"download_url,omitempty" example:"https://s3.localhost.localstack.cloud:4566/wucher-file-dev/files/2026/04/05/policy.pdf?X-Amz-Signature=..."`
	Status         string `json:"status" example:"ready"`
	CreatedAt      string `json:"created_at,omitempty" example:"2026-03-12T03:04:05Z"`
	CreatedBy      string `json:"created_by,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	UpdatedAt      string `json:"updated_at,omitempty" example:"2026-03-12T03:04:05Z"`
	UpdatedBy      string `json:"updated_by,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
}

type FileManagerFileLocationAttributes struct {
	FolderID string `json:"folder_id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
}

type FileManagerFileProcessingAttributes struct {
	ProcessingStartedAt string `json:"processing_started_at,omitempty" example:"2026-03-12T03:04:05Z"`
	ProcessedAt         string `json:"processed_at,omitempty" example:"2026-03-12T03:04:05Z"`
	ValidatedAt         string `json:"validated_at,omitempty" example:"2026-03-12T03:04:05Z"`
	FailedAt            string `json:"failed_at,omitempty" example:"2026-03-12T03:04:05Z"`
	FailureReason       string `json:"failure_reason,omitempty" example:"processing validation failed"`
}

type FileManagerFileAuditAttributes struct {
	CreatedAt string `json:"created_at,omitempty" example:"2026-03-12T03:04:05Z"`
	CreatedBy string `json:"created_by,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	UpdatedAt string `json:"updated_at,omitempty" example:"2026-03-12T03:04:05Z"`
	UpdatedBy string `json:"updated_by,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
}

type FileManagerFileDetailAttributes struct {
	Name           string                               `json:"name" example:"policy.pdf"`
	NameNormalized string                               `json:"name_normalized,omitempty" example:"policy.pdf"`
	Extension      string                               `json:"extension,omitempty" example:"pdf"`
	SizeBytes      int64                                `json:"size_bytes" example:"1024"`
	MimeType       string                               `json:"mime_type" example:"application/pdf"`
	IsTemplate     bool                                 `json:"is_template" example:"true"`
	DownloadURL    string                               `json:"download_url,omitempty" example:"https://s3.localhost.localstack.cloud:4566/wucher-file-dev/files/2026/04/05/policy.pdf?X-Amz-Signature=..."`
	PreviewURL     string                               `json:"preview_url,omitempty" example:"https://s3.localhost.localstack.cloud:4566/wucher-file-dev/files/2026/04/05/policy.preview.pdf?X-Amz-Signature=..."`
	Status         string                               `json:"status" example:"ready"`
	Location       *FileManagerFileLocationAttributes   `json:"location,omitempty"`
	Processing     *FileManagerFileProcessingAttributes `json:"processing,omitempty"`
	Audit          FileManagerFileAuditAttributes       `json:"audit"`
}

type FileManagerFileDownloadAttributes struct {
	URL             string `json:"url" example:"https://s3.localhost.localstack.cloud:4566/..."`
	ExpiresInSecond int64  `json:"expires_in_second" example:"900"`
}

type FileManagerFileUploadIntentAttributes struct {
	UploadIntentID   string            `json:"upload_intent_uuid" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	UploadURL        string            `json:"upload_url" example:"https://s3.localhost.localstack.cloud:4566/wucher-file-dev/..."`
	Method           string            `json:"method" example:"PUT"`
	RequiredHeaders  map[string]string `json:"required_headers,omitempty"`
	Object           FileUploadObject  `json:"object"`
	File             FileUploadFile    `json:"file"`
	ExpiresAt        string            `json:"expires_at" example:"2026-04-05T07:29:34Z"`
	ExpiresInSeconds int64             `json:"expires_in_seconds" example:"900"`
}

type FileUploadObject struct {
	Bucket string `json:"bucket" example:"wucher-file-dev"`
	Key    string `json:"key" example:"files/2026/04/05/018f3a5c7a6f7c2a8d4a4b5b1f6c8e9d.pdf"`
}

type FileUploadFile struct {
	Name      string `json:"name" example:"policy-final.pdf"`
	MimeType  string `json:"mime_type" example:"application/pdf"`
	SizeBytes int64  `json:"size_bytes" example:"1024"`
}
