class Insurance

Defined in:

insurance/model.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(user_id : Int32, type : String, max_coverage : Float64, start_date : String, end_date : String) #

Construtor


[View source]

Class Method Detail

def self.delete(db, id : Int32) #

[View source]
def self.get_all(db) : ListOfInsurances #

Método para obter todos os seguros


[View source]
def self.get_by_id(db, id : Int32) #

[View source]
def self.get_by_user_id(db, id : Int32) #

[View source]
def self.transform_insurances(insurances : DBResult) : ListOfInsurances #

[View source]

Instance Method Detail

def end_date : String #

[View source]
def end_date=(end_date : String) #

[View source]
def id : Int32 | Nil #

Atributos do modelo


[View source]
def id=(id : Int32 | Nil) #

Atributos do modelo


[View source]
def max_coverage : Float64 #

[View source]
def max_coverage=(max_coverage : Float64) #

[View source]
def save(db) #

Método para salvar um novo seguro no banco de dados


[View source]
def start_date : String #

[View source]
def start_date=(start_date : String) #

[View source]
def type : String #

[View source]
def type=(type : String) #

[View source]
def update(db, id : Int32) #

[View source]
def user_id : Int32 #

[View source]
def user_id=(user_id : Int32) #

[View source]