package com.izouma.jiashanxia.dto;

import com.izouma.jiashanxia.domain.Company;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
@ApiModel(value = "企业表")
public class CompanyDTO {
    private Long id;

    private Long userId;

    private String name;

    private BigDecimal amount;

    private String nickname;

    public CompanyDTO(Company company) {
        this.id = company.getId();
        this.userId = company.getUserId();
        this.name = company.getName();
        this.amount = company.getAmount();
    }
}
