entity

package
v0.0.0-...-8be6f90 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompanyRootPath

func CompanyRootPath(companyID string) string

func DocumentEncryptedName

func DocumentEncryptedName(docID string, extension string) string

Types

type Company

type Company struct {
	ID                    string    `validate:"required,uuid"`
	EIN                   string    `validate:"required"`
	Name                  string    `validate:"required,min=3"`
	FullName              string    `validate:"required,min=3"`
	MunicipalRegistration string    `validate:""`
	StateRegistration     string    `validate:""`
	CreatedAt             time.Time `validate:"required"`
}

func NewCompany

func NewCompany(id string, ein string, name string, fullName string, municipalReg string, stateReg string,
	createdAt time.Time) (Company, error)

type CompanyDocument

type CompanyDocument struct {
	ID          string                `validate:"required,uuid"`
	CompanyID   string                `validate:"required,uuid"`
	Title       string                `validate:"required,min=3"`
	File        valueobjects.Document `validate:"required"`
	LastUpdated time.Time             `validate:"required,gtefield=CreatedAt"`
	CreatedAt   time.Time             `validate:"required,ltefield=LastUpdated"`
}

func NewDocument

func NewDocument(id string, companyID string, title string, filePath string, fileExtension string,
	lastUpdated time.Time, createdAt time.Time) (CompanyDocument, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL