activemodel / kales.internal / KApplicationRecordClass

KApplicationRecordClass

class KApplicationRecordClass

Constructors

<init>

KApplicationRecordClass(klass: KClass<out ApplicationRecord>)

Properties

associations

val associations: List<KParameter>

Returns a List of all KParameter associations for this ApplicationRecord

asSymbol

val asSymbol: String

belongsToAssociations

val belongsToAssociations: List<KParameter>

constructor

val constructor: KFunction<ApplicationRecord>

directParameters

val directParameters: List<KParameter>

Returns a List of all KParameter directly defined on this class (except associations)

foreignKeyColumnName

val foreignKeyColumnName: String

eg: Video class -> video_id, Post class -> post_id

hasManyAssociations

val hasManyAssociations: List<KParameter>

klass

val klass: KClass<out ApplicationRecord>

tableName

val tableName: String

Video class -> video TODO Pluralize irregular words (#49) TODO Camelize it (#50)