class Insurance
- Insurance
- Reference
- Object
Defined in:
insurance/model.crConstructors
-
.new(user_id : Int32, type : String, max_coverage : Float64, start_date : String, end_date : String)
Construtor
Class Method Summary
- .delete(db, id : Int32)
-
.get_all(db) : ListOfInsurances
Método para obter todos os seguros
- .get_by_id(db, id : Int32)
- .get_by_user_id(db, id : Int32)
- .transform_insurances(insurances : DBResult) : ListOfInsurances
Instance Method Summary
- #end_date : String
- #end_date=(end_date : String)
-
#id : Int32 | Nil
Atributos do modelo
-
#id=(id : Int32 | Nil)
Atributos do modelo
- #max_coverage : Float64
- #max_coverage=(max_coverage : Float64)
-
#save(db)
Método para salvar um novo seguro no banco de dados
- #start_date : String
- #start_date=(start_date : String)
- #type : String
- #type=(type : String)
- #update(db, id : Int32)
- #user_id : Int32
- #user_id=(user_id : Int32)
Constructor Detail
def self.new(user_id : Int32, type : String, max_coverage : Float64, start_date : String, end_date : String)
#
Construtor