Subversion Repositories SmartDukaan

Rev

Rev 35301 | Rev 35463 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35301 Rev 35323
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.fofo;
1
package com.spice.profitmandi.dao.entity.fofo;
2
 
2
 
-
 
3
import com.fasterxml.jackson.annotation.JsonIgnore;
3
import com.spice.profitmandi.common.enumuration.ActivationType;
4
import com.spice.profitmandi.common.enumuration.ActivationType;
4
import com.spice.profitmandi.common.enumuration.CounterSize;
5
import com.spice.profitmandi.common.enumuration.CounterSize;
5
import com.spice.profitmandi.common.enumuration.FofoType;
6
import com.spice.profitmandi.common.enumuration.FofoType;
-
 
7
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
6
import com.spice.profitmandi.dao.entity.user.Address;
8
import com.spice.profitmandi.dao.entity.user.Address;
7
 
9
 
8
import javax.persistence.*;
10
import javax.persistence.*;
9
import java.io.Serializable;
11
import java.io.Serializable;
10
import java.time.LocalDate;
12
import java.time.LocalDate;
Line 460... Line 462...
460
                ", trialEnd=" + trialEnd +
462
                ", trialEnd=" + trialEnd +
461
                ", minimumInvestmentOld=" + minimumInvestmentOld +
463
                ", minimumInvestmentOld=" + minimumInvestmentOld +
462
                '}';
464
                '}';
463
    }
465
    }
464
 
466
 
-
 
467
    @JsonIgnore
465
    public boolean isExpired() {
468
    public boolean isExpired() throws ProfitMandiBusinessException{
466
        return LocalDate.now().isAfter(trialEnd);
469
        if(isTrial()) return LocalDate.now().isAfter(trialEnd);
-
 
470
        else throw new ProfitMandiBusinessException("Not a trial user", "Not a trial user", "Not a trial user");
467
    }
471
    }
468
}
472
}
469
473