feat(training): add fields published and retired
This commit is contained in:
parent
79b7567627
commit
df41b45905
9 changed files with 131 additions and 50 deletions
|
|
@ -23,10 +23,31 @@ func NewFaker(trainingRepository training.Repository, trainingDateRepository tra
|
|||
|
||||
func (f *Faker) GenerateFakeData() error {
|
||||
var trainings = []training.Training{
|
||||
{
|
||||
Name: "Kubernetes v1",
|
||||
Days: 1,
|
||||
Description: "Kubernetes-v1",
|
||||
Published: false,
|
||||
Retired: true,
|
||||
Pricing: []training.Price{
|
||||
{
|
||||
Amount: decimal.NewFromInt(3900),
|
||||
Currency: money.CZK,
|
||||
Type: training.OpenTrainingPrice,
|
||||
},
|
||||
{
|
||||
Amount: decimal.NewFromInt(24000),
|
||||
Currency: money.CZK,
|
||||
Type: training.CorporateTrainingPrice,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "Kubernetes",
|
||||
Days: 2,
|
||||
Description: "Kubernetes",
|
||||
Published: true,
|
||||
Retired: false,
|
||||
Pricing: []training.Price{
|
||||
{
|
||||
Amount: decimal.NewFromInt(450),
|
||||
|
|
@ -54,6 +75,8 @@ func (f *Faker) GenerateFakeData() error {
|
|||
Name: "Terraform",
|
||||
Days: 1,
|
||||
Description: "Terraform",
|
||||
Published: true,
|
||||
Retired: false,
|
||||
Pricing: []training.Price{
|
||||
{
|
||||
Amount: decimal.NewFromInt(200),
|
||||
|
|
@ -81,6 +104,8 @@ func (f *Faker) GenerateFakeData() error {
|
|||
Name: "RKE2",
|
||||
Days: 1,
|
||||
Description: "RKE2",
|
||||
Published: false,
|
||||
Retired: false,
|
||||
Pricing: []training.Price{
|
||||
{
|
||||
Amount: decimal.NewFromInt(200),
|
||||
|
|
@ -108,6 +133,8 @@ func (f *Faker) GenerateFakeData() error {
|
|||
Name: "GitHub Actions",
|
||||
Days: 1,
|
||||
Description: "GitHub Actions",
|
||||
Published: false,
|
||||
Retired: false,
|
||||
Pricing: []training.Price{
|
||||
{
|
||||
Amount: decimal.NewFromInt(200),
|
||||
|
|
@ -135,6 +162,8 @@ func (f *Faker) GenerateFakeData() error {
|
|||
Name: "GitLab CI",
|
||||
Days: 1,
|
||||
Description: "GitLab CI",
|
||||
Published: true,
|
||||
Retired: false,
|
||||
Pricing: []training.Price{
|
||||
{
|
||||
Amount: decimal.NewFromInt(200),
|
||||
|
|
@ -162,6 +191,8 @@ func (f *Faker) GenerateFakeData() error {
|
|||
Name: "Prometheus",
|
||||
Days: 2,
|
||||
Description: "Prometheus",
|
||||
Published: true,
|
||||
Retired: false,
|
||||
Pricing: []training.Price{
|
||||
{
|
||||
Amount: decimal.NewFromInt(450),
|
||||
|
|
|
|||
Reference in a new issue