diff --git a/app/backend/api/src/main/java/com/example/sms/domain/model/master/partner/Partner.java b/app/backend/api/src/main/java/com/example/sms/domain/model/master/partner/Partner.java new file mode 100644 index 00000000..8bb6d387 --- /dev/null +++ b/app/backend/api/src/main/java/com/example/sms/domain/model/master/partner/Partner.java @@ -0,0 +1,27 @@ +package com.example.sms.domain.model.master.partner; + +import lombok.AllArgsConstructor; +import lombok.NoArgsConstructor; +import lombok.Value; + +/** + * 取引先 + */ +@Value +@AllArgsConstructor +@NoArgsConstructor(force = true) +public class Partner { + String partnerCode; // 取引先コード + String partnerName; // 取引先名 + String partnerNameKana; // 取引先名カナ + Integer supplierType; // 仕入先区分 + String postalCode; // 郵便番号 + String prefecture; // 都道府県 + String address1; // 住所1 + String address2; // 住所2 + Integer tradeProhibitedFlag; // 取引禁止フラグ + Integer miscellaneousType; // 雑区分 + String partnerGroupCode; // 取引先グループコード + Integer creditLimit; // 与信限度額 + Integer temporaryCreditIncrease; // 与信一時増加枠 +} diff --git a/app/backend/api/src/main/java/com/example/sms/domain/model/master/partner/PartnerList.java b/app/backend/api/src/main/java/com/example/sms/domain/model/master/partner/PartnerList.java new file mode 100644 index 00000000..f6c33df6 --- /dev/null +++ b/app/backend/api/src/main/java/com/example/sms/domain/model/master/partner/PartnerList.java @@ -0,0 +1,29 @@ +package com.example.sms.domain.model.master.partner; + +import java.util.Collections; +import java.util.List; + +/** + * 取引先一覧 + */ +public class PartnerList { + List value; + + public PartnerList(List value) { + this.value = Collections.unmodifiableList(value); + } + + public int size() { + return value.size(); + } + + public PartnerList add(Partner partner) { + List newValue = value; + newValue.add(partner); + return new PartnerList(newValue); + } + + public List asList() { + return value; + } +} diff --git a/app/backend/api/src/main/java/com/example/sms/domain/model/master/partner/package-info.java b/app/backend/api/src/main/java/com/example/sms/domain/model/master/partner/package-info.java new file mode 100644 index 00000000..afb7ac21 --- /dev/null +++ b/app/backend/api/src/main/java/com/example/sms/domain/model/master/partner/package-info.java @@ -0,0 +1,4 @@ +/** + * 取引先 + */ +package com.example.sms.domain.model.master.partner; \ No newline at end of file diff --git a/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerCustomEntity.java b/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerCustomEntity.java new file mode 100644 index 00000000..3f196a17 --- /dev/null +++ b/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerCustomEntity.java @@ -0,0 +1,10 @@ +package com.example.sms.infrastructure.datasource.master.partner; + +import com.example.sms.infrastructure.datasource.autogen.model.取引先マスタ; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class PartnerCustomEntity extends 取引先マスタ { +} diff --git a/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerCustomMapper.java b/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerCustomMapper.java new file mode 100644 index 00000000..a33fd8f8 --- /dev/null +++ b/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerCustomMapper.java @@ -0,0 +1,16 @@ +package com.example.sms.infrastructure.datasource.master.partner; + +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface PartnerCustomMapper { + PartnerCustomEntity selectByPrimaryKey(String partnerCode); + + List selectAll(); + + @Delete("DELETE FROM public.取引先マスタ") + void deleteAll(); +} diff --git a/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerCustomMapper.xml b/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerCustomMapper.xml new file mode 100644 index 00000000..df53d922 --- /dev/null +++ b/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerCustomMapper.xml @@ -0,0 +1,16 @@ + + + + + + + \ No newline at end of file diff --git a/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerDataSource.java b/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerDataSource.java new file mode 100644 index 00000000..28237a56 --- /dev/null +++ b/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerDataSource.java @@ -0,0 +1,8 @@ +package com.example.sms.infrastructure.datasource.master.partner; + +import com.example.sms.service.master.partner.PartnerRepository; +import org.springframework.stereotype.Repository; + +@Repository +public class PartnerDataSource implements PartnerRepository { +} diff --git a/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerEntityMapper.java b/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerEntityMapper.java new file mode 100644 index 00000000..b09e18e6 --- /dev/null +++ b/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/PartnerEntityMapper.java @@ -0,0 +1,7 @@ +package com.example.sms.infrastructure.datasource.master.partner; + +import org.springframework.stereotype.Component; + +@Component +public class PartnerEntityMapper { +} diff --git a/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/package-info.java b/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/package-info.java new file mode 100644 index 00000000..7a02dc57 --- /dev/null +++ b/app/backend/api/src/main/java/com/example/sms/infrastructure/datasource/master/partner/package-info.java @@ -0,0 +1 @@ +package com.example.sms.infrastructure.datasource.master.partner; \ No newline at end of file diff --git a/app/backend/api/src/main/java/com/example/sms/service/master/partner/PartnerRepository.java b/app/backend/api/src/main/java/com/example/sms/service/master/partner/PartnerRepository.java new file mode 100644 index 00000000..0b5d2129 --- /dev/null +++ b/app/backend/api/src/main/java/com/example/sms/service/master/partner/PartnerRepository.java @@ -0,0 +1,4 @@ +package com.example.sms.service.master.partner; + +public interface PartnerRepository { +}