|
|
@@ -6,6 +6,7 @@ import com.izouma.nineth.converter.FileObjectListConverter;
|
|
|
import com.izouma.nineth.converter.PrivilegeListConverter;
|
|
|
import com.izouma.nineth.converter.PropertyListConverter;
|
|
|
import com.izouma.nineth.enums.AssetStatus;
|
|
|
+import com.izouma.nineth.enums.CollectionType;
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
@@ -156,6 +157,10 @@ public class Asset extends BaseEntity {
|
|
|
|
|
|
private int projectId;
|
|
|
|
|
|
+ @ApiModelProperty("类型")
|
|
|
+ @Enumerated(EnumType.STRING)
|
|
|
+ private CollectionType type;
|
|
|
+
|
|
|
public static Asset create(Collection collection, User user) {
|
|
|
return Asset.builder()
|
|
|
.userId(user.getId())
|
|
|
@@ -179,6 +184,7 @@ public class Asset extends BaseEntity {
|
|
|
.ownerId(user.getId())
|
|
|
.ownerAvatar(user.getAvatar())
|
|
|
.projectId(collection.getProjectId())
|
|
|
+ .type(collection.getType())
|
|
|
.build();
|
|
|
}
|
|
|
|