trans = Trans() // here Trans is the class name which you have created as model trans.field1 = data1 // you can assign data to whatever column you have create, filed1 is column of db trans.save()