last modified in update for all tables
This commit is contained in:
@ -124,6 +124,7 @@ func GetAllCompanyData(o orm.Ormer, query map[string]string, fields []string, so
|
||||
// UpdateCompanyData updates CompanyData by Id and returns error if
|
||||
// the record to be updated doesn't exist
|
||||
func UpdateCompanyDataById(o orm.Ormer, m *CompanyData) (err error) {
|
||||
m.Modified = time.Now()
|
||||
v := CompanyData{Id: m.Id}
|
||||
// ascertain id exists in the database
|
||||
if err = o.Read(&v); err == nil {
|
||||
|
@ -123,6 +123,7 @@ func GetAllCompanyUser(o orm.Ormer, query map[string]string, fields []string, so
|
||||
|
||||
// UpdateCompanyUserById updates CompanyUser by Id and returns error if the record to be updated doesn't exist
|
||||
func UpdateCompanyUserById(o orm.Ormer, m *CompanyUser) (err error) {
|
||||
m.Modified = time.Now()
|
||||
v := CompanyUser{Id: m.Id}
|
||||
// ascertain id exists in the database
|
||||
if err = o.Read(&v); err == nil {
|
||||
|
@ -127,6 +127,7 @@ func GetAllContact(o orm.Ormer, query map[string]string, fields []string, sortby
|
||||
// UpdateContact updates Contact by Id and returns error if
|
||||
// the record to be updated doesn't exist
|
||||
func UpdateContactById(o orm.Ormer, m *Contact) (err error) {
|
||||
m.Modified = time.Now()
|
||||
v := Contact{Id: m.Id}
|
||||
// ascertain id exists in the database
|
||||
if err = o.Read(&v); err == nil {
|
||||
|
@ -124,6 +124,7 @@ func GetAllPost(o orm.Ormer, query map[string]string, fields []string, sortby []
|
||||
// UpdatePost updates Post by Id and returns error if
|
||||
// the record to be updated doesn't exist
|
||||
func UpdatePostById(o orm.Ormer, m *Post) (err error) {
|
||||
m.Modified = time.Now()
|
||||
v := Post{Id: m.Id}
|
||||
// ascertain id exists in the database
|
||||
if err = o.Read(&v); err == nil {
|
||||
|
@ -154,6 +154,7 @@ func GetUserCompanyMapsByCompanyName(o orm.Ormer, companyName string) (l []UserC
|
||||
|
||||
// UpdateUserCompanyMapById updates UserCompanyMap by Id and returns error if the record to be updated doesn't exist
|
||||
func UpdateUserCompanyMapById(o orm.Ormer, m *UserCompanyMap) (err error) {
|
||||
m.Modified = time.Now()
|
||||
v := UserCompanyMap{ID: m.ID}
|
||||
// ascertain id exists in the database
|
||||
if err = o.Read(&v); err == nil {
|
||||
|
Reference in New Issue
Block a user