@startuml Database

map FieldRule {
	QuestionID => **integer**
}

map UTM {
	CreatedAt => **integer**
	Deleted => **boolean**
	ID => **integer**
	Name => **string**
	QuizID => **integer**
	AccountID => **string**
	AmoFieldID => **integer**
}

map Pipeline {
	CreatedAt => **integer**
	Deleted => **boolean**
	ID => **integer**
	IsArchive => **boolean**
	Name => **string**
	AccountID => **string**
	AmoID => **integer**
}

map Step {
	Deleted => **boolean**
	ID => **integer**
	Name => **string**
	PipelineID => **integer**
	AccountID => **string**
	AmoID => **integer**
	Color => **string**
	CreatedAt => **integer**
}

map Tag {
	AccountID => **string**
	AmoID => **integer**
	Color => **string**
	CreatedAt => **integer**
	Deleted => **boolean**
	Entity => **string**
	ID => **integer**
	Name => **string**
}

map Field {
	CreatedAt => **integer**
	Deleted => **boolean**
	EntityType => **string**
	ID => **integer**
	Name => **string**
	Type => **string**
	AccountID => **string**
	AmoID => **integer**
	Code => **string**
}

map User {
	Role => **string**
	AmoID => **integer**
	Group => **string**
	Name => **string**
	Email => **string**
	ID => **integer**
	AccountID => **string**
	CreatedAt => **integer**
	Deleted => **boolean**
}

map Rule {
	CreatedAt => **integer**
	Deleted => **boolean**
	FieldsRule => **FieldsRule**
	PipelineID => **integer**
	QuizID => **integer**
	StepID => **integer**
	UTMs => **[]integer**
	AccountID => **string**
	PerformerID => **integer**
	ID => **integer**
}


@enduml