diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:38:18 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:38:18 +0000 |
| commit | 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (patch) | |
| tree | e1c3b20ea08f0cf71122a1e73f0d395f8fd83874 /Codemerx/Gestor.Model/Model.Domain.Common/Fipe.cs | |
| parent | 674ca83ba9243a9e95a7568c797668dab6aee26a (diff) | |
| download | gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip | |
chore: location
Diffstat (limited to 'Codemerx/Gestor.Model/Model.Domain.Common/Fipe.cs')
| -rw-r--r-- | Codemerx/Gestor.Model/Model.Domain.Common/Fipe.cs | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/Codemerx/Gestor.Model/Model.Domain.Common/Fipe.cs b/Codemerx/Gestor.Model/Model.Domain.Common/Fipe.cs new file mode 100644 index 0000000..3a3accc --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Common/Fipe.cs @@ -0,0 +1,138 @@ +using Gestor.Model.Helper;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class Fipe
+ {
+ private string _codigo;
+
+ private string _marca;
+
+ private string _modelo;
+
+ private int _anoMaximo;
+
+ private int _anoMinimo;
+
+ public int AnoMaximo
+ {
+ get
+ {
+ if (this.Detalhes == null || this.Detalhes.Count == 0)
+ {
+ return this._anoMaximo;
+ }
+ return (
+ from d in this.Detalhes
+ orderby d.AnoModelo descending
+ select d).First<FipeDetalhe>().AnoModelo.ToInt();
+ }
+ set
+ {
+ if (this.Detalhes == null || this.Detalhes.Count == 0)
+ {
+ this._anoMaximo = value;
+ }
+ }
+ }
+
+ public int AnoMinimo
+ {
+ get
+ {
+ if (this.Detalhes == null || this.Detalhes.Count == 0)
+ {
+ return this._anoMinimo;
+ }
+ return (
+ from d in this.Detalhes
+ orderby d.AnoModelo
+ select d).First<FipeDetalhe>().AnoModelo.ToInt();
+ }
+ set
+ {
+ if (this.Detalhes == null || this.Detalhes.Count == 0)
+ {
+ this._anoMinimo = value;
+ }
+ }
+ }
+
+ public string Codigo
+ {
+ get
+ {
+ string str = this._codigo;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._codigo = value;
+ }
+ }
+
+ public List<FipeDetalhe> Detalhes
+ {
+ get;
+ set;
+ }
+
+ public int? IdFabricante
+ {
+ get;
+ set;
+ }
+
+ public string Marca
+ {
+ get
+ {
+ string str = this._marca;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._marca = value;
+ }
+ }
+
+ public string Modelo
+ {
+ get
+ {
+ string str = this._modelo;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._modelo = value;
+ }
+ }
+
+ public int TipoVeiculo
+ {
+ get;
+ set;
+ }
+
+ public Fipe()
+ {
+ }
+ }
+}
\ No newline at end of file |