move resource name method into orm reltaed class