package com.ruoyi.platform.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@ApiModel("服务")
@Data
public class Service implements Serializable {
    private Long id;

    private String serviceName;

    private String serviceType;

    @TableField(exist = false)
    private String serviceTypeName;

    private String description;

    private String createBy;

    private String updateBy;

    private Date createTime;

    private Date updateTime;

    private Integer state;

    @TableField(exist = false)
    private Long versionCount;

    public String getServiceTypeName() {
        switch (serviceType) {
            case "image":
                return "图片";
            case "video":
                return "视频";
            case "audio":
                return "音频";
            case "text":
                return "文本";
        }
        return null;
    }
}
