Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Victor Porton Newsgroups: comp.programming Subject: Re: .paid field vs .payment field Date: Sat, 22 Sep 2018 17:17:56 +0300 Organization: Aioe.org NNTP Server Lines: 21 Message-ID: References: <03ff8449-f4f8-4c03-84d0-ab5efd539efa@googlegroups.com> NNTP-Posting-Host: pBmnB3gIZB1BuvejubpZaQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@aioe.org User-Agent: KNode/4.14.10 X-Notice: Filtered by postfilter v. 0.8.3 Xref: csiph.com comp.programming:9297 Julio Di Egidio wrote: > On Thursday, 20 September 2018 21:33:18 UTC+2, Victor Porton wrote: > >> I am writing a class SimpleItem representing a non-recurrent (one-time) >> purchase. > > Call it SimplePurchase then, and have it "contain" a SimpleItem as well as > a SimplePayment (there's hardly any reason not to abstract the two apart), > as well as, maybe, a SimpleRefund... i.e. depending on your > business-level, aka explicit, *requirements*. No, SimpleItem already has foreign key to SimplePayment. There is no need for SimplePurchase to link to SimplePayment too. > HTH, > > Julio -- Victor Porton - http://portonvictor.org