<commit_before>package org.zstack.header.volume;

import org.zstack.header.configuration.DiskOfferingEO;
import org.zstack.header.image.ImageEO;
import org.zstack.header.storage.primary.PrimaryStorageEO;
import org.zstack.header.vm.VmInstanceEO;
import org.zstack.header.vo.ForeignKey;
import org.zstack.header.vo.ForeignKey.ReferenceOption;
import org.zstack.header.vo.Index;
import org.zstack.header.vo.ResourceVO;
import org.zstack.header.vo.ShadowEntity;

import javax.persistence.*;
import java.sql.Timestamp;

@MappedSuperclass
public class VolumeAO extends ResourceVO implements ShadowEntity {
    @Column
    @Index
    private String name;

    @Column
    private String description;

    @Column
    @ForeignKey(parentEntityClass = PrimaryStorageEO.class, onDeleteAction = ReferenceOption.CASCADE)
    private String primaryStorageUuid;

    @Column
    private String vmInstanceUuid;

    @Column
    @ForeignKey(parentEntityClass = DiskOfferingEO.class, onDeleteAction = ReferenceOption.RESTRICT)
    private String diskOfferingUuid;

    @Column
    @ForeignKey(parentEntityClass = ImageEO.class, onDeleteAction = ReferenceOption.SET_NULL)
    private String rootImageUuid;

    @Column
    private String installPath;

    @Column
    @Enumerated(EnumType.STRING)
    private VolumeType type;

    @Column
    @Enumerated(EnumType.STRING)
    private VolumeStatus status;

    @Column
    private long size;

    @Column
    private Long actualSize;

    @Column<commit_msg>drop redundant foreign key which has been dropped in 1.3.1 sql file fixes: ZSTAC-2307<commit_after>package org.zstack.header.volume;

import org.zstack.header.configuration.DiskOfferingEO;
import org.zstack.header.storage.primary.PrimaryStorageEO;
import org.zstack.header.vo.ForeignKey;
import org.zstack.header.vo.ForeignKey.ReferenceOption;
import org.zstack.header.vo.Index;
import org.zstack.header.vo.ResourceVO;
import org.zstack.header.vo.ShadowEntity;

import javax.persistence.*;
import java.sql.Timestamp;

@MappedSuperclass
public class VolumeAO extends ResourceVO implements ShadowEntity {
    @Column
    @Index
    private String name;

    @Column
    private String description;

    @Column
    @ForeignKey(parentEntityClass = PrimaryStorageEO.class, onDeleteAction = ReferenceOption.CASCADE)
    private String primaryStorageUuid;

    @Column
    private String vmInstanceUuid;

    @Column
    @ForeignKey(parentEntityClass = DiskOfferingEO.class, onDeleteAction = ReferenceOption.RESTRICT)
    private String diskOfferingUuid;

    @Column
    private String rootImageUuid;

    @Column
    private String installPath;

    @Column
    @Enumerated(EnumType.STRING)
    private VolumeType type;

    @Column
    @Enumerated(EnumType.STRING)
    private VolumeStatus status;

    @Column
    private long size;

    @Column
    private Long actualSize;

    @Column
{'fraction_non_alphanumeric': 0.0779401530967293, 'fraction_numerical': 0.0024356297842727907, 'mean_word_length': 4.18018018018018, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3520156', 'n_tokens_mistral': 854, 'n_tokens_neox': 834, 'n_words': 188}