Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Demo flights and demo tickets #122

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

compae
Copy link
Member

@compae compae commented Jun 14, 2017

Not merge. Stratio usage.

pom.xml Outdated
@@ -113,6 +114,36 @@

<dependencies>
<dependency>
<groupId>com.nrinaudo</groupId>
<artifactId>kantan.csv_${scala.binary.version}</artifactId>
<version>0.1.19</version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you extract this value to a property?

@@ -0,0 +1,97 @@
create kafka-config

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this file make sense to be pushed to the repo?? It seems the configurations for your use case, doesn't it?

@@ -0,0 +1,136 @@
create kafka-config

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same as above comment


import scala.util.{Failure, Success, Try}

case class TicketsCarrefourGenerator(locale: String) extends FakerGenerator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, the generators should be generic and shouldn't be related to any customer. It would be nice a generic ticket generator by mixing existing custom generators within a twirl template and/or creating some new custom generators when you need.


import scala.util.{Failure, Success, Try}

case class TicketsStratioGenerator(locale: String) extends FakerGenerator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this your generic ticket generator?? If yes, the previous CarrefourTicketGenerator should be remove, doesn't it?

@compae
Copy link
Member Author

compae commented Aug 14, 2017

Please review changes

@albertostratio
Copy link
Contributor

I wouldn't create the csv files to generate flights. Having a look at the flights's csv files I think you can replicate the same behaviour using the same approach we used for the songs generator where you have a small sets of songs to be generated.

If a small set does not fulfill your needs you can always play around with the templates to generate the fields that you need: using lists of elements or using the current generators (integer, decimal...)

We should avoid to upload such a big files to the repo, don't you think?

Copy link

@eambrosio eambrosio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

totally agree with @albertostratio

@@ -0,0 +1 @@
[{"id":"00062016092205802134","clientId":4234,"date":"2017-01-01T11:10","mallNumber":"004R", "shaOne":"f5ee44b4946d0ec57997a71f6b44ab7750af57d0","clubCardNumber":2758117572009,"items":[{"code":9788479711986,"vat":21,"netAmount":27.95,"numberUnits":1,"subFamily":33210,"description":"CHAMPAGNE MUMM","numberAuxiliaryData":null,"auxiliaryData":null}],"header":{"netAmount":27.95,"numberItems":1,"numberLines":29,"numberLinesItems":1,"numberLinesVat":1,"operator":"0921","cashNumber":"058","ticketType":"N","ticketNumber":"02134","typeOperation":"V"},"vatItems":[{"base":23.09,"vat":4.86,"share":21}],"lines":[" * * * * * * C A R R E F O U R * * * * * "," A L C O B E N D A S "," CIF: A-28425270 "," Telef.Atencion cliente: 914908900 "," CHAMPAGNE MUMM 27,95",null,"=========================================="," 1 ART. TOTAL A PAGAR : 27,95","=========================================="," TIPO BASE CUOTA\r"," 21,00% 23,10 4,85"," PAGADO METALICO 28,00"," CAMBIO RECIBIDO 0,05"," ???????????????????????????????????????? "," SOCIO CLUB CARREFOUR:2739052842075 "," ???????????????????????????????????????? "," ************************************** "," P.V.P.IVA INCLUIDO "," Centros Comerciales Carrefour S.A "," C\/Campezo 16-Poligono Las Merce "," 28022 Madrid "," R.M.Madrid T.14654,F.7SEC.8? H.M-6318 "," ************************************** "," RESERVA TUS LIBROS DE TEXTO "," HASTA EL 31 DE JULIO "," ****************************************"," VENDEDOR 123 \r","23\/09\/16 11:09:59 0921 058 0006 2134\r"," LE ATENDIO : ISLA DIGITAL \r"],"concepts":[{"code":47,"type":2,"description":"METALICO","amount":27.95}],"numberAuxiliaryData":null,"auxiliaryData":null}]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shuld consider remove this kind of resources. The resources should be as generic as possible and then perform messages by mixing and randomizing their data.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants