Add autoRenewEndTime field to Domain entity (#765)

* Add autoRenewEndTime field to Domain entity

This is the first step towards allowing administrators to selectively disable autorenew.
This commit is contained in:
Ben McIlwain 2020-08-13 10:40:11 -04:00 committed by GitHub
parent 98db79d3d1
commit d873b9f69a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 103 additions and 20 deletions

View file

@ -55,6 +55,7 @@ import google.registry.model.reporting.HistoryEntry;
import google.registry.model.transfer.DomainTransferData;
import google.registry.model.transfer.TransferStatus;
import google.registry.persistence.VKey;
import java.util.Optional;
import org.joda.money.Money;
import org.joda.time.DateTime;
import org.junit.jupiter.api.BeforeEach;
@ -66,12 +67,11 @@ public class DomainBaseTest extends EntityTestCase {
private DomainBase domain;
private VKey<BillingEvent.OneTime> oneTimeBillKey;
private VKey<BillingEvent.Recurring> recurringBillKey;
private VKey<DomainBase> domainKey;
@BeforeEach
void setUp() {
createTld("com");
domainKey = VKey.from(Key.create(null, DomainBase.class, "4-COM"));
VKey<DomainBase> domainKey = VKey.from(Key.create(null, DomainBase.class, "4-COM"));
VKey<HostResource> hostKey =
persistResource(
new HostResource.Builder()
@ -158,6 +158,7 @@ public class DomainBaseTest extends EntityTestCase {
fakeClock.nowUtc().plusDays(1),
"registrar",
null))
.setAutorenewEndTime(Optional.of(fakeClock.nowUtc().plusYears(2)))
.build()));
}
@ -176,7 +177,8 @@ public class DomainBaseTest extends EntityTestCase {
"nsHosts",
"currentSponsorClientId",
"deletionTime",
"tld");
"tld",
"autorenewEndTime");
}
@Test

View file

@ -185,6 +185,7 @@ class google.registry.model.domain.DomainBase {
java.util.Set<google.registry.model.eppcommon.StatusValue> status;
java.util.Set<google.registry.persistence.VKey<google.registry.model.host.HostResource>> nsHosts;
java.util.Set<java.lang.String> subordinateHosts;
org.joda.time.DateTime autorenewEndTime;
org.joda.time.DateTime deletionTime;
org.joda.time.DateTime lastEppUpdateTime;
org.joda.time.DateTime lastTransferTime;
@ -765,4 +766,4 @@ enum google.registry.model.transfer.TransferStatus {
PENDING;
SERVER_APPROVED;
SERVER_CANCELLED;
}
}