set primary key in models.